Re: PHP help wanted
Posted: Sat Jun 18, 2016 8:35 am
What version of phpBB is this?
What version of PHP and MySQL are you running on?
I have noticed some Wordpress installations getting flacky since PHP 7. The reason is that PHP has been a mess regarding database connection types; mysql, msyqli, mysql_pdo, mysql_nd. It's confusing. (I think mysql_nd is actually a driver, not a connection type). They have been deprecating and (re)introducing new extensions and drivers. "mysql" has been dropped as an extension in PHP7.
Wordpress supports all of the extensions, and many PHP versions. What is now happening, is that Wordpress tries to connect to the database, and if it can't because the extension is not loaded, it moves on to the next one. First, this makes Wordpress VERY slow if it doesn't connect on the first try as you have to wait for the timeout before it tries again. Second, on some servers, connecting again and again is not allowed, and then timeout errors will occur.
Maybe your installation of phpBB is facing a similar issue; trying to connect multiple times, using different database extensions, with the server at some point just dropping the requests to protect itself from DDoS.
If this is the case, the solution would be to take a look into phpBB's database connection code, and enable the extension it uses first, so it connects the first time it tries. If the PHP version you are running doesn't have this connection ("mysql" on PHP7 for example), you'd either need to upgrade phpBB to use newer connections, or downgrade PHP to provide the old connections.
It has been a very long time that I ran a forum using phpBB. The photography forum http://www.digireflex.nl ran on phpBB from 2004 to 2008, after which I moved it to SMF. After I quit as the maintainer/admin of that forum (I wasn't the owner) in 2012 due to time constraints, it just fell behind and died. It was taken offline in 2015.
I don't want to get into forum maintenance or adminning again, but I may be able to offer some suggestions on where to look in case of problems.
edit: note that the PDO extension is the most powerful. It can handle 12 different databases, where MySQLi can only handle MySQL. It also has a few technical advantages. If your phpBB version supports PDO_MySQL, or can be upgraded to a version that supports it, then this would be the recommended way to go. If you are already using MySQLi or even PDO_MySQL, and are still getting timeout errors, you may indeed need to check the database server setup for things like really short timeout settings and such.
What version of PHP and MySQL are you running on?
I have noticed some Wordpress installations getting flacky since PHP 7. The reason is that PHP has been a mess regarding database connection types; mysql, msyqli, mysql_pdo, mysql_nd. It's confusing. (I think mysql_nd is actually a driver, not a connection type). They have been deprecating and (re)introducing new extensions and drivers. "mysql" has been dropped as an extension in PHP7.
Wordpress supports all of the extensions, and many PHP versions. What is now happening, is that Wordpress tries to connect to the database, and if it can't because the extension is not loaded, it moves on to the next one. First, this makes Wordpress VERY slow if it doesn't connect on the first try as you have to wait for the timeout before it tries again. Second, on some servers, connecting again and again is not allowed, and then timeout errors will occur.
Maybe your installation of phpBB is facing a similar issue; trying to connect multiple times, using different database extensions, with the server at some point just dropping the requests to protect itself from DDoS.
If this is the case, the solution would be to take a look into phpBB's database connection code, and enable the extension it uses first, so it connects the first time it tries. If the PHP version you are running doesn't have this connection ("mysql" on PHP7 for example), you'd either need to upgrade phpBB to use newer connections, or downgrade PHP to provide the old connections.
It has been a very long time that I ran a forum using phpBB. The photography forum http://www.digireflex.nl ran on phpBB from 2004 to 2008, after which I moved it to SMF. After I quit as the maintainer/admin of that forum (I wasn't the owner) in 2012 due to time constraints, it just fell behind and died. It was taken offline in 2015.
I don't want to get into forum maintenance or adminning again, but I may be able to offer some suggestions on where to look in case of problems.
edit: note that the PDO extension is the most powerful. It can handle 12 different databases, where MySQLi can only handle MySQL. It also has a few technical advantages. If your phpBB version supports PDO_MySQL, or can be upgraded to a version that supports it, then this would be the recommended way to go. If you are already using MySQLi or even PDO_MySQL, and are still getting timeout errors, you may indeed need to check the database server setup for things like really short timeout settings and such.