php.ini and .htaccess not working for php parameters

From: Date: Wed, 08 Nov 2006 22:14:59 +0000
Subject: php.ini and .htaccess not working for php parameters
Groups: php.general 
Request: Send a blank email to php-general+get-244408@lists.php.net to get a copy of this message
I've setup a few directories under my dev server's webroot...one for each project. Under each project directory, I put php.ini files to set parameters such as include_path. For some reason they are not taking effect. Do I have to enable them somehow? phpinfo() tells me that Server API is Apache, so that means PHP is running as a module not as CGI right? So php.ini only works with PHP running as CGI? I tried to use an .htaccess file instead and that didn't work either. In my httpd.conf I have set Options All AllowOverride All Before, when I was using php.ini, i was getting an error from my include command...basically saying that it couldn't find the file. Now that I'm using the .htaccess, I don't see any PHP errors, I put some print statements just to see where things go wrong. include ('class.datetime_utility.php'); print "hello"; //shows up $dd = new datetime_utility(); print "hello"; //doesn't show up!!! What's happening here? (In the past, I just modified the include_path of the main php.ini and this doesn't seem like a flexible solution. I want to localize the settings in separate php.ini files for each project, so that when I have to deploy to production, I can also deploy the php.ini with minor adjustments.) -James

« previous php.general (#244408) next »