bachx Posted August 7, 2007 Share Posted August 7, 2007 I'm having trouble finding the php.ini file on my website (It's running a Unix server). I know it's located at /usr/bin/php, but how can I access the /usr/bin/ folder? Do I need shell access? And can that be done through cPanel? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/63688-finding-phpini-on-my-website/ Share on other sites More sharing options...
matto Posted August 7, 2007 Share Posted August 7, 2007 This is a quick and dirty way of doing it <?php //path to php.ini $ini_path = "/etc/php.ini"; echo "<pre>"; system("cat $ini_path"); echo "</pre>"; ?> You will need to change the path to your php.ini Link to comment https://forums.phpfreaks.com/topic/63688-finding-phpini-on-my-website/#findComment-317398 Share on other sites More sharing options...
matto Posted August 7, 2007 Share Posted August 7, 2007 Forgot to mention - if you need to make edits to it then yes you will need shell access (probably as the root user) - not too sure about cpanel.... Link to comment https://forums.phpfreaks.com/topic/63688-finding-phpini-on-my-website/#findComment-317401 Share on other sites More sharing options...
bachx Posted August 7, 2007 Author Share Posted August 7, 2007 I still need to access the original file. The problem is that shell access isn't enabled on my server. Link to comment https://forums.phpfreaks.com/topic/63688-finding-phpini-on-my-website/#findComment-317403 Share on other sites More sharing options...
matto Posted August 7, 2007 Share Posted August 7, 2007 I suppose no matter how you look at - if you need to change the php.ini file you are going to require root user permissions. I would recommend contacting your host provider.... Good luck... Link to comment https://forums.phpfreaks.com/topic/63688-finding-phpini-on-my-website/#findComment-317412 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.