php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34192 magic constants cause syntax higlighting functions to crash Apache
Submitted: 2005-08-19 14:28 UTC Modified: 2005-08-30 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: crypticcreeper at yahoo dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.1.0RC1 OS: Windows 2000 Professional
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: crypticcreeper at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-08-19 14:28 UTC] crypticcreeper at yahoo dot com
Description:
------------
When using __METHOD__ or __FUNCTION__ in highlight_*() functions Apache crashs and restarts. 

Reproduce code:
---------------
echo highlight_string('<?php echo __METHOD__; ?>');


OR


$string = '<?php
class test
{
    function test()
    {
        echo __METHOD__;
    }
}
?>';
echo highlight_string($string);

Expected result:
----------------
Highlight string/file.

Actual result:
--------------
Apache crashs and restarts

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-19 14:36 UTC] crypticcreeper at yahoo dot com
I just tried the latest 5.1.x CVS snapshot and still crash is occurring for me =o(
 [2005-08-19 17:10 UTC] sniper@php.net
None of your examples crash. Please provice more information about your setup.
 [2005-08-19 23:06 UTC] crypticcreeper at yahoo dot com
--------------------------------------------------------
System Setup
--------------------------------------------------------
Server : Apache 2.0.54
PHP : 5.1.x to latest CVS
OS : Windows 2000 Professional
Safe Mode : off
--------------------------------------------------------


--------------------------------------------------------
Apache Error Log
--------------------------------------------------------
[Fri Aug 19 11:28:23 2005] [notice] Digest: generating secret for digest authentication ...
[Fri Aug 19 11:28:23 2005] [notice] Digest: done
[Fri Aug 19 11:28:26 2005] [notice] Apache configured -- resuming normal operations
[Fri Aug 19 11:28:26 2005] [notice] Server built: Apr 16 2005 14:25:31
[Fri Aug 19 11:28:26 2005] [notice] Parent: Created child process 2560
[Fri Aug 19 11:28:27 2005] [notice] Digest: generating secret for digest authentication ...
[Fri Aug 19 11:28:27 2005] [notice] Digest: done
[Fri Aug 19 11:28:28 2005] [notice] Child 2560: Child process is running
[Fri Aug 19 11:28:28 2005] [notice] Child 2560: Acquired the start mutex.
[Fri Aug 19 11:28:28 2005] [notice] Child 2560: Starting 250 worker threads.
[Fri Aug 19 11:29:39 2005] [notice] Parent: child process exited with status 1073807364 -- Restarting.
--------------------------------------------------------


--------------------------------------------------------
Notes
--------------------------------------------------------
I've tried switching different options for highlight_*() functions and crash still
occurs. Only __METHOD__ and __FUNCTION__ seem to crash it for me. I tested this same
thing on my live server which runs Apache 1.3.x, PHP 5.0.4 and Linux, but it does 
not crash. Only my local development server seems to be crashing from it. If you 
request will post php.ini settings too. Thanks.
--------------------------------------------------------
 [2005-08-22 01:07 UTC] sniper@php.net
Provide only the changes you've made to php.ini (compared to whatever you used as base).

 [2005-08-30 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 22:01:27 2024 UTC