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

I followed this guide to install PHP 5.3 on my CentOS 5 server:
http://www.webtatic.com/packages/php53/

I have phpMyAdmin extracted in a directory but it says it can't find the mysql extension. Moreover, I know I'll need the mysqli extension for other programs such as Drupal. The guide I followed says that those extensions come with it. When I run php -m it shows both mysql and mysqli though - that's where I'm puzzled.

I restarted apache and still no go. Where do you think my next step is?

phpinfo say my ini is in /etc/php.ini - should I be looking in there for something?

Thanks so much.

share|improve this question
    
Post the Apache's error_log? –  quanta Dec 9 '11 at 15:33
add comment

2 Answers

up vote 2 down vote accepted

I have phpMyAdmin extracted in a directory but it says it can't find the mysql extension.

Make sure that php-mysql is installed:

# yum --enablerepo=webtatic install php-mysql

Don't forget to restart the Apache after that.

share|improve this answer
    
did an rpm -qa and it shows php-mysql-5.3.8-1.w5 installed. I checked to see if they, mysqli and mysql, were enabled in /etc/php.d and they are. Still no luck though. –  user1062058 Dec 9 '11 at 15:32
    
When I do the php -m, it shows the packages at the bottom under [PHP Modules] - but at the top it says PHP Warning: PHP Startup: Unable to load dynamic library 'path to .so' ... it has this error for mysqli.so and mysql.so –  user1062058 Dec 9 '11 at 15:41
    
Does it exist in /usr/lib(64)/php/modules? Did you try to reinstall php-mysql? –  quanta Dec 9 '11 at 15:46
    
They are all in /usr/lib/php/modules/ - but when I cat them, it is just scrambed code. I couldn't cd to /usr/lib(64)/php/modules ... it gave me a syntax error. I didn't reinstall. I yum removed php-* and installed fresh following that guide. The only thing I added was the install php-mysql line you have in your answer. Everything should be fresh, I had php 5.0 on the server before, but I removed that with yum. Thanks for your help so far, I am so confused at this. –  user1062058 Dec 9 '11 at 15:52
    
I just realized that the warnings are saying this directory: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/extensions/no-debug-non-zts-20060613/*.so' If I change those without the /no-debug-non-zts-20060613/ - which has only apc.so and memcache.so, to /usr/lib/php/modules - will that fix my problem? How can I tell php to point there? Am I on the right track or are these directories for different things? –  user1062058 Dec 9 '11 at 15:56
show 5 more comments

Check /etc/php.d for mysql.ini and mysqli.ini as well

share|improve this answer
    
They are both there, they are both enabled. Still no luck though. Thanks for the reply. –  user1062058 Dec 9 '11 at 15:30
add comment

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.