PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » SOAP » Bug #1879

HTTP Status not set to 500 for SOAP faults

Details

Submitted2004-07-15 01:47 UTC
Fromjwm at horde dot net
StatusDuplicate
PackageSOAP
PHP VersionIrrelevant
OSAll
Roadmaps(Not assigned)

Comments

[2004-07-15 01:47 UTC] jwm at horde dot net

Description:
------------
Type casting causes SOAP 0.8RC3 to always emit Status:
headers, never a HTTP Status-response:

Near line 200:
if(stristr(php_sapi_name(),'cgi')==0)
$hdrs_type = 'Status:';
else
$hdrs_type = 'HTTP/1.1';

When php_sapi_name() is not 'cgi,' the FALSE return
value from stristr() is cast and the comparison to 0
succeeds, preventing the else branch from being reached.
Using the identical (===) operator for comparison fixes
this.

[2006-03-07 11:57 UTC] spambox at wanadoo dot fr

I'm testing pear soap and i have always the Internal Server error 500.
If i look at the apache logs (error.log) i have this line :
[Tue Mar 07 12:54:11 2006] [error] [client 127.0.0.1] malformed header from script. Bad header=$hdrs_type 200 OK: php.exe

i don't know what is the problem but it seems to be similar to you. Excepted that the === has been corrected in my version of pear soap.

i use apache 2 and php 437 on windows.

[2006-03-09 12:56 UTC] ixti at pitfall dot ru

I have the same problem as (Benjamin)
But I'm using FreeBSD 4.11 / Apache 1.33.3 / PHP 4.3.11
The problem occurs when I'm using php compiled manually and used as cgi (/cgi-bin/php). If I'm using Apache's mod_php4 - everything's ok... :((

[2006-03-10 07:05 UTC] ixti at pitfall dot ru

Sorry. I was inattentive.
Bug 6744 really fix this problem.