Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
hstruck
Topic Author
Posts: 6
Joined: 03 Dec 2018, 14:02

PHP 7.3 Compatibility

08 Dec 2018, 13:52

PHP 7.3 is released: http://php.net/releases/7_3_0.php

X3 does not seem to be (fully) compatible yet.
I get the following error
There are no registered paths for namespace "__main__" in "partials/nav/header.html" at line 27.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11671
Joined: 30 Sep 2006, 03:37

Re: PHP 7.3 Compatibility

08 Dec 2018, 21:43

Thanks for reporting. I am releasing a new X3 beta-version tomorrow, but will look into PHP 7.3 before official release within 1-2 weeks.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11671
Joined: 30 Sep 2006, 03:37

Re: PHP 7.3 Compatibility

17 Dec 2018, 01:13

Today I tried X3.26.0 on PHP 7.3.0RC2, but couldn't detect any warnings or errors. What version of X3 did you use? Latest X3 seems ready for PHP 7.3, unless I can reproduce the reported issue.

Image
Image
 
User avatar
hstruck
Topic Author
Posts: 6
Joined: 03 Dec 2018, 14:02

Re: PHP 7.3 Compatibility

19 Dec 2018, 13:18

The X3 version was, I think, 3.25.
And the PHP 7.3 release is the first released on Debian 9. But there was another update for PHP 7.3, and I will test it with the current X3 version and post the result here.
 
User avatar
hstruck
Topic Author
Posts: 6
Joined: 03 Dec 2018, 14:02

Re: PHP 7.3 Compatibility

19 Dec 2018, 13:30

It looks like the bug was not so much about X3 as the PHP 7.3 version.
With the latest version of PHP 7.3 under Debian 9 and the current X3 version I can not reproduce the error.


PHP Version 7.3.0-2+0~20181217092659.24+stretch~1.gbp54e52f

System: Linux server 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64
Build Date: Dec 17 2018 09:26:59
Server API: FPM/FastCGI

X3 seems to be at least compatible with the current PHP 7.3 production version.
 
User avatar
hstruck
Topic Author
Posts: 6
Joined: 03 Dec 2018, 14:02

Re: PHP 7.3 Compatibility

19 Dec 2018, 14:11

Unfortunately, the error has occurred again.
I used a fresh installation of X3 with the demo content for testing.
The error occurred every time I clicked on a new link in the navigation for the first time. After reloading the relevant page, the error will no longer occur.
In the PHP error log two errors always occur:
AH01067: Failed to read FastCGI header
AH01075: Error dispatching request to:
So it's really more of an error in the FPM module of PHP or the FPM config.
The bug also seems to be related to the opcode cache.
Disabling the opcode cache seems to help when the error occurs.
Unfortunately, I can not try mod_php because my system is completely designed to use Fast CGI and FPM. When using mod_php, the result may be completely different.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11671
Joined: 30 Sep 2006, 03:37

Re: PHP 7.3 Compatibility

20 Dec 2018, 08:59

I can't quite see that these errors are directly related to X3 / PHP code. There are no php-specific errors in the warning, and nothing we are calling from X3. I have checked update-notes about PHP 7.3, which are not drastically different from PHP 7.2, and there isn't anything that outdates X3 PHP code.

I can't exclude that it is X3-related, but unless I can reproduce the issue, or a traceable PHP error is logged, it's hard to diagnose.
hstruck wrote:AH01067: Failed to read FastCGI header
AH01075: Error dispatching request to:
I found some links:
https://serverpilot.io/docs/error-faile ... cgi-header
https://www.centos.org/forums/viewtopic.php?t=61964
https://talk.plesk.com/threads/errors-a ... 75.348426/

We also use FPM/FastCGI on our servers:
Image
 
User avatar
hstruck
Topic Author
Posts: 6
Joined: 03 Dec 2018, 14:02

Re: PHP 7.3 Compatibility

23 Dec 2018, 23:27

Well, there are no problems when the opcode-cache is disabled. At least on my machine.
That's why I assume for now, that the problem is something with my configuration.
Thanks for your time investigating this matter.
I will test some different configurations for the opcode-cache, but for now PHP 7.3 without opcode-cache will be good enough.