mysql_connect function does not exist

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
abrogard
Registered User
Posts: 236
Joined: Tue May 24, 2005 8:32 am
Location: australia
Name: arthur brogard

mysql_connect function does not exist

Post by abrogard »

I just moved to a new platform with my same hosting provider.

Supposed to give me a better deal, better platform, but right now it's just broke lots of things.

One thing is the site 'thespectatorforum.com' which is due for updating anyway.

First they disabled it because they claimed they got spam from it: though it has a Q&A captcha enabled. And now we've sorted that out but I now get an error message when I try to go there:
==========================
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.
=============================

Now the site used to be working fine. Almost totally unused I admit, but working.

Is this something I can/should correct or is it something my host needs to look at?

Or can I ignore it all and go ahead with an upgrade somehow and then see what happens?

I can't even tell you which version it is. I guess I can look at the files on the host and get you that info if you tell me where?
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: mysql_connect function does not exist

Post by janus_zonstraal »

Tell your host to install the mysql extension

Or try to change in the config.php

Code: Select all

mysql
in to

Code: Select all

mysqli
And delete the 2 folders in the cache folder (installer an production)
Sorry! My English is bat ;) !!!
abrogard
Registered User
Posts: 236
Joined: Tue May 24, 2005 8:32 am
Location: australia
Name: arthur brogard

Re: mysql_connect function does not exist

Post by abrogard »

Thank you for that.

My config.php only has 17 lines in it. Is that right or has the host changed it?

I tried to edit it and change 'mysql' to 'mysqli' but I got an error when I tried to save it.

I'm messaging the host about it.

Do you happen to know if I can/should just go ahead and do an upgrade?
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: mysql_connect function does not exist

Post by janus_zonstraal »

tried to edit it and change 'mysql' to 'mysqli' but I got an error when I tried to save it


How do you edit and save the file?


No you can't do the update.
Sorry! My English is bat ;) !!!
abrogard
Registered User
Posts: 236
Joined: Tue May 24, 2005 8:32 am
Location: australia
Name: arthur brogard

Re: mysql_connect function does not exist

Post by abrogard »

I just click on it in my host's 'file manager' and it allows me to write in it and delete things - i.e. edit - and it offers a 'save' button and an 'undo changes' button so I reckon that's an edit page alright though it doesn't explicitly say so.

so I click 'save' and that's when I get the error.... woops.... I just now checked it and this time it saved it alright.. possibly because I messaged the host..

O.K. perhaps I can proceed somehow. I just tried the page and it still won't load, same sql error message.

It has been years or a year at least since I ever did an update. I kinda thought I remembered it as all being done externally from the board itself. No? I need to get into the board to be able to update?
User avatar
Lumpy Burgertushie
Registered User
Posts: 68181
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: mysql_connect function does not exist

Post by Lumpy Burgertushie »

you should never use the hosting file manager to edit/upload/download files. they are well known for creating problems.


get and learn how to use , a good ftp program like filezilla.

then, any time you need to edit a file, you connect to the serverr with the ftp program, download the relevant file to your computer and then use ONLY a good text editor to open/edit the file.

once finished, save the file and then upload back where it got it from using the ftp again.


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?
abrogard
Registered User
Posts: 236
Joined: Tue May 24, 2005 8:32 am
Location: australia
Name: arthur brogard

Re: mysql_connect function does not exist

Post by abrogard »

Yep. I'll be happy to use filezilla.

Meanwhile I got a message from the host:

==============================
The error is most likely due to the fact that you are using PHP 7 which no longer supports the mysql extension. If you wish to use this extension, please use our PHP Settings section of the Control Panel to revert back to PHP 5.
===================================

So what does this mean? My host has me on php 7 and the version of phpbb I currently have there uses php 5?

But modern phpbb boards use php 7 I guess? Because I know the host is running phpbb boards. Or their zacky tools installer offers them anyway.

So what must I do? Config their control panel thing for php5?
Then get into my board and do something there to enable an update?
And then watch the update abort because it wants php7?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52139
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: mysql_connect function does not exist

Post by Brf »

Yes. As we explained, you need to change mysql to mysqli in the config.php.
abrogard
Registered User
Posts: 236
Joined: Tue May 24, 2005 8:32 am
Location: australia
Name: arthur brogard

Re: mysql_connect function does not exist

Post by abrogard »

don't you just love it when someone talks down to you as though you were a dumb incalcitrant kid?

especially when they use the royal 'we' as though you'd been exhorted numerous times by numerous people to do that which you won't do?

especially when you've done what they're talking anyway and you've asked completely different questions to which they've not responded at all?

just getting their rocks off putting crap on people?

doesn't it just make your day?

I reiterate: I was getting the error message about php7 once I'd changed the sql to sqli. And my host said I probably need to change to php5.

But I did that. And now I get an 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.
===================================================

I will get back to the host and tell them about that. Have them check they've got the extension installed. I find it a bit incredible that they wouldn't have - they've got maybe millions of customers - I'm the only one trying to run phpbb on this new platform of theirs?

Meanwhile, if I do get it running what about my question: which php version does the latest phpbb need?

If it needs 5 and I stay with 5 then it looks like that's a blanket thing covering my whole account with the host. Meaning everything i put there will have to run on 5.

If it runs on 7 will an attempt to upgrade an installation currently on 5 to the latest version on 7 actually work?

That's what I was actually asking.

I'll get back to the host and tell them their reset of the php ver apparently hasn't worked.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68181
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: mysql_connect function does not exist

Post by Lumpy Burgertushie »

phpbb 3.2 will work on php 5.4 up to php 7 ( apparently not 7.2 )

if you are running php 7 then you have to change the mysql to mysqli in the config.php file.

mysql was deprecated as of php 7 so it will not work.

so, either change the php version you are running phpbb on to php 5.6 so that it can work with mysql or make sure you are running php7 and change the config.php file accordingly.

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
AmigoJack
Registered User
Posts: 5782
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: mysql_connect function does not exist

Post by AmigoJack »

abrogard wrote:
Thu Sep 06, 2018 3:08 am
don't you just love it when someone talks down to you as though you were a dumb incalcitrant kid?
Communication is a bidirectional thing and you cannot have higher expectations when you yourself provide minor quality, such as:
  • writing all lowercase,
  • not using formattings,
  • telling us "I got an error when I tried to save it" without actually stating the error message.
From my experience you also have to expect non-native English speakers which doesn't automatically mean they know nothing or want to be rude just because they're not fond of every word combination.

abrogard wrote:
Thu Sep 06, 2018 3:08 am
especially when you've done what they're talking anyway and you've asked completely different questions to which they've not responded at all?
Experienced this for 20+ years - up to today I ask 5 questions and get half an answer to none of those.

abrogard wrote:
Thu Sep 06, 2018 3:08 am
I was getting the error message about php7 once I'd changed the sql to sqli. And my host said I probably need to change to php5. But I did that. And now I get an error:
Your descriptions and the error message don't match: both the driver mysql4 and the function mysql_connect are only mentioned when using the mysql configuration. mysqli is no newcomer, it was available since PHP 5 and supported by phpBB since 3.0.0.

abrogard wrote:
Thu Sep 06, 2018 3:08 am
which php version does the latest phpbb need?
Sadly phpBB's manual and all other spots only mention 5.4.0 or higher although in the past is has occurred more than once that the most recent PHP version was not supported. However, nobody can see the future either.
  • The worst thing about censorship is ███████████
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: mysql_connect function does not exist

Post by 3Di »

abrogard wrote:
Wed Sep 05, 2018 9:17 pm
the site 'thespectatorforum.com'
abrogard wrote:
Wed Sep 05, 2018 9:17 pm
I can't even tell you which version it is.
The site is just working fine by my side, http://thespectatorforum.com/

and yes that should be a v3.1.8 of phpBB atm.
http://thespectatorforum.com/styles/prosilver/style.cfg

for which the support has ended some time ago BTW.
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51596
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: mysql_connect function does not exist

Post by stevemaury »

The only support available here for phpBB versions 3.1.x is help upgrading the installation to 3.2.2. If you with help with that, please so indicate.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
abrogard
Registered User
Posts: 236
Joined: Tue May 24, 2005 8:32 am
Location: australia
Name: arthur brogard

Re: mysql_connect function does not exist

Post by abrogard »

Hi Mr Burgertushi ! I think you've helped me out a number of times in the past. Thanks. Though I don't remember it as being on this forum. Do you appear on other forums, too?

Anyway: my host has now corrected an error they found in 'CMS' cache, whatever that is, and the board is accessible again so I'll be able to get in and initiate an update. I've been in and seen that there's a link within it nowadays that I guess I can click to start an update thing...

I also found that the 'disable' switch I had set somehow got unset and the board was wide open to the spammers again.. don't know how that happened.

So I'll do an update.

Thanks for the help.

:)
User avatar
SeeinStripes
Registered User
Posts: 61
Joined: Mon Nov 14, 2005 1:09 am
Location: Acworth, GA
Name: Shawn
Contact:

Re: mysql_connect function does not exist

Post by SeeinStripes »

Thanks this was very helpful and worked for me. I changed to mysqli in config and the forum came back to life!
Shawn McNew
Post Reply

Return to “[3.2.x] Support Forum”