This is a discussion on php.ini within the PHP General forums, part of the PHP Programming Forums category; I'm trying to turn off magic quotes for a site. I've copied the php.ini from /etc/php5/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
I'm not sure PHP5 would read php.ini from that directory.
You should take in account that your hosting company may _NOT_ allow you to change certain parameters. That said, try visiting http://us2.php.net/configuration.changes and see how that works for you. Good luck On Fri, May 9, 2008 at 4:47 PM, Michael Satterwhite <michael@weblore.com> 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 > > |
|
|||
|
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 |
|
|||
|
phpinfo() should also tell you what php.ini is loaded.
Did you check that? Atenciosamente, www.softpartech.com.br Thiago Henrique Pojda Desenvolvimento Web +55 41 3033-7676 thiago.pojda@softpartech.com.br Excelência em Softwares Financeiros -----Mensagem original----- De: Michael Satterwhite [mailto:michael@weblore.com] Enviada em: sexta-feira, 9 de maio de 2008 13:47 Para: php-general@lists.php.net Assunto: [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 |
|
|||
|
And, at some hosts you have to change the settings in htaccess as opposed to
php.ini. On Fri, May 9, 2008 at 12:53 PM, André Medeiros <andre.caum@gmail.com> wrote: > I'm not sure PHP5 would read php.ini from that directory. > > You should take in account that your hosting company may _NOT_ allow > you to change certain parameters. That said, try visiting > http://us2.php.net/configuration.changes and see how that works for > you. > > Good luck > > On Fri, May 9, 2008 at 4:47 PM, Michael Satterwhite <michael@weblore.com> > 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 > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > |
|
|||
|
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 You have to set it in your main php.ini, the one shown in phpinfo() or set it in a .htaccess in the web dir if permitted. You can't just copy a php.ini into a dir and expect php to use it. -Shawn |
![]() |
| Thread Tools | |
| Display Modes | |
|
|