movealong Posted June 14, 2006 Share Posted June 14, 2006 ive been told i need to access my php.ini file via ssh to edit a setting.i can log into my ssh and i get a basic white page with the following textroot@server [~]#im guessing i need to type a command in to access my php.ini file. could anyone tell me how. thanks :) Link to comment https://forums.phpfreaks.com/topic/12029-editing-phpini-with-ssh/ Share on other sites More sharing options...
trq Posted June 15, 2006 Share Posted June 15, 2006 Do you know where it is? This might take a bit otherwise.More than likely it is in /etc/php. What do you see when you issue...[code]ls -l /etc/php[/code]? Link to comment https://forums.phpfreaks.com/topic/12029-editing-phpini-with-ssh/#findComment-45772 Share on other sites More sharing options...
Koobi Posted June 15, 2006 Share Posted June 15, 2006 put this file on your host:[code]<?php phpinfo (INFO_GENERAL);?>[/code]now view it via http. that should indicate where php.ini is.using ssh, you can edit it. i know vim or vi exists on every *nix machine but vim is weird to use for a first time user. there's also the nano editor but i don't think it comes on every *nix installation.once you make the changes, you have to restart apache for the changes to take place. Link to comment https://forums.phpfreaks.com/topic/12029-editing-phpini-with-ssh/#findComment-45794 Share on other sites More sharing options...
trq Posted June 15, 2006 Share Posted June 15, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]i know vim or vi exists on every *nix machine[/quote]Not necessarily, but most likely.vim is easy to use, once youve found the file type.[code]vim /pathtofile[/code]Push enterThis will open the file. Type...[code]:set nocompatable[/code]Push enterThis turns vi mode off. Hit [i]i[/i], this puts vim into editor mode. Edit the file, then once your finished hold down Ctrl and hit z twice.Restart apache. More than likely by typing...[code]/etc/init.d/apache restart[/code] Link to comment https://forums.phpfreaks.com/topic/12029-editing-phpini-with-ssh/#findComment-45922 Share on other sites More sharing options...
Koobi Posted June 15, 2006 Share Posted June 15, 2006 [!--quoteo(post=384205:date=Jun 15 2006, 08:54 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 15 2006, 08:54 PM) [snapback]384205[/snapback][/div][div class=\'quotemain\'][!--quotec--]Not necessarily, but most likely.[/quote]as far as i've heard, its the standard editor for any OS qualified to be called a UNIX by the Open Group Base Specifications of IEEE. but i might be mistaken, i only know what i've read :) Link to comment https://forums.phpfreaks.com/topic/12029-editing-phpini-with-ssh/#findComment-46043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.