-1

I am having problems with a WordPress website hosted on dreamhost. I am getting the following error.

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

I have tried the solutions to comment out the following lines in the htaccess file

#AddHandler php5-cgi .php
#Action php-cgi /cgi-bin/php-wrapper.cgi
#Action php5-cgi /cgi-bin/php-wrapper.cgi

But now I am no longer getting extension missing error. Instead I am now getting the following error

The theme has encountered a problem that it cannot recover from. Please use the following information to try to resolve the problem.

Error Code: php_code_error:64:themes/Builder/lib/layout-engine/modules/class.module.php:159:Call-time pass-by-reference has been removed Message: A fatal code error occurred.

Here is also the Debug Data

Array
(
    [0] => Array
        (
            [file] => wp-content/themes/Builder/lib/classes/it-error.php
            [line] => 121
            [function] => fatal
            [class] => ITError
            [type] => ::
            [args] => Array
                (
                    [0] => php_code_error:64:wp-content/themes/Builder/lib/layout-engine/modules/class.module.php:159:Call-time pass-by-reference has been removed
                    [1] => A fatal code error occurred.
                )

        )

    [1] => Array
        (
            [file] => wp-content/themes/Builder/lib/classes/it-error.php
            [line] => 148
            [function] => handle_error
            [class] => ITError
            [type] => ::
            [args] => Array
                (
                    [0] => 64
                    [1] => Call-time pass-by-reference has been removed
                    [2] => wp-content/themes/Builder/lib/layout-engine/modules/class.module.php
                    [3] => 159
                )

        )

    [2] => Array
        (
            [function] => it_error_shutdown
            [args] => Array
                (
                )

        )

)

I am using the following

php version 5.4.37 Zend Engine 2.4

atkawa7
  • 461
  • 1
  • 6
  • 13
  • Commenting out lines doesn't fix the fact that you don't have the mysql extension. You are ignoring the error. You need to have your host install it. If you have root access then you need to install `php5-mysql` package. – Panama Jack Mar 01 '15 at 01:19
  • downvoters gonna downvote – tacone Mar 01 '15 at 01:33

2 Answers2

2

Your CGI-PHP misses the Mysql extension, thus Wordpress cannot run. It's either a bug of Dreamhost or a custom PHP version installed by you.

When you commented it out, you handed the control to the PHP interpreter configured in Apache (a different one, or maybe the same one configured to read a different configuration file). The change of the error message is actually a step forward, it solved the first problem, leaving you dealing with the second problem.

The second problem is your that your theme code is obsolete, and uses a feature that has been removed in newer PHP versions. This provokes the fatal error you're experiencing.

You have three options now:

  1. downgrade to PHP 5.3 (you may be able to do that from your control panel). It's not a good thing (because old versions don't have security issues fixed by the PHP staff), but if you do that then your site may finally work.
  2. fix the error manually (google for the error message and act accordingly)
  3. change theme.

Good luck :)

tacone
  • 11,371
  • 8
  • 43
  • 60
0

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Is an error Dreamhost needs to fix. Ask their support to fix it. They need to edit the php.ini file to enable that extension. If this is your own VPS, ask them how to do ot.

The second error means some theme code is not php5 valid; look for an update for the Builder theme.

markratledge
  • 17,322
  • 12
  • 60
  • 106
  • He removed the CGI interpreter, thus handing the control to the Apache one. Thus: the CGI interpreter lacks mysql (custom install?), the Apache one complains for an error in the code of the theme. – tacone Mar 01 '15 at 01:23