Forums / Upgrading to 1.5.x / blank page when switching to php 8.x

blank page when switching to php 8.x

Views: 2,962

Results 1 to 7 of 7
26 Nov 2024, 1:23 AM
#1
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

blank page when switching to php 8.x

I did the upgrade to 1.58 finally, everything works on php 7.x . But if I switch to any php 8 version, I get a blank page. I had the same issue for the customer side, but I had some logs to work with. I think it was some language constant files. Sorting that fixed that issue. But I get no logs for the admin at all. I followed the same procedure and deleted old language files from stock zencart. And deleting any old modules. But I am thinking maybe its a file in includes/ and not admin/ that is causing this. Though I would have thought I would see a log file?

I upgraded my normal way, perhaps in hindsight should have started from stock 1.58 but had quite a few important customisations and modules present. This process has usually worked out fine in the past. Grateful for any pointers, I reload admin page it quickly goes to blank white page. Thanks in advance.

26 Nov 2024, 7:12 AM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: blank page when switching to php 8.x

If there's no log, something is breaking before it gets to loading the file that does the error logging.

So you need some info on the processing prior to that.

In
admin\includes\application_bootstrap.php

set this to true:

if (!defined('DEBUG_AUTOLOAD')) define('DEBUG_AUTOLOAD', false);

and you should see where things are coming to a halt.

Also there should be something in the actual server error log.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

26 Nov 2024, 2:00 PM
#3
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,304
Plugin Contributions:
39

Re: blank page when switching to php 8.x

HeathenMagic:

I did the upgrade to 1.58 finally, everything works on php 7.x . But if I switch to any php 8 version, I get a blank page. I had the same issue for the customer side, but I had some logs to work with. I think it was some language constant files. Sorting that fixed that issue. But I get no logs for the admin at all. I followed the same procedure and deleted old language files from stock zencart. And deleting any old modules. But I am thinking maybe its a file in includes/ and not admin/ that is causing this. Though I would have thought I would see a log file?

I upgraded my normal way, perhaps in hindsight should have started from stock 1.58 but had quite a few important customisations and modules present. This process has usually worked out fine in the past. Grateful for any pointers, I reload admin page it quickly goes to blank white page. Thanks in advance.

I found this alot when we were building 1.5.8. They couldn't go past PHP 7.4. I think it was server config issues because it was only some hosts.

~melanie

26 Nov 2024, 4:21 PM
#4
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: blank page when switching to php 8.x

torvista:

If there's no log, something is breaking before it gets to loading the file that does the error logging.

So you need some info on the processing prior to that.

In
admin\includes\application_bootstrap.php

set this to true:

if (!defined('DEBUG_AUTOLOAD')) define('DEBUG_AUTOLOAD', false);

> 
> and you should see where things are coming to a halt.
> 
> Also there should be something in the actual server error log.

Oh thanks very much for your help! I didn't know that trick, I knew about the enable error configure file. I got a constants error in configure.php, which must be a legacy code (as it doesn't appear exactly in fileset to merge I guess):-

> $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];
> define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
> define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');

That gave me another error appearing when I set to false, which was ioncube module for google search tool. Though Numinix marks it as 1.58, perhaps my server completely hates ioncube on php 8.x (tried 8.1 which is last ioncube comaptible server say).
So I disabled that, but still the blank problem persists..... very strange. Perhaps time to double check ioncube thing, though the 'true' setting doesn't show any errors. Just the process queue.
26 Nov 2024, 4:22 PM
#5
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: blank page when switching to php 8.x

Thanks for your reply. Yes I am thinking maybe it is server config. I did the php options checklist and ticked the required, so maybe it is as no more errors mentioned.Very frustrating as the customer side seems to work just fine.

12 Dec 2024, 11:01 AM
#6
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: blank page when switching to php 8.x

mprough:

I found this alot when we were building 1.5.8. They couldn't go past PHP 7.4. I think it was server config issues because it was only some hosts.

~melanie

I think you may be right. Tried transplanting stock 1.58a admin files with configure set correctly of course, and still blank. Am thinking it must be something in sql data somehow not liking php 8.x on admin side . Next step is to try upgrade to 2.01 on dev site and hope that might fix it. The live site is totally fine, and no logs to point to the admin issue, which is frustrating. If anybody has any possible things to try would be grateful, thanks in advance.

21 Jan 2025, 3:58 PM
#7
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: blank page when switching to php 8.x

I finally solved it, got error log for shopping cart from a shipping plugin. It for some reason did not install one sql row, which I manually added to reflect the call. Otherwise it was blanking admin page, yet live site not so bad in php 8 switch.