php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78931 NTS and TS version of PHP produces different output
Submitted: 2019-12-08 19:57 UTC Modified: 2019-12-10 11:30 UTC
From: michael dot vorisek at email dot cz Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 7.3.12 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: michael dot vorisek at email dot cz
New email:
PHP Version: OS:

 

 [2019-12-08 19:57 UTC] michael dot vorisek at email dot cz
Description:
------------
When PHP uses only 1 thread, i.e. CGI or CLI, it should produce exactly the same output, right?

But after days of trouble shooting I finally find the issue with PrestaShop installer. The issue is PHP on Windows.

When you download the latest version of PrestaShop https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.2/prestashop_1.7.6.2.zip , unzip it and
a) install it from CLI using admin/install_cli.php
b) OR install thru web using PHP CGI

the install always fail with NTS PHP (with error Template "C:\wamp64\www\ps\mails\themes\modern\core\account.html.twig" is not defined.), but always succeed when run with TS PHP.

I tested it on multiple Windows systems and two versions of PHP - 7.3.9 and 7.3.12/latest. The install always completes with the TS version of PHP, but always fail with the NTS one.

I am posting it here and not in the PrestaShop repo, as this seems like some core PHP issue.

Can you please reproduce and fix?

Test script:
---------------
see description

Expected result:
----------------
no difference between TS and NTS version, i.e. the PrestaShop installed always succeed

Actual result:
--------------
TS build is working correctly, but the NTS build of the same PHP version (and config, file location, ...) does something unclear differently

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-12-08 20:00 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2019-12-08 20:00 UTC] requinix@php.net
We are not familiar with PrestaShop or how it works.

TS and NTS builds are different in more ways that just threading. Please file a bug with PrestaShop first, and if they can identify a bug in PHP then we can revisit this.
 [2019-12-09 09:42 UTC] cmb@php.net
When PHP is run as Apache module, a thread safe PHP version must
be used.
 [2019-12-09 09:53 UTC] michael dot vorisek at email dot cz
This issue is presented even if run from CLI.
 [2019-12-10 00:10 UTC] michael dot vorisek at email dot cz
Reported to PrestaShop and verified.

This issue is very strange, as if xdebug_start_trace() is called, i.e. tracing is enabled, the issue is no longer presented even with PHP NTS build.

@cmb Can you please download the latest PrestaShop release and run the installer (install/index_cli.php) with PHP NTS (and then with tracing enabled or TS build) to verify the PHP issue? Do you have any tips how to debug this if tracing itself prevent the issue? Many thanks.
 [2019-12-10 11:30 UTC] michael dot vorisek at email dot cz
Issue isolated, see https://bugs.php.net/bug.php?id=78939 . Closing this one.
 [2019-12-10 11:30 UTC] requinix@php.net
-Status: Feedback +Status: Not a bug
 [2019-12-10 11:30 UTC] requinix@php.net
.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 10 19:01:23 2021 UTC