[PHP] php.ini
I'm trying to turn off magic quotes for a site. I've copied the php.ini from /etc/php5/apache2 to the web site directory. In this file, I've changed magic_quotes_gpc to read magic_quotes.gpc = Off When I run phpinfo() from this directory, it still shows magic quotes as being on. I'm guessing there is another configuration parameter (either in the Apache configuration or for php) that allows this to be processed. Would someone be so kind as to help me here; I admit ignorance. ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini (typo in previous)
There was a typo in my previous message asking the question. I typed a . instead of _. It's corrected below: On Friday 09 May 2008 11:47:29 Michael Satterwhite wrote: I'm trying to turn off magic quotes for a site. I've copied the php.ini from /etc/php5/apache2 to the web site directory. In this file, I've changed magic_quotes_gpc to read magic_quotes_gpc = Off When I run phpinfo() from this directory, it still shows magic quotes as being on. I'm guessing there is another configuration parameter (either in the Apache configuration or for php) that allows this to be processed. Would someone be so kind as to help me here; I admit ignorance. ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RES: [PHP] php.ini
On Friday 09 May 2008 11:56:32 Thiago Pojda wrote: phpinfo() should also tell you what php.ini is loaded. Did you check that? I hadn't thought to, but I just did. As expected, it's reading it from /etc/php5/apache2. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini
On Friday 09 May 2008 11:59:25 Wolf wrote: When making changes to Apache configuration read files, you have to RESTART APACHE before those changes take effect. However you can use php's ini_set () function to set a number of settings on the fly that can be changed per page change. As this is (should be) being read from the user directory containing the application instead of the global configuration file, I'd expect it to behave more like the .htaccess file. The use of .htaccess to override apache configurations doesn't require an apache restart. I do know that on bluehost, they actually encourage people to use their own php.ini file in their web directory ... and users certainly don't have the authority to restart apache. That said - just for grins, I *DID* restart apache2. It made no difference. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stream download problem
Jochem Maas wrote: Michael Satterwhite wrote: Prathaban Mookiah wrote: Micheal, I ran into this problem too. A easy workaround is to right click and choose 'save as' which worked for me. I wish that would work. The URL is along the lines of a href=easy.php?download=streamdltype=full - and it's this that gets substituted for the filename. It reports that it cannot be written to the cache. is possible for you to change the way the URL is written so that it looks like so: easy.php/fakepdfname.pdf?download=streamdltype=full I don't think so (although I'll do some checking). I don't have the ability to configure apache on this server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stream download problem
I have a site that generates a file to be streamed down. The relevant code is: -- header(Content-type: application/vnd.ms-excel); header(Content-disposition: attachment; filename=$EXPORT_TIME.txt); header(Content-disposition: attachment); header(Pragma: no-cache); header(Expires: 0); echo $filestring; die(); --- $EXPORT_TIME has been set to a valid filename in earlier part of script. The script has been called by the user clicking on a line similar to a href=easy.php?download=streamdltype=full. If the browser in use is Firefox, Mozilla, or almost anything, it works correctly. If the browser is Internet Explorer, the download fails. It appears in that case that the filename expected is the full url used to call the page (e.g. easy.php?download=streamdltype=full) which is an invalid filename, hence the failure. ...and before you suggest it, *NO*, I cannot tell my client that they can't use Internet Explorer. Can anyone offer any help? ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stream download problem
Prathaban Mookiah wrote: Micheal, I ran into this problem too. A easy workaround is to right click and choose 'save as' which worked for me. I wish that would work. The URL is along the lines of a href=easy.php?download=streamdltype=full - and it's this that gets substituted for the filename. It reports that it cannot be written to the cache. For complete information on this you want to have a look at http://support. microsoft.com/default.aspx/kb/279667 I find this interesting MSoft claims to have fixed the problem back at IE 5.1, but I'm still seeing it - and I'm up to date as is my client. Of course, I seldom believe anything MSoft says. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookies https
I have a site that is using a shared ssl certificate. When running on the site, the host is of the form host.com. When running in ssl mode, the domain is of the form host.certhost.com. ping shows that both resolve to the same ip address. Is there a way to create a cookie in the unsecured area and have it available when going through the ssl certificate? tia ---Michael -- Fight software piracy! Don't pirate MS Office - that's theft. Instead, use ours - it's legal and free www.openoffice.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error checking
I'm using Apache and PHP4 under debian. in /etc/php4/apache, I have the setting error_reporting = E_ALL ~E_NOTICE but I don't get any errors - even when I've clearly used an undefined variable. What else might need to be set to get PHP to report errors for me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error checking
John Nichel wrote: Michael Satterwhite wrote: I'm using Apache and PHP4 under debian. in /etc/php4/apache, I have the setting error_reporting = E_ALL ~E_NOTICE but I don't get any errors - even when I've clearly used an undefined variable. What else might need to be set to get PHP to report errors for me? display_errors = On Thanks for the reply. My config file does have display_errors = On I should have put that in my first email. I would have felt *VERY* stupid if I'd forgotten that one - and I do sometimes have enought brain freeze to forget things like this. Unfortunately, it's already set. Thanks again. ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error checking
Philip Hallstrom wrote: I'm using Apache and PHP4 under debian. in /etc/php4/apache, I have the setting error_reporting = E_ALL ~E_NOTICE but I don't get any errors - even when I've clearly used an undefined variable. What else might need to be set to get PHP to report errors for me? take a read through here... http://us2.php.net/errorfunc I just read it again (I'd read it before I posted the first message), and I don't see *ANYTHING* I'm missing. Obviously, I am missing something, but I don't see it. The significant parameters seem to be error_reporting and display_errors My php.ini has error_reporting = E_ALL ~E_NOTICE display_errors = On (I've also tried display_errors = 1) A documentation reference is always appreciated (at least by me), and I thank you for suggesting I read it again. This time, however, I seem to be too dense to see it. Thanks again ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error checking - Fixed
But I have no idea how. I made a series of changes trying to figure out what I missed. Most of the changes didn't look like they'd do anything - but the error reporting started working. I then tried changing things back - at least I thought I did. The error checking continued to work. I *HATE* it when I have a problem I can't put my finger on. The important thing is that it is working, though. I want to thank those who helped me out. ---Michael Michael Satterwhite wrote: I'm using Apache and PHP4 under debian. in /etc/php4/apache, I have the setting error_reporting = E_ALL ~E_NOTICE but I don't get any errors - even when I've clearly used an undefined variable. What else might need to be set to get PHP to report errors for me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] novice: table design FOREIGN key
tony yau wrote: | Hi All | | Thanks for all your comments on my previous mail, very much appreciated. | I'm stuck again! | I've created the following lookup table for m - m relationship between | a Group and a Contact table. | | CREATE TABLE Group_Contact( | GroupID INT NOT NULL, | ContactID INT NOT NULL, | | Index (GroupID), | FOREIGN KEY (GroupID) REFERENCES Group (PKey) ON DELETE CASCADE, | Index (ContactID), | FOREIGN KEY (ContactID) REFERENCES Contact (PKey) ON DELETE CASCADE | ) TYPE=InnoDB COMMENT='Group to Contact lookup'; | | what do I need to do to ensure only unique (GroupID,ContactID) pair can be | inserted into the table? This question is really a MySQL question. You might want to join their mailing list as you'll get better answers for this type of question there. That said: The easiest way would be to make GroupId, ContactID a unique index. In this case, primary key would be OK. Add the statement Primary Key(GroupID, ContactId), just before the first Index statement. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reprocessing text
I have a site that extracts HTML page code from a database and prints it to the page being generated. A user has requested that I allow this text to be dynamic. I can code process functions for the code that I pull from the database, but it would be so much better if I could simply get PHP to process the text for me. Does anyone know a way to cause this to happen? tia ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Basic PHP/HTML code question
Carlos Palomino wrote: Hi, I have been trying to write or find a pre-written script of a combo-box which would allow one to select a category from one drop-down list, then be given related options within a secondary list before clicking a submit button. Is there anyone who knows where I can find this or an easy way to accomplish this in PHP? Sorry if this is a basic question but I have only begun learning coding PHP so some items are foreign at this point. Thanks for your understanding and any assistance. PHP executes on the server, so you have to send the form to the server. The easiest way I know of to do this is to add onChange=document.formname.submit(); to the select tag (obviously, change formname to the name of the form in question. When the form reloads, use the selected item in the first combo box to select the items to fill the second combo box. ---Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php