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 » Sat Dec 01, 2018 6:17 pm

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: 65886
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie » Sat Dec 01, 2018 6:25 pm

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 am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

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 » Sat Dec 01, 2018 6:32 pm

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: 65886
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie » Sat Dec 01, 2018 6:40 pm

I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

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 » Sat Dec 01, 2018 6:46 pm

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: 65886
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie » Sat Dec 01, 2018 8:05 pm

change : $dbms = 'mysqli';

to

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

and you will be right as rain.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

tygerbug
Registered User
Posts: 18
Joined: Wed Oct 22, 2008 5:59 am

Re: General Error SQL ERROR [ mysql4 ]

Post by tygerbug » Thu Mar 14, 2019 8:40 am

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: 20711
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: General Error SQL ERROR [ mysql4 ]

Post by Mick » Thu Mar 14, 2019 8:47 am

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

There are no ‘threads’ in phpBB, they are topics.

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

Re: General Error SQL ERROR [ mysql4 ]

Post by Lumpy Burgertushie » Thu Mar 14, 2019 4:46 pm

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 am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: canonknipser, Exclusive, Mats_o, MosesTM, PixelFool and 23 guests