Forum Moderators: coopster

Message Too Old, No Replies

Apache and php flags

using .htaccess?

         

jehoshua

9:04 am on Mar 26, 2011 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi,

Is it true, that with php 5.3.0 , I will be able to use .htaccess to set php flags ?

The server I use has php running as CGI, so I can't use .htacess to modify php settings.

Am using version 5.2.10 , and modifying php.ini is out of the question, as it only changes the values in the path where the modified file is.

Thanks,

J

jehoshua

9:42 am on Mar 28, 2011 (gmt 0)

10+ Year Member Top Contributors Of The Month



Anyone please ?

Or, should this be in the Apache forum ?

J

coopster

12:47 pm on Mar 28, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hi jehoshua, here is the resource you need from the PHP Installation/Configuration manual pages, .user.ini files [php.net]

Be sure to read the pages linked in the left hand menu there too, they are loaded with information that will help you accomplish the task at hand.

jehoshua

11:54 pm on Mar 28, 2011 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi coopster, thanks very much for the link. I did test by adding a 'php_flag' to .htaccess , and I got a 500, as would be expected with CGI.

From prior testing with modifying php.ini (my own copy in web root), it only applied those settings in _that_ path, which is a real pain when there are many php scripts in different paths. I also tried 'ini_set' and it wouldn't propagate. :)

Anyway, I will read the info you have supplied, and see how that goes.

Thanks,

J