Orionsbelter Posted May 23, 2008 Share Posted May 23, 2008 Hi i want to change display_errors to On, on my sever the path os /etc/php.ini i'm using ssh to connect but don't know how to access to this file and then change the file please help. thanks Link to comment https://forums.phpfreaks.com/topic/106894-help-shh-commands/ Share on other sites More sharing options...
gamefreak13 Posted May 23, 2008 Share Posted May 23, 2008 You'll need to download PSFTP and login with your SSH login info. From there you can use the proper commands to get/put the files to/from the server. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html You can use the following code at the top of your script as an alternative. This acts the same as setting the php.ini setting, but is on a per-script basis. ini_set('display_errors', 1); And then also add this.. error_reporting('E_ALL'); Link to comment https://forums.phpfreaks.com/topic/106894-help-shh-commands/#findComment-547920 Share on other sites More sharing options...
Orionsbelter Posted May 23, 2008 Author Share Posted May 23, 2008 i just get this [admin@ip-68-178-248-83 ~]$ ini_set('display_errors', 1) -bash: syntax error near unexpected token `'display_errors',' Link to comment https://forums.phpfreaks.com/topic/106894-help-shh-commands/#findComment-547922 Share on other sites More sharing options...
gamefreak13 Posted May 23, 2008 Share Posted May 23, 2008 Heh, you don't enter that in to the SSH prompt. You enter it at the top of your PHP script. I gave you two methods. The first one is where you download PSFTP and use the command GET (e.g. "get php.ini") and PUT (e.g. "put php.ini") to download/upload the php.ini file. Note that you have to move to the directory the file is in before executing this. When you "GET" the file, it will be downloaded to the same folder the psftp.exe program is on your computer. Open it with notepad, edit it, save it. Then use "PUT" and it will upload the file. Editing the php.ini file changes the setting server-wide. The second one.. you add a small code and it turns the feature on for that script. Adding this to your script changes the setting for the script it is added to only. Link to comment https://forums.phpfreaks.com/topic/106894-help-shh-commands/#findComment-547925 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.