How can I get access to my PHP Configuration file: php.ini?
I get this message at the top of the "PHP Configuration" utility in my CPanel:
"These PHP configuration settings are customizable by the server administrator. They are listed for reference only."
I have a VPS hosting account. I would like to know where this php.ini file is for each domain or how to locate the central one, if there is one. I am not aware of any FTP access/File Management for the root folder of all domains hosted using the VPS package. Access to this area of my account would be very helpful if this is where the php.ini information is stored. Thank you.
"These PHP configuration settings are customizable by the server administrator. They are listed for reference only."
I have a VPS hosting account. I would like to know where this php.ini file is for each domain or how to locate the central one, if there is one. I am not aware of any FTP access/File Management for the root folder of all domains hosted using the VPS package. Access to this area of my account would be very helpful if this is where the php.ini information is stored. Thank you.
On all our servers, the directory specific php.ini (Not the global php.ini for the server) is placed in the public_html folder. This php.ini can be copied and placed in whatever directory you want to make directory specific php configuration changes.
When placing a php.ini in a specific directory, you will need to make that php.ini recursive so the changes will work for all the subfolders from that location. Please see the following url for "How can I make my php.ini file recursive ?"
https://www.inmotionhosting.com/support/website/general-server-setup/recursive-php-ini
If for whatever reason you do not have a php.ini file in your public_html folder, you can try restoring the file through shell by doing the following (VPS and Dedicated servers only).
1. SSH into your server
2. Navigate to your cpanel user where you need the php.ini restored.
3. use the following command
cp /usr/local/lib/php.ini public_html
This will restore the php.ini to that specific cpanel acount public_html directory. If you can't restore the php.ini through shell, then you will need to contact support for our tech staff to restore it. You can email them at [email protected] with the request or contact them through the chat system and they can restore the php.ini ASAP.
For further information on "How to update your local php settings" please see the following link.
https://www.inmotionhosting.com/support/website/general-server-setup/update-local-php-settings
If you have any further questions please post them below.
Take Care!
James R