php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62599 Some SPL Exceptions do not display any backtrace / error message via mod_php5
Submitted: 2012-07-18 13:14 UTC Modified: 2016-08-07 05:44 UTC
From: peter at netkey dot at Assigned: requinix (profile)
Status: Closed Package: SPL related
PHP Version: 5.4.4 OS: FreeBSD
Private report: No CVE-ID: None
 [2012-07-18 13:14 UTC] peter at netkey dot at
Description:
------------
When called via apache2 (mod_php5), some SPL exception do not display any 
information: BadFunctionCallException, 
InvalidArgumentException, 
OutOfBoundsException, 
RuntimeException and 
UnexpectedValueException. 
When called vi CLI the backtrace and exception message is displayed. All other 
SPL exceptions display the expected message / backtrace.


PHP was installed via the ports system, before the upgrade form 5.3 to 5.4 the 
mentioned exceptions displayed message and backtrace.


Test script:
---------------
<?php
throw new InvalidArgumentException('SDF');
?>

Expected result:
----------------
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'SDF' in 
/path/to/script.php

Actual result:
--------------
Fatal error: in /path/to/script.php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-30 19:54 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2016-07-30 19:54 UTC] kalle@php.net
Could you please try with a recent version of PHP, e.g. 7, which had some major changes to the way exceptions are dealt with internally?
 [2016-08-01 07:37 UTC] peter at netkey dot at
Thanks for getting back to me. 
I can not reproduce the error on 5.4.14 on FreeBSD, have no 5.4.4 lying around any more and also no FreeBSD with PHP 7 and mod_php at the moment. But I guess the error was fixed somewhere between 5.4.4 and 5.4.14.

I lost the password to edit this bug, so I'm using the comment function.
 [2016-08-07 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-08-07 05:44 UTC] requinix@php.net
-Status: No Feedback +Status: Closed -Assigned To: +Assigned To: requinix
 [2016-08-07 05:44 UTC] requinix@php.net
Closing as per comment.

Test script on 3v4l https://3v4l.org/ZepNU does not reproduce.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC