php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36147 require() and similar constructs break execution on the server side
Submitted: 2006-01-24 21:25 UTC Modified: 2006-01-24 23:16 UTC
From: akos at tigris dot org Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.1.2 OS: Win XP, 2003
Private report: No CVE-ID: None
 [2006-01-24 21:25 UTC] akos at tigris dot org
Description:
------------
 Require(), include() and similar statements don't behave as expected when used within a script that contains a SOAP server object. PHP SOAP server simply sends back an empty response without reporting any errors.
 The example below works in the above environments when
the require() statement is commented out.

Reproduce code:
---------------
<?php
  
  require_once("somefile.php");
  
  class foo {
    function foo()
    {
    }
  }
  
  $server = new SoapServer("somewsdl.wsdl");
  $server->setClass("foo");
  $server->handle();

?>

Expected result:
----------------
Response to a valid query.

Actual result:
--------------
Empty response, the server object seems to fail.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-24 21:46 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2006-01-24 23:16 UTC] akos at tigris dot org
Yup, I misdiagnosed the issue.
One of the included files had a trailing space after the closing bracket. The server sent the space back as a leading whitespace which prompted the client to complain about a non-XML type response.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Oct 20 03:01:26 2019 UTC