[Split] Updating to php7

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

[Split] Updating to php7

Post by Prognatus » Sat Jun 03, 2017 3:52 pm

Hi,

I'm having the same issue as OP, after upgrading to php 7.0 on my host -
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 just finished a(nother) support chat with my host and they said -
We have MySQL 5.6.33, and also mysqli is in php7, which we do support
It should be mysqli_connect, not mysql_connect
But that is really going beyond our scope of support as we do not support development of the software.
You'll need to contact the creators of the software.
My config.php -

Code: Select all

$dbms = 'phpbb\\db\\driver\\mysqli';
So I'm confused as to why I get a mysql connect when config.php use the mysqli driver ...?
Last edited by Mick on Mon Jun 05, 2017 9:31 am, edited 1 time in total.
Best,
Prognatus

User avatar
WelshPaul
Registered User
Posts: 304
Joined: Tue Aug 19, 2014 2:09 pm

Re: Updating to php7

Post by WelshPaul » Sat Jun 03, 2017 5:21 pm

Cleared the cache?

User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

Re: Updating to php7

Post by Prognatus » Sat Jun 03, 2017 6:18 pm

Yes. Deleted everything under the cache directory, except .htaccess and index.htm

It's not only this phpBB installation that don't work anymore, it's all of them on my server!
Best,
Prognatus

User avatar
WelshPaul
Registered User
Posts: 304
Joined: Tue Aug 19, 2014 2:09 pm

Re: Updating to php7

Post by WelshPaul » Sat Jun 03, 2017 6:39 pm

Run the following command on your server:

Code: Select all

php -m | grep -i mysql
You should get a result like so:

Code: Select all

mysqli
mysqlnd
pdo_mysql
Do you see mysqli in the result?

User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

Re: Updating to php7

Post by Prognatus » Sat Jun 03, 2017 6:49 pm

Smart. I'd do that, except I'm not sure how I do it on this hosted server ... there's no command line. I only have access to cPanel v1.0 [RC] and an FTP client (I use Filezilla).

Edit: I just found this article on my host. I'll investigate it further.
Best,
Prognatus

User avatar
WelshPaul
Registered User
Posts: 304
Joined: Tue Aug 19, 2014 2:09 pm

Re: Updating to php7

Post by WelshPaul » Sat Jun 03, 2017 6:57 pm

Yes, you need to SSH into your server in order to run the command.

If you do not have root access you can create a php file with the following code:

Code: Select all

<?php
phpinfo();
?>
Search the page, MySQLI should be listed there if it's installed.

User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

Re: Updating to php7

Post by Prognatus » Sat Jun 03, 2017 8:43 pm

I made a file with your script in it and it called info.php, then executed it, and it revealed a lot of data with 'mysqli' in it. Not sure if that means it's correctly configured though? See for yourself: http://sq42.net/info.php
Best,
Prognatus

User avatar
WelshPaul
Registered User
Posts: 304
Joined: Tue Aug 19, 2014 2:09 pm

Re: Updating to php7

Post by WelshPaul » Sun Jun 04, 2017 9:52 am

Yep, looks like mysqli is installed and enabled.

You say that you have this set within your config.php file which is also correct:

Code: Select all

$dbms = 'phpbb\\db\\driver\\mysqli';
Again, you claim to have cleared your cache contents... I'm stumped!

Can you give us a link to the forum that displays the error?

User avatar
WelshPaul
Registered User
Posts: 304
Joined: Tue Aug 19, 2014 2:09 pm

Re: Updating to php7

Post by WelshPaul » Sun Jun 04, 2017 9:55 am

You could try creating another file:

Code: Select all

$mysqli_connection = new MySQLi('localhost', 'user', 'pass', 'db');
if ($mysqli_connection->connect_error) {
   echo "Not connected, error: " . $mysqli_connection->connect_error;
}
else
{
   echo "Connected.";
}
Replace 'localhost', 'user', 'pass', 'db' with your database credentials and see if that file is able to connect?

User avatar
david63
Registered User
Posts: 16401
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Updating to php7

Post by david63 » Sun Jun 04, 2017 10:00 am

Prognatus wrote:
Sat Jun 03, 2017 6:18 pm
It's not only this phpBB installation that don't work anymore, it's all of them on my server!
Then you need to be asking your questions of your host - we can probably help with phpBB but this would appear to be a wider issue.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

Updating to php7

Post by Prognatus » Sun Jun 04, 2017 1:18 pm

WelshPaul wrote:
Sun Jun 04, 2017 9:55 am
You could try creating another file:

Code: Select all

$mysqli_connection = new MySQLi('localhost', 'user', 'pass', 'db');
if ($mysqli_connection->connect_error) {
   echo "Not connected, error: " . $mysqli_connection->connect_error;
}
else
{
   echo "Connected.";
}
Replace 'localhost', 'user', 'pass', 'db' with your database credentials and see if that file is able to connect?
Thanks! I'll try that and see what happens.
david63 wrote:
Sun Jun 04, 2017 10:00 am
Prognatus wrote:
Sat Jun 03, 2017 6:18 pm
It's not only this phpBB installation that don't work anymore, it's all of them on my server!
Then you need to be asking your questions of your host - we can probably help with phpBB but this would appear to be a wider issue.
I asked them, and they said several times to me that it was an issue beyond their support ... Here are excerpts from my chat session with them yesterday:
[...] that is really going beyond our scope of support as we do not support development of the software.
If you need further assistance, I would seek out to the software developers and see if theres changes needed on the configuration side
[...] if you're having issues with the software, we cannot support that software as we didn't create the software.
You'll need to contact the creators of the software.
So I don't know what to do now. Restoring the backup won't work either, since it doesn't work with php 7, so in that case I'd have to ask my host to go back to php 5.3 first and I'm not very keen on doing that.
Last edited by Mick on Mon Jun 05, 2017 9:25 am, edited 1 time in total.
Best,
Prognatus

User avatar
WelshPaul
Registered User
Posts: 304
Joined: Tue Aug 19, 2014 2:09 pm

Re: Updating to php7

Post by WelshPaul » Sun Jun 04, 2017 3:48 pm

Try creating that file. This is very likely a host issue and if they won't fix it, change hosts.

User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

Re: Updating to php7

Post by Prognatus » Sun Jun 04, 2017 7:23 pm

It says "Connected!" and now I can suddenly access the board too! :)
I don't know what happened between yesterday and now but it suddenly works. Perhaps the server had to propagate something in its infrastructure before the change to php 7 could take effect? Anyhow, it works now and I'm a happy camper!

Thatnk you all so much for your help!
Best,
Prognatus

sakm
Registered User
Posts: 519
Joined: Sun Jan 21, 2007 8:14 pm
Location: Hull, uk
Name: Stu
Contact:

Re: Updating to php7

Post by sakm » Sun Jun 04, 2017 9:42 pm

Is the host using some sort of cache like cloadflare or varnish?

User avatar
Prognatus
Registered User
Posts: 19
Joined: Sat Jun 03, 2017 1:30 pm
Location: Dokka, Norway
Name: Bjørn Sandåker

Re: [Split] Updating to php7

Post by Prognatus » Mon Jun 05, 2017 4:32 pm

I don't know. Could be, but I'm not sure. What I do know is that I deleted the cache on my site and refreshed the page in my browser with Ctrl+F5, so to avoid all cached pages.
Best,
Prognatus

Post Reply

Return to “[3.2.x] Support Forum”