Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

new to PHP. Installed WordPress (currently running latest version), and noticed I couldn't manipulate image sizes in the WP admin. Googling suggested that I needed GD installed.

I'm on a CentOS VPS that's only running my blog. While I would rather not crash it, I do take some risks in trying to learn.

First thing I did was yum install php-gd, which gave me:

Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-gd-5.1.6-27.el5_5.3.i386 (base)

I had then found a link (and I'm sorry, but I can't find it again) that suggested doing:

rpm -e --justdb --nodeps php-common

Did that, and then did yum install php-gd again. This time it worked (w00t!).

But when I do a php -m, I get:

PHP Warning: PHP Startup: dbase: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20090626 These options need to match in Unknown on line 0

I've restarted Apache, and I see the same error in error_log during startup.

Unfortunately I'm a bit out of my league at this point. Well, I have been, but up until now have been willing to swing wildly at anything. Hope I've given enough information (and not too much). If anybody has any thoughts, I'd appreciate hearing 'em. What can I do at this point to get GD running properly?

Ah, one last bit... php --version gives me:

PHP Warning: PHP Startup: dbase: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20090626 These options need to match in Unknown on line 0 PHP 5.3.6 (cli) (built: May 16 2011 19:18:00) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

share|improve this question
    
UPDATE: I've now done a yum remove php-gd, restarted Apache, and still see the same behavior :\ –  charliegriefer Jul 19 '11 at 4:37

1 Answer 1

up vote 1 down vote accepted

You've broken something. It looks like you've installed parts of PHP from CentOS 6, and other parts from CentOS 5 -- either an upgrade gone terribly, terribly wrong, or you've added some yum repositories that you really shouldn't have.

You can either spend a awful long time trying to pick apart the pieces and put it back together again (and possibly end up with a system that's subtly broken forever), or just bulldoze it and get a new one -- and this time, whatever you did to break it, don't. If you're not running anything in production on the system yet, I'd definitely go the latter.

And a protip: anything that involves forcing your package manager to do something it doesn't want to (like using rpm --nodeps) isn't something you should be doing without adult supervision. Like the man says, "don't try this at home!"

share|improve this answer
    
Thanks... it's technically production, but it's all personal sites that are mine. Just moved to CentOS from Windows, and from a ColdFusion based blog to WordPress. Using it as a learning experience (and I certainly have been). Would probably like to go the bulldoze method. Any good links you can share for steps to do it "properly"? –  charliegriefer Jul 19 '11 at 4:41
    
I don't do a lot of CentOS, and I really don't know what you're actually trying to do (especially the point you're starting from). Best to ask a separate SF question describing exactly what you're trying to do (making it clear that you've done your homework first). Someone will come up with the goods. –  womble Jul 19 '11 at 4:51
    
Thanks again. Doing the homework as we speak :) –  charliegriefer Jul 19 '11 at 4:53
    
... and Googling has brought me back here :D –  charliegriefer Jul 19 '11 at 5:34
    
You wouldn't believe how many times I've gone to look for an error message someone's put in a Server Fault question so I can help answer their question, and the first search result is the question I'm trying to answer... homework's more than just reading on Google, though, it's experimenting, trying things out, reading honest-to-goodness product manuals, all the boring-but-important parts of a professional sysadmin's job. –  womble Jul 19 '11 at 5:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.