How to find the correct path of a working php.ini on a cPanel server

To find the correct path of a working php.ini on a cPanel server,Follow the steps below:

  1. Login to the SSH with root user
  2. Use the command as:

php -i | grep php.ini
  1. This will output the path to the php.ini file being used.
If you want to set your website timezone you can easily do it by using php.ini.