Hi all,
Can anyone please tell me why my Debian 6 VPS has three files for php.ini =
/etc/php5/cgi/php.ini
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
Thanks
Hi all,
Can anyone please tell me why my Debian 6 VPS has three files for php.ini =
/etc/php5/cgi/php.ini
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
Thanks
Depends how you're using PHP...
-When you're using it from the command line (CLI), it uses the ini from the CLI folder (/etc/php5/cli/php.ini )
-When it's called from the web server (as it is when you're using a browser), it uses the one in the apache2 folder (/etc/php5/apache2/php.ini)
-When you're using it from the CGI, it uses the ini from the CGI folder (/etc/php5/cgi/php.ini)
Cheers
Ok thanks so these files can have different values? Anyway to change values (eg post_max_size and upload_max_filesize) for my websites would I edit /etc/php5/apache2/php.ini or /etc/php5/cgi as mentioned by my phpinfo.php (screenshot attached)?
Thanks
phpini.jpg
Look for the following entry:
that is basically where your global php.ini file resides on your systemLoaded Configuration File /var/www/vhosts/example.com/etc/php.ini
I've been wondering this pretty much myself. This is specially in linux devices. I don't think they are symbolic links either. So if we make some changes, should the global .ini takes care oto all of them?![]()