|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-16 04:48 UTC] dragon at wastelands dot net
[2002-09-16 06:59 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 01:00:01 2025 UTC |
I typically write my code on a local machine running 4.1.2. The following code works fine on my local machine, but causes a segmentation fault in the apache child sending the page, which is on the server using 4.2.2. The offending line was: foreach ($vars as $var) if ($GLOBALS["$var"]) { $prosql = 1; $websql = 1; } Obviously it is quite stupid trying to access global variables like this from within the global scope, but this line got moved from a function at some stage and obviously I didn't change it. Anyways -- stupid code shouldn't crash the server. and it took me long enough to even find the offending line. changing the middle part to "if ($var)" promptly fixed the problem.