Jump to content

Blank Page after upgrade from Version 3.0.62


Recommended Posts

Hello, after upgrade from 3.0.62 to 3.0.229 my webserver (www.bimaq.de) displayed only a completely blank page:

First I tried it directly using the "upgrades" module and following the instructions given by this module, later the steps proposed by "DV-JF" in https://processwire.com/talk/topic/28252-updating-an-old-site-3062/  and the tutorial https://processwire.com/docs/start/install/upgrade/ but the result was always the same, even when I made a backup of the complete "site" directory before the upgrade and replacing it from the backup after the wire-upgrade.

I also followed the https://processwire.com/docs/start/install/troubleshooting/#troubleshooting-upgrades instructions, but there are no messages in the error log and the debug option does not help, because the admin login is also completely blank after the upgrade.
Only if I hide the /var/www/html/index.php, the apache default page is displayed.

I need the upgrade because I want to migrate the website from an outdated centos7 server to a newly setup ubuntu22 server on which I installed a LAMP-stack and processwire master (3.0.229).

What can I do now to find a solution?

 

Link to comment
Share on other sites

Getting stuck like that is not fun! Hopefully we can help you out. First though is a little self-help question: Have you referenced all of the steps from the following page?

https://processwire.com/docs/start/install/troubleshooting/#troubleshooting-upgrades

I suspect there's some sort of error being generated and either debug mode is off (due to the website being in production) so you can't see the messages by default, but the error messages should be in one of your log files, or in your server (apache / php) error logs.

  • Like 1
Link to comment
Share on other sites

As I already wrote, there was no entry in the error-log, but I finished the last upgrade attempt with a rollback from the snapshot I had taken before and in consequence the logfile was also rolled back.
To be shure, I repeated the upgrade procedure today again, beginning with switching on the debug option, keeping the upgrade active for more than one hour and saving all the logfiles at the end externally: Then I could see, that during the upgraded time there was not a single entry in "errors.txt"

In between I took al look at the "Debug Mode Tools" within the PW-admin console an made screenshots of them, but as soon as I tried to navigate to another menu, the admin-console also disappeared.

It looks like the upgraded PW is completely inactive, but as soon I restored the internal copies of "wire/" and ".htaccess" (index.php is up to date) the website and the PW-console worked again completely normal.

Link to comment
Share on other sites

Yes, I did, but I could not find individual config changes made by my predecessor - it has not been changed since 6 years:
-rw-r--r--  1 apache apache 12428 Jul 10  2018 .htaccess

The last core update seems to have taken place 3 years ago:
drwxr-xr-x  5 apache apache   110 Jun 21 14:31 wire/

For a test I have just replaced the original .htaccess with a new version:
-rw-r--r--  1 apache apache 24625 Jul  4 16:27 .htaccess
This seems to work without any problems - try it out:
https://www.bimaq.de

 

 

Link to comment
Share on other sites

I dunno, what does the blank response look like raw? Is it a 200? Another long shot would be clearing the browser cache etc.

Sorry you have to deal with this. PW’s easy upgrade process is one of the things I love most about it, lol.

Link to comment
Share on other sites

There is no error message and no number.
Below I add screenshots of the webpage and the source view in upgraded version.

Then we tried out another proposal from

but this also did not work.

And we only switched back to the original "wire/" (version 3.0.62), leaving the upgraded versions of ".htaccess" and "index.php" with which the website works fine.

Upgrade-blankpage+source.PNG

Upgrade-blankpage.PNG

Link to comment
Share on other sites

Apologies for the confusion - my response was a bit generic since other people do visit topics like this for reference in the future.

A blank page, with PHP, (especially when view-source also is blank) is typically indicative of a server-level PHP error - and if PHP is being used to redirect that error to an application's log file, if it fails before it can redirect the logging to that custom location, then you'd need to check the server's error logs. I mentioned both for thoroughness, but in your case since you didn't see any errors in ProcessWire's error log file, you'd want to check your webhost's server's logs.

The question about the response being 200 - that's the HTTP response code. You can check that in the browser's developer tools. You can see it under the "Status" column of the Network tab in both Firefox and Chrome browsers. I suspect it's a 500 (error) response, and if it's not sending the error to ProcessWire's error log, the error messaging should be located either under your server's webserver error logs, or if separated out, your webserver's PHP error logs.

I would check there. I wish I could pinpoint exactly what the problem is, but like Jan mentioned, the upgrade process rarely fails so it's hard to know for sure.

Link to comment
Share on other sites

Sorry for the delay, I had to finish another very urgent task until now.

As you can see in the history of last Friday, I first upgraded "index.php" and ".htaccess", checked if the website still worked with the new files an then I activated the upgrade for about 6 minutes:

Quote

  986  05.07.24 12:02:02 mv index.php .index-3-0-62.php
  987  05.07.24 12:02:36 cp site/assets/cache/core-upgrade/index.php index.php
  988  05.07.24 12:02:39 ls -l
  989  05.07.24 12:05:42 cp site/assets/cache/core-upgrade/htaccess.txt .htaccess
  990  05.07.24 12:05:49 ls -l
  991  05.07.24 12:08:18 chown apache:apache index.php

  967  05.07.24 12:10:53 mv wire/ .wire-3.0.62
  968  05.07.24 12:11:10 mv site/assets/cache/core-upgrade/wire wire
  969  05.07.24 12:11:14 ls -l
  970  05.07.24 12:15:54 mv wire/ wire-3-0.229/
  971  05.07.24 12:16:37 mv .wire-3.0.62/ wire/

 

As soon as I had upgraded "wire/.." the website was blank.
In the /var/log/httpd/processwire_error.log I the only message between 12:10 and 12:16 is the bold one:
 

Quote

[Fri Jul 05 12:03:58.122339 2024] [:error] [pid 16117] [client 141.98.83.197:56866] PHP Notice:  Trying to get property of non-object in /var/www/html/site/assets/cache/FileCompiler/site/templates/includes/functions.php on line 187
[Fri Jul 05 12:12:41.917067 2024] [:error] [pid 15830] [client 185.224.128.74:29584] PHP Parse error:  syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in /var/www/html/wire/core/WireCache.php on line 425
[Fri Jul 05 15:41:24.580105 2024] [core:error] [pid 16587] [client 198.7.119.245:51354] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1

 

This kind of error message also can be found the day before, during the time I made another effort: What is puzzling me, is that there is no client IP belonging to our institute or the University Bremen.

The error message does not help me, so I can only guess that the reason for the upgrade-problem may come from the old centos linux, which uses another database name and database user as the new installation on the target system.

Is it really necessary to upgrade PW before migration of the content to newly setup webserver?
Perhaps with the "Export Site Profile" module that is installed (V 3.0.0)? 

Link to comment
Share on other sites

This looks like a PHP version issue.  Are you running an old PHP version on the centos server?   The newer versions of Processwire require PHP 7.x minimum I believe.

If you're running PHP 5.x and trying to upgrade to PW 3.0.229 you are likely to run into PHP parse errors like this.  If error reporting is off this will result in a blank page.

If that's the case, and you are able to switch PHP to a 7.x version that should allow the upgrade to work. 

36 minutes ago, BIMAQ-Admin said:

Is it really necessary to upgrade PW before migration of the content to newly setup webserver?

That also depends on the PHP versions you are running on the old and new servers.  If your new server is running PHP 8.x then you might encounter parse errors in the /site/ folder, particularly if you have any third-party modules; these might need updating too.  However the Processwire core will be OK.

  • Like 2
Link to comment
Share on other sites

The upper tutorial did not work because it uses the "yum-config-manager", which was not yet installed, but with another tutorial (https://unihost.com/help/how-to-update-php-centos-7/) I could install  PHP 7.4.33 (cli) (built: Jun  5 2024 05:05:14) ( NTS ) successfully.

Nevertheless I still saw a blank-page after PW upgrade.

Then I again tried to upgrade PHP to version 8, which was not possible because it requires Centos 8, but nevertheless the last step in this tutorial caught my attention:
"6. Update all your websites and or applications to use the latest PHP build you installed."

How can I do this in PW?
 

Link to comment
Share on other sites

On 7/3/2024 at 3:42 PM, BIMAQ-Admin said:

I need the upgrade because I want to migrate the website from an outdated centos7 server to a newly setup ubuntu22 server on which I installed a LAMP-stack and processwire master (3.0.229).

Have you tried migrating to the Ubuntu machine and upgrading ProcessWire there? Seems like you could skip all of this hassle with the old server? Obviously keep the old server running until everything works on the new one.

Link to comment
Share on other sites

20 hours ago, Jan Romero said:

Have you tried migrating to the Ubuntu machine and upgrading ProcessWire there? Seems like you could skip all of this hassle with the old server? Obviously keep the old server running until everything works on the new one.

No, because I only know links to the current master Version and the latest Version of PW.

Link to comment
Share on other sites

I think you should be able to just drop your "site" directory right into the new machine’s PW installation, replace the database, adjust /site/config.php accordingly, and it just might work.

Unless your production system depends on PW core modifications, in which case it would be imperative to find out what those are. But I’d see if it works before looking into that.

Link to comment
Share on other sites

  • 3 weeks later...

After another break due to summer holidays I now have to continue with the migration:
 

Quote

I think you should be able to just drop your "site" directory right into the new machine’s PW installation, replace the database, adjust /site/config.php accordingly, and it just might work

Could you tell me more details about "replace the database" - I am not so familiar with databases:
What I already tried out is a dump like:

mysqldump -u username -p database_name > data-dump-www.sql

and import like:

mysql -u processuser -p processdbn < data-dump-www.sql

Did you mean dump from the old server, transfer to the new server and import into the new database?

And what has to be adjusted in the "/site/config.php"?
My old server uses:

$config->dbName = 'processwire';
$config->dbUser = 'processwire';

the new server:

$config->dbName = 'processdb';
$config->dbUser = 'processuser';

Do you think I should change Name and User at the new server to the old values and transfer  the old "userAuthSalt" to the new system?

 

 

 

Link to comment
Share on other sites

By accident I made the interesting observation, that a little mistake in "/var/www/html/processwire/site/config.php" lead to blank page display at the new system and the following error-message in /var/log/apache2/error.log:
 

[Tue Aug 06 16:35:42.898593 2024] [php:error] [pid 40975] [client 10.242.2.3:52499] PHP Parse error:  syntax error, unexpected identifier "i", expecting ")" in /var/www/html/processwire/site/config.php on line 114

This problem could be solved by eliminating the wrong character in "/var/www/html/processwire/site/config.php"

From this I conclude that my upgrade problem is also a PHP-problem.

Link to comment
Share on other sites

After a shutdown due to urgent changes at the power supply of our housing center, the 8th effort to upgrade was successfull!

PW-Upgraded.thumb.PNG.59369d358b3160038885087d91f869d3.PNG

I assume the blank page was caused by the old PHP version as iank supposed 4 weeks ago:
I used the same files as directly after upgrading PHP, but then I did not reboot.

This part of the migration to a new server is completed, now I still have to deal with the transfer of the content to the target system with different databasename and -user.

Thank you very much for your support! 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...