1

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.

1
  • Post the Apache's error_log?
    – quanta
    Dec 9, 2011 at 15:33

2 Answers 2

2

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.

10
  • 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. Dec 9, 2011 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 Dec 9, 2011 at 15:41
  • Does it exist in /usr/lib(64)/php/modules? Did you try to reinstall php-mysql?
    – quanta
    Dec 9, 2011 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. Dec 9, 2011 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? Dec 9, 2011 at 15:56
0

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

1
  • They are both there, they are both enabled. Still no luck though. Thanks for the reply. Dec 9, 2011 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .