How to Fix Error After MultiPHP Update
If you previously used the PHP Selector plugin to manage the PHP version for your site and recently used the new MultiPHP Manager plugin to update PHP, you may have this error when visiting your website.
How To Fix "Missing MySQL Extension" Error
This error can be easily fixed by following the steps in the video below, and we've included a synopsis of the steps.
- Locate the .htaccess file, right-click on it, and select Copy.
- In the pop-up, it will provide the beginning of the path of where to store the backup. It will begin with /public_html, and you'll fill in the rest so that it reads /public_html/.htaccess.bak and click Copy File(s).
- Now you'll see the backup file in the main window named .htaccess.bak. You can always restore this by removing the .bak extension.
- Login to cPanel.
- Select File Manager.
- Open the public_html folder.
public_html is the document root for your primary domain, which is why we're using it for this example. If you are doing this for a subdomain or an addon domain, you will want to complete these steps in the document root for that domain instead.
- Locate the .htaccess file, right-click on it, select Edit, and then click Edit again at the bottom of the pop-up window.
- You should see two entries for PHP handlers. First, you'll have to identify the one that needs to be removed.
The one you'll want to remove will look like one of these:
# Use PHP71 as default AddHandler application/x-httpd-php71 .php <IfModule mod_suphp.c> suPHP_ConfigPath /opt/php71/lib </IfModule>
#Use PHPedge as default AddHandler application/x-httpd-php-edge .php <IfModule mod_suphp.c> suPHP_ConfigPath /opt/phpedge/lib </IfModule>
The one you want to keep will look like the one below.
# php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php73” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php73 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit
- To disable the PHP handler that you don't want, you can simply add a # at the beginning of each line, as we've done in the example below.
#Use PHPedge as default #AddHandler application/x-httpd-php-edge .php #IfModule mod_suphp.c> # suPHP_ConfigPath /opt/phpedge/lib #/IfModule>Note: There may be more than one old PHP Handler entry in your .htaccess file. Repeat Step #6 for any additional entries. You should only have one entry that begins and ends with:
# php -- BEGIN cPanel-generated handler, do not edit # php -- END cPanel-generated handler, do not edit
- Click Save Changes and then Close to close the editor.
- Now when you pull up your site, the error should be gone!