0

I have a server with WHM panel. OS is CentOS. When I put a php.ini in public_html PHP stops reading /usr/local/lib/php.ini.

When I compare results of phpinfo() what I see is;

error_log error_log error_log

becames

error_log no value no value

How can PHP reads master php.ini directives unless I add a directive in local php.ini.

PS: COPPYING MASTER php.ini CONTENT TO LOCAL php.ini IS NOT AN OPTION.

closed as off-topic by HopelessN00b Mar 23 '15 at 21:52

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

1

The short answer: you can't:

https://stackoverflow.com/questions/1391808/how-do-i-include-a-php-ini-file-in-another-php-ini-file

However, you can put php ini directives into an .htaccess file:

http://php.net/manual/en/configuration.changes.php

Or use ini_set function within your application itself:

http://php.net/manual/en/function.ini-set.php

  • I know but my suPHP doesn't let me to use php_value in .htaccess – borayeris Jan 30 '15 at 19:31
  • Any luck with "ini_set" in your app? I've used this extensively to develop apps that try to be compatible with various hosting environments. – Dan Armstrong Jan 30 '15 at 20:08
  • Dan my problem is when my customer puts a php.ini in his folder I want master directives are still active. – borayeris Feb 2 '15 at 0:20
  • I, too, wish this were possible. When I update our default php.ini configs, I manually look through all custom php.ini files to apply my changes, if they are not in conflict with any client customizations. Tedious indeed. I hope you find an answer for both of us. – Dan Armstrong Feb 3 '15 at 0:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.