ID:               30367
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mfrench at applied-handling dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Linux 2.2.20 Kernel (Debian)
 PHP Version:      5.0.1
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-10-08 18:07:21] mfrench at applied-handling dot com

Description:
------------
I have a file that is building up a DB query as a string. The query is
long enough that for reasons of readability, I am attempting to split
it onto two lines, and concatenate the two parts of the string together
into a single variable. Performing this string concatenation causes a
segmentation fault. Putting both halves of the string on a single line
and assigning it to the variable all at once avoids the error.

Reproduce code:
---------------
//This causes a segmentation fault:
$qry = "SELECT h.*, oe.LevelDepth, oe.LevelName AS oeName,
oe.OrgChartID";
$qry .= " FROM tblHierarchy h JOIN tblOrgElement oe ON
h.OrgElementID=oe.OrgElementID WHERE levelID=2";
echo $qry;

//This runs without error:
$qry = "SELECT h.*, oe.LevelDepth, oe.LevelName AS oeName,
oe.OrgChartID FROM tblHierarchy h JOIN tblOrgElement oe ON
h.OrgElementID=oe.OrgElementID WHERE levelID=2";
echo $qry;

Expected result:
----------------
I expect to see the full string output to the page.

Actual result:
--------------
Apache does not serve the page, and my browser reports "Cannot find
server". The server logs show a segmentation fault.

The code is trying to build up a DB query. However, the segmentation
fault occurs on the second line building up the string. Commenting out
the entire rest of the file, and only ECHOing the string to the page
still generates the seg fault, where the entire file runs without error
when the string is built all on one line with no concatenation.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30367&edit=1

Reply via email to