how to edit php.ini of root folder?

Avatar
  • updated
  • Answered

I am using shared hosting and I want to enable allow_url_fopen = On in php.ini. When I enable it from cpanel MultiPHP ini editor but its only affect to particular folder and I want to add allow_url_fopen = On in root php.ini because my composer take value of 'allow_url_fopen' from root php.ini. 

Thanks.

Pinned replies
Avatar
JT S.
  • Answer
  • Answered

Hello and thanks for contacting us. That php.ini.off file is likely a backup file that makes no changes to anything. You can verify this by checking what php.ini file (and file path) is being used from your phpinfo.php file.

Avatar
Arnel C
  • Answered

Hello Kalpit Tandon,

Thanks for your question about editing the root php.ini file.  Shared hosting provides you the ability to edit the php.ini for your specific account.  If you don't see a php.ini file in the root of your website folder, then you can go to the multiphp INI editor (in the cPanel) and then click on apply after determining your settings. It will then write a PHP.INI file to your folder.  You can then manually edit the file using the cPanel file manager.  And you can add your setting in the file.  You can also copy that file where you need it. 

I hope this helps to answer your question. If you need further assistance, please let us know!

Kindest regards,
Arnel C.

Avatar
JT S.
  • Answer
  • Answered

Hello and thanks for contacting us. That php.ini.off file is likely a backup file that makes no changes to anything. You can verify this by checking what php.ini file (and file path) is being used from your phpinfo.php file.