.htaccess directive to read single php.ini as it exist in every folder ?

Hi,

I would like to request an assistant.

May i know how to create a .htaccess directive, so that if i placed the php.ini file in /home/user/public_html/php.ini , all file the PHP file will use php.ini configuration from the mentioned php.ini file recursivedly for all folders in public_html .

This is to avoid having many php.ini in every folder inside public_html .

Hope anybody can help me in this issue.

Thank you.

LVL 2
smksaAsked:
Who is Participating?
 
karoldvlCommented:
0
 
karoldvlCommented:
0
 
smksaAuthor Commented:
Hi,

I'm sorry, the reason i would like to do this is due to Apache is run in DSO and not in suphp.

Changing this is not possible as there are many old hosting account inside the used with DSO configuration.

Appreciates of any assistant.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
karoldvlCommented:
I'm afraid with mod_php you have to stick with php_value directive.
0
 
smksaAuthor Commented:
Hi,

If i convert to SUPHP, may i know how to avoid making copies of php.ini on every folder but use only single php.ini in /home/user/public_html/ folder ?

I intent to use .htaccess directive ,  but not sure the directive to put inside it.

0
 
karoldvlCommented:
What kind of settings do you want to change? Maybe going with individual .ini files is not the way to go? Especially, if you're talking about shared environment.
0
 
smksaAuthor Commented:
Hi,

No, because now i'm using suphp environment, every time my client would like to change php.ini setting, he need to put the customized php.ini in every folder in his web directory that having php files .

So i would like to avoid this by creating .htaccess directive that will helps to only place one php.ini in public_html folder and all his php file eventhough in other directory will reads php configuration from the public_html/php.ini file .

0
 
karoldvlCommented:
But why can't your client just use php_value directive in his root .htaccess? Isn't giving him full access to php.ini too much?

See here:
http://php.net/manual/en/configuration.changes.php
0
 
smksaAuthor Commented:
php_value directive  cannot be used in MOD_SUPHP ...

Client must used php.ini to customizes the php directive.
0
 
karoldvlCommented:
You said you don't run suPHP, but mod_php in the first place?
0
 
smksaAuthor Commented:
yeah...it was my mistake.

i was confused in my first response.
0
 
smksaAuthor Commented:
so the actual configuration, i'm using mod_suphp.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.