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 » Services_Webservice » Bug #9934

Fatal Error when using eAccelerator

Details

Submitted2007-01-24 13:38 UTC
Fromlru at rtpartner dot ch
StatusBogus
PackageServices_Webservice
PHP Version5.1.6
OSOS X 10.4
Roadmaps(Not assigned)

Comments

[2007-01-24 13:38 UTC] lru at rtpartner dot ch

Description:
------------
If running Webservice on a server running eAccelerator (http://eaccelerator.net/), the service runs only once, until it gets cached by eAccelerator. after that, a fatal error occures in Webservice.php as seen on the error message below.

Test script:
---------------
<?php

include_once('Services/Webservice.php');

class myService extends Services_Webservice {
/**
* Says "Hello!"
*
* @param int
* @return string
*/

public function hello($i) {
return 'myString';
}
}

$myService = new myService(
'myService',
'example webservice description',
array('uri' => 'myService',
'encoding' => SOAP_ENCODED,
'soap_version' => SOAP_1_2)
);
$myService->handle();

?>

Expected result:
----------------
normal result of the script.

Actual result:
--------------
nothing. in the php error-log, there appear the following messages:
==========
[24-Jan-2007 14:22:57] PHP Warning: strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string. in /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php on line 519
[24-Jan-2007 14:22:57] PHP Notice: Undefined offset: 0 in /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php on line 526
[24-Jan-2007 14:22:57] PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class does not exist' in /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php:543
Stack trace:
#0 /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php(543): ReflectionClass->__construct('')
#1 /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php(421): Services_Webservice->classMethodsIntoStruct()
#2 /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php(221): Services_Webservice->intoStruct()
#3 /Users/lru/Documents/_svn-workspaces/aligned/index.php(26): Services_Webservice->handle()
#4 {main}
thrown in /Applications/MAMP/bin/php5/lib/php/Services/Webservice.php on line 543
==========

the bug can be avoided if excluding the script calling the Webservices from being cached. in this example, it would be the test-script 'index.php'.