General Error SQL ERROR [ mysql4 ]

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
mr_jon
Registered User
Posts: 3
Joined: Wed Oct 03, 2018 8:42 pm
Name: jon

General Error SQL ERROR [ mysql4 ]

Post by mr_jon »

Hello, I am getting this error after upgrading to php7.2


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.


I read online that you have to change the mysql to msqli in config.php

but my config.php doesn't have any of that. my config.php looks like this:



<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = 'root';
$config['db']['password'] = 'password';
$config['db']['dbname'] = 'myforum_';

$config['superAdmins'] = '1';
User avatar
Lumpy Burgertushie
Registered User
Posts: 68007
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie »

you must change the mysql4 to mysqli

also there is no... $config['superAdmins'] = '1'; in any version of phpbb that I am aware of.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
mr_jon
Registered User
Posts: 3
Joined: Wed Oct 03, 2018 8:42 pm
Name: jon

Re: General Error SQL ERROR [ mysql4 ]

Post by mr_jon »

oh it seems i must of over written my config file from another script by mistake

now it makes sense, this is bad, im not sure if i had it backed up


thanks!
User avatar
Lumpy Burgertushie
Registered User
Posts: 68007
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie »

I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
mr_jon
Registered User
Posts: 3
Joined: Wed Oct 03, 2018 8:42 pm
Name: jon

Re: General Error SQL ERROR [ mysql4 ]

Post by mr_jon »

yay it worked!

i also had to delete the 2 folders in the cache folder, i tried renaming them _delete, but i had to completely delete them

heres what my config file looks like, with the password and user name edited



<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = '';
$dbport = '';
$dbname = 'forum';
$dbuser = 'root';
$dbpasswd = 'password';
$table_prefix = 'phpbb_forum';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('DEBUG_CONTAINER', true);




thanks for the help sir!
User avatar
Lumpy Burgertushie
Registered User
Posts: 68007
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie »

change : $dbms = 'mysqli';

to

$dbms = 'phpbb\\db\\driver\\mysqli';

and you will be right as rain.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
tygerbug
Registered User
Posts: 18
Joined: Wed Oct 22, 2008 5:59 am

Re: General Error SQL ERROR [ mysql4 ]

Post by tygerbug »

Hi, I'm getting a similar error. I've had a board at
http://orangecow.org/board

for years. I didn't personally change anything, but am now getting this error:
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.
Judging from other comments, I assume that I should try changing mysql to mysqli in the config.php file?


UPDATE: I've tried this and it seems to work. The board is back online anyway.

I seem to be running version 3.0.12 with a warning that it's out of date.

There's also these warnings:

HTTP input character conversion is improperly configured

mbstring.http_input must be set to pass. You can check the current value on the PHP information page.

HTTP output character conversion is improperly configured

mbstring.http_output must be set to pass. You can check the current value on the PHP information page.
Last edited by tygerbug on Thu Mar 14, 2019 8:48 am, edited 1 time in total.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22647
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: General Error SQL ERROR [ mysql4 ]

Post by Mick »

tygerbug wrote:
Thu Mar 14, 2019 8:40 am
I assume that I should try changing mysql to mysqli in the config.php file?
Yes, please start your own topic if you wish to discuss this further, thanks.
tygerbug wrote:
Thu Mar 14, 2019 8:40 am
3.0.12 with a warning that it's out of date
Update: Support for phpBB versions earlier than 3.2.0 has ended. Any support requests regarding those versions are limited to help with conversion to the latest version.
"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
Lumpy Burgertushie
Registered User
Posts: 68007
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie »

also, phpbb 3.0 will not work properly if at all, with php 7

so, if your host has upgraded to php 7 you will need to upgrade your phpbb to the latest which is 3.2.5


instrutions for upgrading here:
https://www.phpbb.com/support/docs/en/3 ... /upgrade3/

luck,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Post Reply

Return to “[3.2.x] Support Forum”