To find the correct path of a working php.ini on a cPanel server/VPS you need to follow the steps below:

Login to the SSH with root user
Use the command as:

HTML Code:
php -i | grep php.ini