skip to Main Content

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


  1. 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 like php.ini in your output which may not happen make one with touch command and put your configuration in that file and reload server, depend on what you use (like fpm or …).

    Login or Signup to reply.
  2. try:

    php --ini
    

    it will print all config files locations

    Login or Signup to reply.
  3. Try this command and find the path of PHP

    which php
    
    Login or Signup to reply.
  4. In WHM go to Software >> MultiPHP INI Editor and edit php.in for your PHP version.

    OR edit: /usr/local/lib/php.ini

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search