php.ini

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/...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-09-2008
Michael Satterwhite
 
Posts: n/a
Default 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
Reply With Quote
  #2 (permalink)  
Old 05-09-2008
André Medeiros
 
Posts: n/a
Default Re: [PHP] php.ini

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
>
>

Reply With Quote
  #3 (permalink)  
Old 05-09-2008
Michael Satterwhite
 
Posts: n/a
Default 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



Reply With Quote
  #4 (permalink)  
Old 05-09-2008
Thiago Pojda
 
Posts: n/a
Default RES: [PHP] php.ini

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




Reply With Quote
  #5 (permalink)  
Old 05-09-2008
Adam Richardson
 
Posts: n/a
Default Re: [PHP] php.ini

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
>
>


Reply With Quote
  #6 (permalink)  
Old 05-09-2008
Shawn McKenzie
 
Posts: n/a
Default Re: php.ini

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
Reply With Quote
  #7 (permalink)  
Old 05-09-2008
Michael Satterwhite
 
Posts: n/a
Default 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.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:27 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0