Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57830 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43153 invoked from network); 13 Feb 2012 16:55:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2012 16:55:28 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qy0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:33711] helo=mail-qy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/50-41350-E70493F4 for ; Mon, 13 Feb 2012 11:55:26 -0500 Received: by qcmt36 with SMTP id t36so3192778qcm.29 for ; Mon, 13 Feb 2012 08:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AJrWEMxavky6HfEw08EsCPYxYzLNze4IcOoQV+Sif5M=; b=QiQH5+kLyitj211ncRqGMm5L6+tIRdvZ0XDmPhQFp+j99ucwBAdxF+2T5o98QJAZZf 94jaqUVXsvrkNvoWpySAmkmEOM0BfqzzocCicZqhF68CxTRzt4xpdhVh4O6RDFo7bcfN wGEWA+2s2Jjs63BdSbDboR2/J1YEfuodf6aog= MIME-Version: 1.0 Received: by 10.229.107.21 with SMTP id z21mr9745201qco.89.1329152120061; Mon, 13 Feb 2012 08:55:20 -0800 (PST) Received: by 10.229.235.137 with HTTP; Mon, 13 Feb 2012 08:55:19 -0800 (PST) In-Reply-To: <4F393F54.4040109@srce.hr> References: <4F393F54.4040109@srce.hr> Date: Mon, 13 Feb 2012 17:55:19 +0100 Message-ID: To: Jakov Sosic Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=002354471334f800ab04b8db5762 Subject: Re: [PHP-DEV] Internal server error on PHP syntax error? From: tyra3l@gmail.com (Ferenc Kovacs) --002354471334f800ab04b8db5762 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Feb 13, 2012 at 5:50 PM, Jakov Sosic wrote: > Hi. > > I don't know if this is the right group to ask this kind of question, but > if it isn't please excuse my french ;) > > As far as I can see, PHP does not report back to Apache error 500 in case > of a syntax error in code but displays empty page. For example this code: > > > always returns empty page. > > I was curious, so I googled little around and found this old entry from > this mailing list: > > http://marc.info/?l=3Dphp-**internals&m=3D124043575308005 > > > So if that's true, and if I understand it correctly, there is no way for > Apache to display error 500 in case of PHP syntax error? > > It is implemented already, php will report HTTP 500 on fatal errors, except if the headers were already sent. And I also remember a php/xdebug bug, which caused the headers to be sent see http://bugs.xdebug.org/view.php?id=3D587 and https://bugs.php.net/bug.php?id=3D50921 Derick fixed it in 5.4 So I would suggest you to double-check that you aren't using xdebug when you experience the problem, and that you don't send out the headers before your code blows up. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --002354471334f800ab04b8db5762--