LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making changes to php.ini using SSH client (https://www.linuxquestions.org/questions/linux-newbie-8/making-changes-to-php-ini-using-ssh-client-565817/)

goldfox 07-01-2007 10:19 AM

Making changes to php.ini using SSH client
 
Hi,
I would like to know if its possible to make changes to php.ini by using the command line. If so can anyone show an example how to change default settings to:
upload_max_filesize = 100M
post_max_size = 100M

fatzeus 07-01-2007 10:38 AM

Of course it's possibile, just use a text editor that works in console.
Vim, nano and pico are the most popular. If you've never used one i suggest you nano or pico because Vim is a great product but difficult at first.

So, for example with nano, just open the file like this:
#nano /etc/php.ini (of course with correct path)
Made your changes and save the file (CTRL+O i think, but it's written)

goldfox 07-01-2007 12:13 PM

Quote:

Originally Posted by fatzeus
Of course it's possibile, just use a text editor that works in console.
Vim, nano and pico are the most popular. If you've never used one i suggest you nano or pico because Vim is a great product but difficult at first.

So, for example with nano, just open the file like this:
#nano /etc/php.ini (of course with correct path)
Made your changes and save the file (CTRL+O i think, but it's written)

Do I need to download text editor, if so do you have link?
here is what I have so far.

[root@readyweb ~]# pico /usr/local/lib/php.ini
-bash: pico: command not found
[root@readyweb ~]# nano /usr/local/lib/php.ini
-bash: nano: command not found
[root@readyweb ~]#

fatzeus 07-01-2007 12:39 PM

Maybe try also vi just to see if it's installed:
#vi -h
In that case you can find lots of guide to use it (open and save is not a lot difficult).
If you don't have it you can get nano here:
http://www.nano-editor.org/
Of course if you are using distros like Debian,Gentoo,Ubuntu and so on the packet manager will install it for you without going to the site.

chrism01 07-02-2007 02:28 AM

vi is pretty much the default editor for *nix style systems. It's been around for yrs before things like nano or pico or even vim ..
give it a shot.


All times are GMT -5. The time now is 07:48 AM.