3.1.9 to 3.2 upgrade problems

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

I've uploaded all of the files but when I go to the database update page I get
[phpBB Debug] "str_repeat(): Second argument has to be greater than or equal to 0" in file /home/content/28/9521728/html/brb/phpbb/path_helper.php on line 239
And also the message
No route found for "GET ate" (from "http://blueridgebeemers.org/adm/index.p ... 3199a5cd49")
I can log into the ACP and see
Database server: MySQL 5.0.96-log
PHP version: 5.6.27
Board version: 3.1.9 [ Re-Check version ]

I'm using the .htaccess that came with the current download.

Hosting is GoDaddy but I installed this myself over ten years ago.

Here's my config.php:
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysql'; //database type it may not be mysql
$dbhost = '*******';
$dbport = '';
$dbname = '*******';
$dbuser = '*******';
$dbpasswd = '*******';

$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';

@define('PHPBB_INSTALLED', true);
//@define('DEBUG', true);
//@define('DEBUG_EXTRA', true);
?>
User avatar
TJK
Registered User
Posts: 138
Joined: Sat Dec 26, 2015 9:10 pm
Name: Tolaso J Kos

Re: 3.1.9 to 3.2 upgrade problems

Post by TJK »

What happens if you change MySQL to mysqli? In the config.php ?? And run the updater again ?
Hire me for your update/upgrade forum inquiries or your forum tasks (installation , set up , etc)
Have I been of any help today? Buy me a beer.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

path_helper seems to be causing this. If I look at the problem area of line 239, I see:
str_repeat('../', $corrections)
$corrections is set in line 225:
$corrections = substr_count($path_info, '/');
... and a debug statement shows a value of zero at that point.

The it gets modified:
if (strpos($request_uri, $script_name) !== 0)
{
$corrections--;
}
... at which point it has a value of -1.

Then we have:
$this->web_root_path = $this->filesystem->clean_path(
'./' . str_repeat('../', $corrections) . $this->phpbb_root_path
);
Which fails because the second argument, $corrections, is less than zero.

Why is this happening? Is the problem really that it is less than zero, or is it that this script is running at all, or that there is a path problem elsewhere in the site config, or... ? The site is running in a subdirectory of my overall site but it is in the root of its own domain name blueridgebeemers.org. I'm running the stock .htaccess from 3.2.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53609
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: 3.1.9 to 3.2 upgrade problems

Post by Brf »

AntonLargiader wrote: Fri May 04, 2018 10:49 am $dbms = 'mysql'; //database type it may not be mysql
TJK wrote: Fri May 04, 2018 11:09 am What happens if you change MySQL to mysqli? In the config.php ?? And run the updater again ?
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

BTW I still have the /install directory there, and am getting the warning for that, but my interpretation of the instructions is that it gets removed AFTER the database update is successful.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

Nothing happens when I change that to mysqli. I don't see how that would affect a path problem anyway.

The page that appears (showing those error messages) is totally unformatted, looking sort of like:
Corrections1 = 0
Corrections2 = -1
[phpBB Debug] "str_repeat(): Second argument has to be greater than or equal to 0" in file /home/content/28/9521728/html/brb/phpbb/path_helper.php on line 240
Installation Panel
Skip to content
  • Overview
  • Update
  • Convert
Information

No route found for "GET date"

Powered by phpBB® Forum Software © phpBB Limited
So, it's not picking up CSS from anywhere. And when I click on any of the three links (Update, Convert, Information) I get a server error. Unfortunately the GoDaddy interface doesn't work to let me see the actual error.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53609
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: 3.1.9 to 3.2 upgrade problems

Post by Brf »

Try going into your server control panel and enable URL-Rewriting.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

OK, I just noticed something very strange. In the instructions it says to go to /install/app.php/update and when I do the second error message says:
No route found for "GET ate"

But if I go to //install... I get "No route found for "GET date"
///install... gives me "No route found for GET pdate"
////install... gives me "No route found for GET update"
/////install... gives me the same thing but with more stuff on the page. So there is definitely some sort of path modification happening, for the worse.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

Brf wrote: Fri May 04, 2018 12:12 pm Try going into your server control panel and enable URL-Rewriting.
Can I do that in .htaccess? I have another site running (a Drupal one) that has that in the .htaccess and it seems to work properly.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26887
Joined: Fri Aug 29, 2008 9:49 am

Re: 3.1.9 to 3.2 upgrade problems

Post by Mick »

The ability to turn it on and off is built in to the ACP, why would you want to hack an .htaccess file?
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

Mick wrote: Fri May 04, 2018 1:25 pm The ability to turn it on and off is built in to the ACP...
I was thinking about mod_rewrite, not URL-rewriting. Changing URL-rewriting made no difference but as far as I can tell I do not have mod-rewrite active which is needed for URL-rewriting

I think mod_rewrite is something I can do in .htaccess. I will try that this evening; I really hope that does something.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

I have no idea what is wrong. PHPBB is completely confused about its path. It is installed in the /brb directory off my root, with a domain name blueridgebeemers.org pointing at it, but the path under the overview/update/convert links show as blueridgebeemers.org/brb/whatever (which is wrong, either the blueridgebeemers or the brb shouldn't be there) and on the 404 page which follows if I click one it says "The requested URL /brb/brb/install/app.php/ was not found on this server".

Then there's the thing where the update page behaves more normally if I put five slashes in the URL as I described before. When I try to send ACP statistics I get an error page saying "Cannot find module ./../includes/acp/acp_send_statistics.php"

On my server config page I have "force server URL settings" to no, but setting them to yes made no difference.

Can I reinstall from scratch and then somehow access my old database after PHPBB is actually running properly? I have a test site installed that I did using the GoDaddy app installer. It works, but of course it is way outdated and trying to upgrade it would probably break it just like my main site.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26887
Joined: Fri Aug 29, 2008 9:49 am

Re: 3.1.9 to 3.2 upgrade problems

Post by Mick »

AntonLargiader wrote: Fri May 04, 2018 11:53 amI still have the /install directory there, and am getting the warning for that, but my interpretation of the instructions is that it gets removed AFTER the database update is successful
Correct but you can rename it temporarily if it’s getting in the way.

Please fill out the Support Request Template and post it back here to enable us to assist you better.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

Thanks for the reply. This issue itself appears to be moot; although the paths are completely confused when I access the board normally (through its own domain URL) I get consistent and seemingly normal behavior when accessing it "the back way" through the root and installation directories. As long as this isn't causing some other problem, I'm going to stop pursuing it for now.

I got to a completely normal looking Update page (overview, update, and convert tabs) and at this point when I click the Update button it either hangs (the Ajax spinner stops and I get a rainbow spinner cursor on my mac) or I get the page with the "Update database only" radio button and then it hangs after that.

The files are now 3.2.2 and the database is 3.2.0.

What's different about the 3.2.2 database? Is it more than just the version field in the phpbb_config table?

EDIT: as this no longer seems to be a 3.1 support issue, I'll be browsing the 3.2 support forum for existing solutions. I'll check back here, though.
AntonLargiader
Registered User
Posts: 14
Joined: Wed Nov 12, 2008 2:57 pm

Re: 3.1.9 to 3.2 upgrade problems

Post by AntonLargiader »

OK, I think it's mostly fixed. Once I accessed the site without using the actual domain name, I got the correct update pages. I still had the eternal hanging issue though, but at THAT point changing the config.php to say mysqli seemed to do the trick. I never got a page saying that the update was successful or anything like that, in fact I never experienced it not freezing on the spinner, but after one of the attempts I saw that the reported DB version was 3.2.2 and I no longer got the misconfiguration warning in the ACP.

I still get "Cannot find module ./../includes/acp/acp_send_statistics.php" on the ACP_SEND_STATISTICS link, on the sent stats page, and indeed there is no such file in the 3.2.2 download, so I'd like to know what that is about but again that is not a 3.1 issue so I can post elsewhere about that.

The comment in config.php about mysql vs. mysqli is not well worded. "May not be mysql" is too easily interpreted as "might not be" or "may or may not be." Just say something like "Do not use mysql, use mysqli instead" and eliminate the ambiguity. Or just deal with it in the code somewhere. There are enough problems around that to show that it's not well done.

I am so glad to finally be off 3.1.

Return to “[3.1.x] Support Forum”