View Full Version : How do I edit file (php.ini)

17th March 2005, 08:39 PM
I need to edit the PHP.ini for JFFNMS installation on Core3. Can someone please walk me through how editing is done?

18th March 2005, 07:33 AM
Start with the basics FAQ (http://www.fedorafaq.org/basics/). Open a terminal and become root. (You need to be root to edit this config file.)

Start your favorite editor. Choose one of the following commands:
gedit is a nice graphical editor, while I like the text based simplicity of

Then simply edit the file and save.

18th March 2005, 07:48 AM
Also, instead of hashes <#> being used to comment lines, php.ini uses colons <;>.
So to make a line active, you remove the colon in front of it.

Ignore the brackets...using parentheses with the colon gave me a smiley....

18th March 2005, 01:54 PM
I verified the php.ini exists in /etc, but when i ran the cmd i got this screen output:

[root@www etc]# gedit /etc/php.ini

(gedit:16171): Gtk-WARNING **: cannot open display:
[root@www etc]#

What am I doing wrong?

Thanks in advance,

18th March 2005, 02:03 PM
Are you rsh, telnetting or ssh-ing into your web server to edit this file? Is X running on the server? If you are working from a shell (say you ssh'd into the server), then
su -c "vim /etc/php.ini" will open the file for editting. To edit anything in vim you need to hit the insert key, then edit. When you've finished editting, hit Esc and then you can enter commands to save and quit. You do this by typing a colon followed by wq:
:wq and hitting return. The w means to save and the q means to quit.

You'll need to restart apache for changes to take effect:
su -c "/sbin/service httpd restart" If you are ssh-ing into your server and it is running X then IIRC you can use
ssh -X hostname when you open the connection to enable X-forwarding (-X flag). If X isn't running you won't be able to use software that needs a working X-server like gedit.

18th March 2005, 02:16 PM
Thank you so much!