php.ini and .htaccess not working for php parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux