php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47459 blank page: due to having function in PHP page
Submitted: 2009-02-20 07:11 UTC Modified: 2009-02-20 21:21 UTC
From: ben dot keen at gmail dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.2.8 OS: Linux
Private report: No CVE-ID: None
 [2009-02-20 07:11 UTC] ben dot keen at gmail dot com
Description:
------------
This was actually found on 5.2.8, the current main PHP release (not sure why it's not listed in the PHP version dropdown on the bug report page... ??)

The problem is this: I'm importing a number of PHP files with require_once() into a main page but I get a blank page. I debugged it down to two lines of code in one of the files file that is being included. These two lines are inside a function that is NOT called, however.

  if (!$something)
    ft_handle_error("one" . "two" . "three", mysql_error());

When I comment these two lines out, the page loads fine. No errors, notifications or warnings are displayed. When I remove one (any) of the strings being concatenated in the first function parameter, the page loads fine. In other words, when I change the lines to any of these, the page loads fine:

  if (!$something)
    ft_handle_error("two" . "three", mysql_error());

As does:

  if (!$something)
    ft_handle_error("one" . "three", mysql_error());

As does:

  if (!$something)
    ft_handle_error("one" . "two", mysql_error());

Two final things to mention: when I remove the second mysql_error() parameter but keep all three strings being concatenated in the first parameter, the page loads. Also, when I remove the if (!$something) condition and keep all three strings being concatenated again, it also works fine. The actual strings being concatenated don't seem to make any difference.

I'm well beyond confused. Debugging tips?

Reproduce code:
---------------
  if (!$something)
    ft_handle_error("one" . "two" . "three", mysql_error());


Expected result:
----------------
The page should load for ANY of the lines of PHP code mentioned.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-20 13:16 UTC] jani@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2009-02-20 21:21 UTC] ben dot keen at gmail dot com
Apologies, I don't think that is a bug. There's something wonky going on on the server. Now even this isn't working:

<?php
echo "hello.";
exit;
?>
 [2009-02-20 21:21 UTC] ben dot keen at gmail dot com
Closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 21:01:33 2024 UTC