To specify an alternate php.ini file, you’ll need to use the -c flag in your PHP command line.
For example:
php -c /home/username/public_html/php.ini /home/username/public_html/myscript.php
In this instance, /home/username/public_html/php.ini is the full path to the php.ini file you’d like to use and /home/username/public_html/myscript.php is the full path to the php script you’d like to run. Using your actual username, change the path to the php.ini and the file you intend to run accordingly.
Note: Your home directory may be home1, home2, home3, etc.