[nycphp-talk] On errors, PHP crashes Apache
Cliff Hirsch
cliff at pinestream.com
Fri Jul 20 10:39:58 EDT 2007
On 7/20/07 10:06 AM, "Ben Sgro (ProjectSkyLine)" <ben at projectskyline.com>
wrote:
> Hello,
>
> What are these types of "crashes"..what exactly is happening?
>
> What OS are you using .. version? Which PHP/Apache versions are you using?
>
> Infinite loops may cause you to have to restart apache.
> I'm curious what you mean by "crash"...
>
> Can you post some sampe code that's crashing apache.
>
> - Ben
>
Windows XP, XAMPP 1.5.5 (PHP 5.1.6, MySQL 5.0.24a)
I traced the crash to my error handler routine.
The first error a missing method -- is captured as indicated below:
Error number: 8
Error type: e_notice
TEXT: Undefined variable: method
LOCATION: C:\Program
Files\xampp\htdocs\kerbeaz\business_objects\admintasks.php, line 299, at
July 20, 2007, 10:17 am
Showing backtrace:
FilterRecordSet.ValidateForm() # line 266, file: C:\Program
Files\xampp\htdocs\kerbeaz\business_objects\admintasks.php
FilterRecordSet.Init(false) # line 165, file: C:\Program
Files\xampp\htdocs\kerbeaz\business_objects\admintasks.php
AdminTasks.DisplayTasks() # line 227, file: C:\Program
Files\xampp\htdocs\kerbeaz\business_objects\admintasks.php
AdminTasks.DefaultPage() # line 65, file: C:\Program
Files\xampp\htdocs\kerbeaz\business_objects\admintasks.php
AdminTasks.init() # line 43, file: C:\Program
Files\xampp\htdocs\kerbeaz\admin.php
The second error an undefined variable is picked up as indicated below:
errorno 8, undefined variable min, file admintasks, line 299
But then when my error handler tries to build the error backtrace like that
shown above, this line crashes Apache:
$traceArr = debug_backtrace();
That¹s where I¹m stuck I can¹t dig any deeper, since debug_backtrace() is
a native php function.
Cliff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070720/f75ae50d/attachment.html>
More information about the talk
mailing list