global php.ini settings

2 posts / 0 new
Last post
#1 Sat, 02/23/2013 - 12:16
edwardsmarkf

global php.ini settings

hello all -

whats the best way to have a default 'include_path' value put into all new php.ini files? is it just a simple brain-dead matter of editing the "global" /etc/php.ini file?

or perhaps i should be asking whats the best way to have a global php library referenced and available to all php scripts in any virtual-server?

i created my own /usr/local/lib/php directory and i want all virtual-servers to have access to it.

i did issue this command to fix all existing php.ini files based on an earlier post:

find  /home/ -name  php.ini  -exec    \
sed -i  -e   's?^;include_path = ".:/php/includes"?include_path = ".:/usr/share/pear:/usr/share/php:/usr/local/lib/php"?'  {}  \;

thoughts?

Sun, 02/24/2013 - 23:32
andreychek

Howdy,

whats the best way to have a default 'include_path' value put into all new php.ini files? is it just a simple brain-dead matter of editing the "global" /etc/php.ini file?

The /etc/php.ini file is used as a template for all new domains.

So anything you put in that file will be copied out to any new system.

OTOH, every existing php.ini file will look at each .ini file in /etc/php.d. You could put parameters that should be active for every domain into a file in there.

-Eric

Topic locked