|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80128 trigger_error produces 255 exit code
Submitted: 2020-09-21 08:34 UTC Modified: 2020-09-21 12:24 UTC
From: php at shyim dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 8.0.0beta4 OS: NixOs
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
47 - 10 = ?
Subscribe to this entry?

 [2020-09-21 08:34 UTC] php at shyim dot de
I am currently testing our Software on PHP 8. Anything seems to work, but the CLI Installer fails. I did some debugging using var_dump and searching which line produces the 255 exit code without message. It was always the trigger_error calls.
When I remove from the entire project all trigger_error calls, the installation step works.

Test script:
Unfortunately I don't know what causes it. But when you run our Installer (MySQL Database needed) it crashes always. See to how to execute the installer.

Github Repository:

Expected result:
The Installer works runs with exit code 0. And a recovery/install/data/install.lock file exists

Actual result:
The trigger_error triggers 255 exit code without message.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-21 10:50 UTC]
-Status: Open +Status: Feedback -Package: Reproducible crash +Package: *General Issues
 [2020-09-21 10:50 UTC]
Use an actual debugger to step through the code as it hits that trigger_error() call.
 [2020-09-21 11:07 UTC] php at shyim dot de
I am really new to debugging into PHP. You mean with xdebug or something like gdb?
 [2020-09-21 11:13 UTC]
Xdebug will be easier to work with. Basically every PHP IDE supports it and installation is pretty quick: mostly adding an extension and double-checking some settings. Check your IDE and/or Google for the exact process.

If you know that the FormPass.php line causes it, set a breakpoint for that line and have your IDE run the installer. When PHP gets to that line, you'll "step into" the next call to see what happens. My bet is that execution will move off into an error handler somewhere, but maybe the program will just end at that moment.
 [2020-09-21 12:13 UTC] php at shyim dot de
Could reproduce it now, with a smaller Code Block. There 3v4l
 [2020-09-21 12:23 UTC] php at shyim dot de
Okay I am not sure if that is a real issue, cause display_errors is disabled. Feel free to close, when you think the same :)
 [2020-09-21 12:24 UTC]
-Status: Feedback +Status: Not a bug
 [2020-09-21 12:24 UTC]
Please see these UPGRADING entries:

The right code would be

This would be much more obvious if you did not set display_errors=0, that makes it essentially impossible to debug anything.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Aug 07 15:05:45 2022 UTC