I tried different solutions suggested here, but still cannot find the file through cPanel on my live server.
I’m running
phpinfo();
And getting this result:
Configuration File (php.ini) Path /opt/alt/php56/etc
I cannot find these folders: /opt/alt/php56
But I could find the etc folder, however the file is not there, and I made sure I checked “View hidden files” options
What else could be done?
4
Answers
enter in your server comand line:
php -i
to see all of your php’s config and also in very first lines of this command output, location of your php.ini if you can’t find file likephp.ini
in your output which may not happen make one withtouch
command and put your configuration in that file and reload server, depend on what you use (like fpm or …).try:
it will print all config files locations
Try this command and find the path of PHP
In WHM go to Software >> MultiPHP INI Editor and edit php.in for your PHP version.
OR edit: /usr/local/lib/php.ini