Click to See Complete Forum and Search --> : Invalid command 'php_value'


starkvegas
12-15-2001, 01:11 AM
I have php version 4.06 running on apache.

I recently switched over to the cgi executable from the sapi version of php for windows. When I did, I started getting an Internal Server Error from Apache. I checked my apache error log and this is what I see.

[Fri Dec 14 23:54:24 2001] [alert] [client 127.0.0.1] c:/apache/htdocs/mysql_host/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration


This is what is in my .htaccess file:

php_value include_path ".;c:apache/htdocs/mysql_host/"

It worked fine before I switched to the cgi version and php works with the cgi version when I remove the php_value from my .htaccess file.

My configuration is set to allowoverride all. The strange thing is that I didn't get this error when the sapi modules. I don't want to switch back because I noticed instability using the sapi modules.

Any idea as to what is causing this error.

Randall

mithril
12-15-2001, 04:25 AM
Don't believe you can use the php_value, php_admin_value, php_flag, or php_admin_flad directives if you're runing as CGI. Those are Apache directives, but in CGI mode Apache calls the php binary, which turn reads php.ini. Since the binary doesn't read httpd.conf it has no effect on PHP. As PHP isn't loaded into Apache, Apache doesn't know what to do with the directives and borks. HTH.

-geoff