Custom php settings for a specific php file under document root - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: General discussion (/forum-11.html) +--- Thread: Custom php settings for a specific php file under document root (/thread-5294.html) |
Custom php settings for a specific php file under document root - pongraczi - 12-30-2008 10:14 PM Hi, I have a directory here: /var/www/virtual/my.domain.tld/htdocs/application I have a php.ini file under that location, which set mbstring.func_overload = 7 globally for this directory in runtime. It is working well. I would like to make an exception for a specific file, called rpc.php in the same directory, with this value: mbstring.func_overload = 0 So, due to that php runs as cgi, using fcgid, the normal way is not working. Apache config: Code: <Location /application/rpc.php> Code: mbstring.func_overload = 7 So, I googled around but I did not find the solution for my problem. I would like to know, is there a way to make this kind of exception for a specific php file? Thank you, István Hmmm, it seems, the global php.ini settings are permanent, so, I cannot rewrite these settings in a new php.ini file under a directory, to change the setting for the specific directory.... In other words: php does not care, what I write into /var/www/virtual/my.domain.tld/htdocs/php.ini Is there a working way, how to use different settings for directories/files? RE: Custom php settings for a specific php file under document root - simple - 12-30-2008 10:59 PM mbstring.func_overload is of type PHP_INI_PERDIR and cannot be set for a single file, nor can it be overridden by ini_set(). Sorry, with a standard install you cannot or should not be able to do this. regards Markus RE: Custom php settings for a specific php file under document root - pongraczi - 12-30-2008 11:02 PM Thank you very much for your help! That was I am afraid of. I read this somewhere else. I do not want to change back to mod_php, so, it seems, I have to drop out this application/feature. Thanks again! Cheers, István |