skip to Main Content

I tried make changes to the php.ini file. At first I could not find the php.ini file.

I can check phpinfo(). There it is shown:

opt/cpanel/ea-php55/root/etc/php.ini

But in the etc directory there isn’t any file. I can add a php.ini file in that place, but there are no changes.

2

Answers


  1. You can try with the below given steps:

    1. Log in to cPanel.

    2. File Manager in the cPanelFind the File Manager in the File section of cPanel. Review our tutorial on using the Code Editor within the File manager if you’re looking for information on how to use it.

    3. Navigate to the directory where you will either save or edit the PHP.INI file and then select the file and use the Code Editor. To open the file, you can click on it to select the file and then click on the Code Editor icon in the menu bar of the File Manager.

    4. You can also right-click with your mouse and select Code Editor from the menu that appears.

    5. Edit the section of the PHP.INI that you wish to change.
      Click on SAVE CHANGES in the top right hand corner in order to save your modifications or additions to the file.

    Login or Signup to reply.
  2. If you are on cPanel/WHM, I recommend you to not mess with the actual php.ini file, but set the values of php.ini manually in the code.

    You can use the PHP function named ini_set() to change the values for a specific application or the PHP file. For example, if I want to set the Display_errors to On in php.ini, I can do that by writing ini_set('display_errors','1'); and that’s all!

    However, if you want to change the values for all the applications working on the same server, you can edit the PHP.INI file using File Manager of cPanel for sure! You can navigate to the path given using File Manager. But I don’t recommend editing php.ini.

    You can add ini_set function in your configuration file and it will work on the whole application!

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