Wordpress installation fails: The 'mysql' extension was not found

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:14:21 UTC

Modified:

2017-02-16 18:38:38 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Wordpress installation fails: The 'mysql' extension was not found

Symptoms

WordPress application installation on specific domain fails with the error below:

The 'mysql' extension was not found.

Domain is configured to have 'FastCGI' as PHP handler. Issue disappears if 'Apache module' or 'CGI' handlers are selected.

Trying to open any .php page on this domain results in that .php file is being downloaded.

Cause

'FastCGI' module ('fcgid') is not working properly in Apache. This causes 'PHP' run under 'FastCGI' to malfunction and fail to detect the mysql extension.

Resolution

  1. Make sure that the 'fcgid' module is enabled.

    For Debian/Ubuntu Execute the following command:

    # apachectl -M | grep fcgid

    If the module is not listed, enable it:

    # a2enmod fcgid

    For Redhat/Centos check the file '/etc/httpd/conf.d/fcgid.conf' , you can see the example of it's content below:

    # This is the Apache server configuration file for providing FastCGI support
    # via mod_fcgid
    #
    # Documentation is available at http://fastcgi.coremail.cn/doc.htm

    LoadModule fcgid_module modules/mod_fcgid.so

    <IfModule mod_fcgid.c>

    <IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
    </IfModule>

    FcgidIPCDir /var/run/mod_fcgid/sock
    FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

    FcgidIdleTimeout 40
    FcgidProcessLifeTime 30
    FcgidMaxProcesses 20
    FcgidMaxProcessesPerClass 8
    FcgidMinProcessesPerClass 0
    FcgidConnectTimeout 30
    FcgidIOTimeout 45
    FcgidInitialEnv RAILS_ENV production
    FcgidIdleScanInterval 10

    </IfModule>
  2. Verify that .php files can be opened and try to install WordPress again.

Have more questions? Submit a request
Please sign in to leave a comment.