• Hello all,

    I’m a server administrator who is in the process of getting WordPress working properly for the first time on my CentOS 5.3 server. As for the version of wordpress, I have downloaded and used whatever the “latest” one is.

    MySQL is running on the server and I feel confident that I’ve added a database user and the new database to MySQL properly. I also followed the directions for how to edit the wordpress configuration file to access the mysql server on this database.

    When I access the /wordpress/wp-admin/install.php page through the browser, I get the result “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”.

    When I do this, I do not see any new logs generated by the MySQL server process. The web logs show the regular type of connection one would expect (result: 200), and no entry in the error log. I also do not see any logs in the SELinux audit log file (although SELinux is set to permissive anyway).

    CentOS is supposed to have MySQL-PHP configured by default.

    Does anyone have any experience with getting wordpress working on CentOS 5.3 and know what might be happening here?

    Also, the MySQL database has had a backup from a pre-existing web site put into it. The data may be from a version of wordpress that was one version behind the current one. I don’t know if that makes a difference (and in fact I don’t even know if it’s connecting to the SQL properly, I see no logs at all either way).

Viewing 9 replies - 1 through 9 (of 9 total)
  • You can try this in a root console:

    rpm -qa | grep php-mysql

    I think it should return something like this:

    php-mysql-5.1.6-23.2.el5_3

    if there is no return, the module is not installed;

    yum install php-mysql – or use package manager if you installed the gnome gui.

    then restart apache (httpd).

    [EDIT] …I think.

    ??

    Thread Starter finhosting

    (@finhosting)

    Thanks for the quick and accurate response!

    The RPM query shows exactly what you’d expected. php-mysql-5.1.6-23.2.el5_3.

    So, still not sure what’s not right here.

    take a quick peek in /etc/php.d/ and see if there is a mysqli.ini file

    file contents when enabled should look like this:

    ; Enable mysql extension module
    extension=mysql.so

    Thread Starter finhosting

    (@finhosting)

    I see two files similar to this.

    mysql.ini contains:

    ; Enable mysql extension module
    extension=mysql.so

    mysqli.ini contains:

    ; Enable mysqli extension module
    extension=mysqli.so

    what does this return?

    php -i | grep -i ‘mysql support’

    Thread Starter finhosting

    (@finhosting)

    [root@**** php.d]# php -i | grep -i ‘mysql support’
    MySQL Support => enabled
    [root@**** php.d]#

    The PHP itself sure is looking right, isnt it :/

    Thread Starter finhosting

    (@finhosting)

    I’ve gotten this error to stop by adding this code to httpd.conf:

    <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 9524288
    </Files>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    It seems that the system comes configured for php but the apache install doesn’t put it into the default config file.

    Also added index.php to the directoryindex list.

    I have two development servers running CentOS 5.3, and was fortunate enough to never have encountered that situation. My guess was going to be re-compiling/re-installing php.

    Just for the heck of it, if you are still curious about it, take a look at /etc/httpd/conf.d/php.conf – Here is the contents of a working file.

    #
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    #
    LoadModule php5_module modules/libphp5.so
    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    AddHandler php5-script .php
    AddType text/html .php
    #
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php
    #
    # Uncomment the following line to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
    #AddType application/x-httpd-php-source .phps

    My thoughts were that perhaps something may have gone whacky (pardon my technical terms) – on the php install. It seems you found a work-around for it though.

    Best wishes.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Centos 5.3 problems – “missing the MySQL extension”’ is closed to new replies.