SOLVED: phpBB Errors Out With – mysql_connect function does not exist, is mysql extension installed

If you have a phpBB bulletin board and have recently changed host companies, upgraded your hosting package or changed your PHP level, you may see:

General Error
SQL ERROR [ mysql4 ]

mysql_connect function does not exist, is mysql extension installed? []

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

In this case the likely problem is that your phpBB is running a command the no longer exists in PHP version 7 and above.

Fortunately the fix is quite easy:

  1. With an FTP client (like FileZilla) edit your bulletin boards CONFIG.PHP file
  2. Find the:
    $dbms = 'mysql';
    and change it to
    $dbms = 'mysqli';
  3. Close and save the file back to your hosting company and try your site again

Note that you may have to either wait for cached files to expire (i.e. if you host is caching files… which they most likely are, or if you are using a Content Delivery Service like CloudFlare that caches files), or manually flush/delete the cached files which sometimes means contacting the company that hosts your websites and forums.

In case you are wondering the “i” stands for “improved”.

The MySQLi Extension is a relational database driver used in the PHP scripting language to provide an interface with MySQL databases.
SOURCE

 

 

Published by
Ian Matthews

This website uses cookies.