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.

Duplicates 2
Can you update a value in the php.ini file on my server to prevent exposing the systems running my website?

I would like to change the value:
expose_php = On

to

expose_php = Off

In the php.ini file located at /opt/imh/imh-php72/root/usr/lib/php/php.ini on my server. This is unnecessarily exposing the php and apache versions that my website runs on, and as a Cyber Security Firm, I can't allow that. Can you update this value for me?

I want to edit my php.ini file. I see a file named "php.ini.off". What is that?
Pinned replies
Avatar
anonymous
  • 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
IMH Support Agent 2
  • 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
anonymous
  • 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.