Take the 2-minute tour ×

In .htaccess I've added

php_value session.name "SID"

This seems to have no effect, however, and no errors are thrown in error_log. Other rewrite rules in the same .htaccess file are working as expected.

Why isn't htaccess following this php_value directive? And is there a way to test if php_values or php_flags are being used?

PHP 5.3.8 is running as an Apache 2.2.21 module, not CGI.

UPDATE: Adding php_value session.name "SID" to default-server.conf works as intended. I'm still not sure how this doesn't work in the .htaccess though. In default-server.conf I have 'AllowOverride All' and 'Options All' (for testing this).

share|improve this question
Does setting other php_values work in the .htaccess file? Can you verify by having a page display the output of phpinfo() ? –  becomingwisest Jan 11 '12 at 0:05
Could you suggest a php_value to test for? What should I verify via phpinfo? –  Isius Jan 11 '12 at 0:19

1 Answer 1

up vote 2 down vote accepted

It turns out I am using virtual hosts but was editing my default-server.conf file. Once I realized this and edited the correct file in the vhost.d directory the php_value setting was picked up from the .htaccess file as expected.

share|improve this answer

Your Answer


