LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2012, 05:56 AM   #1
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Rep: Reputation: Disabled
GD library installed - should I be editing my php.ini file?


Sorry for the dumb question, I've searched and could find an answer.

I have a dedicated Linux server with CentOS 5.x 32-bit + Plesk v9.x

I am running some wordpress sites that need to run timthuumb.php script to manage thumbnail images. The script is not running properly as I beleiev I need to have the GD library installed on my server.

According to this information http://www.aretimes.com/are-support/faq/109.htmlI need to edit my php.ini file and to comment out "extension=php_gd2.dll" to install the GD library.

I know my php.ini file is located
# etc/php.ini
I have tried the following command to edit the php.ini file
# vi php.ini

but all I get is a blank screen with INSERT at the foot, where I was expecting the list of what was included in the php.ini file?

Can anyone help me with instructions to follow on the correct way of doing this please?

thanks and sorry for the long winded question
 
Old 03-08-2012, 06:52 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,671

Rep: Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562
Hi,

If you used your package manager to install pph-gd, it should have taken care of php.ini and the other relevant php config files.
Anyway, if you want to edit php.ini, you can use vim, nano, or gedit, whatever editor you're familiar with

Regards
 
Old 03-08-2012, 07:01 AM   #3
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

If you used your package manager to install pph-gd, it should have taken care of php.ini and the other relevant php config files.
Anyway, if you want to edit php.ini, you can use vim, nano, or gedit, whatever editor you're familiar with

Regards
thanks @bathory, but maybe you've misunderstood, I am not familiar with any editor.

I was looking for specific instructions on how to open my php.ini file so I could edit it (specifically to comment out
extension=php_gd2.dll)in puTTY which I believe is the issue I have. (as timthumb.php functionality does not run)

problem being that I run a dedicated server without support, so can't open a ticket to request doing it, so step be step instructions would be most helpful
 
Old 03-08-2012, 07:22 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,671

Rep: Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562
As I've told you, if you used yum (Centos package manager) to install the php-gd package, there is no need to worry about php.ini.
You can run from the putty terminal
Code:
 php -i|grep GD
to verify if the gd library is installed
Note that you need to restart your webserver (I guess it's apache) to enable php-gd.

Anyway if you insist to edit php.ini, make a backup first and then use nano, that is easier than vi. Write (as root) in putty
Code:
nano php.in
You'll see at the bottom the various keys that you can use. For more details take a look at this tutorial

Regards
 
Old 03-08-2012, 07:26 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,474

Rep: Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228Reputation: 3228
# 3

First : You will not see any GD work, if "php-gd" isn't installed.
# yum install php-gd


Editing a file, that's owned by root :
1) su
2) gedit <path-to-file>/php.ini

( If you never edited one before, may be you shouldn't ? )

.
 
Old 03-08-2012, 08:06 AM   #6
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
thanks again for your reply... I tried your first suggestion and ran

# php -i|grep GD

from the root

I then restarted the server (you're correct it is apache) but I can't see any evidence that it has done anything other than my website which still does not show the thumbnails that should appear with GD support?

would you suggest anything else?
 
Old 03-08-2012, 08:17 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,671

Rep: Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562
Are you sure you've installed it. Run
Code:
yum install php-gd
and see what you get
 
Old 03-08-2012, 08:22 AM   #8
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks again for your help....

I ran the yum install, and got the following, I won't pretend I know what it means, but there maybe an issue with missing dependencies?

any advice would be much appreciated, thanks

Code:
]# yum install php-gd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirror01.th.ifl.net
 * extras: mirror.sov.uk.goscomb.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-gd
--> Finished Dependency Resolution
php-gd-5.1.6-32.el5.i386 from base has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-gd-5.1.6-32.el5.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-gd-5.1.6-32.el5.i386 (base)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
 
Old 03-08-2012, 08:32 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,671

Rep: Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562
What gives
Code:
rpm -qa|grep php-common
If it isn't installed you can install it the same way:
Code:
yum install php-common
 
Old 03-08-2012, 08:47 AM   #10
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
mmmh....not sure what to make of this, stating that php-commom already is installed?

Quote:
# yum install php-common
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirror01.th.ifl.net
* extras: mirror.sov.uk.goscomb.net
Setting up Install Process
Package matching php-common-5.1.6-32.el5.i386 already installed. Checking for update.
Nothing to do
just to check, I restarted apache and inspected my website and still no change.

sorry, I know how frustrating this must be for you? is there anything else I could try?
 
Old 03-08-2012, 09:03 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,671

Rep: Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562
Huh. I guess you've installed php (php-common) from a different repository than the one you're trying to install php-gd.
You can uninstall the packages related to php and then use yum to install them all together along with php-gd
 
Old 03-08-2012, 09:27 AM   #12
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
dear me, now that sounds a bit scary!

thanks for your help today, I really do appreciate it

would you know of a tutorial on how to do what you suggested?

regards
 
Old 03-08-2012, 10:44 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,671

Rep: Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562Reputation: 1562
OK, don't uninstall anything. I guess this happening because of plesk.
Take a look at the last post here. If it doesn't help on your situation, go into their forums and ask for support.

Regards
 
Old 03-08-2012, 10:54 AM   #14
paul1107
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks@bathory your help is much appreciated,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What to restart after editing php.ini? newlinuxnewbie Linux - General 4 10-08-2013 03:15 PM
Package for php.ini file bkcreddy17 Programming 3 05-30-2008 04:45 PM
PHP won't recognize my Configuration File (php.ini) path kriezo Programming 4 02-14-2008 02:31 AM
editing a php.ini file ilustrate Linux - General 4 07-13-2005 12:16 PM
editing PHP.INI file question hct224 Linux - Newbie 1 10-31-2003 10:05 AM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration