1

Using this simple script (<?php phpinfo(); ?>) reveals me that my php.ini file is located in /etc/php7/php.ini folder.

However, my hosting company's master ftp user account does not have an access to /etc/php folder. I searched the folder name few hours but nothing like it.

How do you guys normally access to this /etc/php folder from your hosting company to access php.ini file?

Is there any easy way to access this /etc/php folder? or phpmyadmin panel can help me to change anything I want in php.ini file?

  • 1
    FTP accounts are not normally given root access since they're considered insecure and often abused. Shared hosting accounts won't have root access either. On a VPS or dedicated server, you'll need SSH or SFTP with root access to change directories to /etc. On shared hosting accounts that use control panels like cPanel however, php.ini may be located locally in each user account so that users will be able to edit it even with a file manager - see this. In that case, you'll need to restart the PHP instance after each edit. – dan Apr 5 at 6:13
  • 1
    Thanks your reply is helpful. I contacted my hosting provider. Indeed you are correct. They said that shared hosting does not have an access to php.ini file as well as root folder. However, you have pointed out that other company provide access to php.ini file from cPanel. I guess I need to consider to change my hosting provider. – auto9817 Apr 5 at 11:52
2

Generally, In Shared Hosting you are not allowed to change php.ini file. But many hosting providers allows to change such parameters of php.ini file through Control Panels like cPanel / Plesk / etc.

Also some of them allow limited SSH access to the files and server, you can try whether it helps or not.

Best way is ask your hosting provider about the possibilities. Most of them are flexible with this kind of requirements.

  • 1
    Great confirmation from Dan's reply. Thanks. – auto9817 Apr 8 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.