• Resolved roger.bankes

    (@rogerbankes)


    I have searched this forum extensively and the web, and although those results covered a variety of issues, some needing to be fixed, I still get this error message.

    I found that most of those error reports were for Windows installs, but this install is onto a CentOS 5 64-bit server (VPS) that is not running a Control Panel (did away that and went barebones). I did find that I needed to install PHP5-MySQL and the server has since been rebooted.

    MySQL is running and test.php was successful.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Exactly what the error says. Only one thing causes that error. Your php.ini doesn’t have the mysql line uncommented.

    Thread Starter roger.bankes

    (@rogerbankes)

    I saw reference to that before but it was for Windows installs. I have a test page that runs phpinfo()… if php.ini wasn’t being initiated wouldn’t that test page fail? As it is, it produces an extensive report.

    Otherwise which line is is it needs uncommenting and what should it look like?

    If you’re going to run a linux box without a cpanel, time to learn stuff. php.ini can be inited and php can be live without many extensions. Look in your php.ini at all the extensions and parameters. For MySQL, find “extension=mysql.so” and “extension=mysqli.so” and uncomment them.

    Be sure MySQL is running, too.

    “php -version” will return your current installed version of php.

    The CentOS php extension directory is /usr/lib/php/modules

    See if mysql.so is there.

    If not, then try: “yum install php-mysql” or if you installed the optional php53 package, then use “yum install php53-mysql”

    …and see what the terminal returns.

    CentOS 5.6 features php53 as an optional install. Be mindful of which version you have installed, and watch your terminal output when asking yum to install php related packages.

    After installing php components, you can run “service httpd restart” for changes to take effect.

    Thread Starter roger.bankes

    (@rogerbankes)

    Ok, thanks… “yum install php-mysql” did the trick. While it was already installed, yum installed the “53” version anyway. I have now progressed onto the next error which is about user permissions, and hopefully I can deal with that.

    Btw /usr/lib/php/modules doesn’t exist on this 64-bit version of Centos 5.

    Btw /usr/lib/php/modules doesn’t exist on this 64-bit version of Centos 5.

    I’m sorry.. I completely disregarded the “64bit” reference. I don’t have a 64bit RHEL box at my disposal at the moment, but I think it might be: /usr/lib64/php/modules/ instead.

    That’s just a guess. Glad you got it going!

    Thread Starter roger.bankes

    (@rogerbankes)

    Yes, /usr/lib64/php/modules is correct, cheers!

    ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Your PHP installation appears to be missing the MySQL extension which is require’ is closed to new replies.