Current time: 11-30-2024, 02:55 PM Hello There, Guest! (LoginRegister)


Post Reply 
Custom php settings for a specific php file under document root
Author Message
pongraczi Offline
Junior Member
*

Posts: 80
Joined: Jul 2008
Reputation: 2
Post: #1
Custom php settings for a specific php file under document root
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>
Order allow,deny
Allow from all
php_value mbstring.func_overload 0
</Location>
php.ini content under the directory:
Code:
mbstring.func_overload = 7
<Location /application/rpc.php>
Order allow,deny
Allow from all
mbstring.func_overload = 0
</Location>

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?
(This post was last modified: 12-30-2008 10:52 PM by pongraczi.)
12-30-2008 10:14 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Custom php settings for a specific php file under document root - pongraczi - 12-30-2008 10:14 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)