ID:               31464
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wildmaple at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      5.0.3
 New Comment:

This is indeed not a bug at all, the session extension needs to lock
the session file so that concurrent updates can not corrupt the file.
This means that all scripts using the same session file needs to be
serialized. To improve performance you can use
http://php.net/session_write_close as soon as you are done
reading/setting session variables, which will remove the lock of the
file.


Previous Comments:
------------------------------------------------------------------------

[2005-01-10 04:39:31] wildmaple at yahoo dot com

Description:
------------
i don't be sure if this is a bug, anyway i don't think it is logically
acceptable.

*  A short script that reproduces the problem.
we developed a service structure, using webservice tech(php5.soap).
most things went well as we'd expected till we decided to make one
service script access another one. we have 3 seperate sites under
construction in the same linux box, and maybe more sites coming. some
services on one site will contact another on a second site, and we
think this schema is easy to understand and develope.

scriptA.php makes an SoapClient->__call() to scriptB.php , which serves
well using SoapServer class when called from an binary client programmed
with c++. then scriptB.php blocked when it got to the line where
session_start() resides.

when we commented out session_start(), scriptB.php worked out as fast
as possible, but we lost support of session tech here, that is not
acceptable as we designed.

btw, we tried other ways to solve this problem, but all failed at
function session_start(). some of the methods are xml-rpc and
fsocket(writing and recieving soap envelope handly or xml-rpc
structures),pear-xml-rpc(pear's xml-rpc lib).

* The list of modules you compiled PHP with (your configure line).
         './configure' '--prefix=/usr/local/php'
'--with-config-file-path=/usr/local/php' '--enable-sockets'
'--with-apxs2=/usr/local/apache/bin/apxs'
'--with-mysql=/usr/local/mysql' '--enable-track-vars' '--enable-static'
'--enable-roxen-zts' '--with-gd' '--with-zlib' '--with-xml'
'--with-gettext' '--with-ttf' '--enable-gd-native-ttf'
'--enable-gd-imgstrttf' '--with-freetype-dir=/usr/local/freetype'
'--with-iconv=/usr/local/iconv' '--enable-force-cgi-redirect'
'--enable-pic' '--disable-rpath' '--enable-inline-optimization'
'--with-dom' '--with-ncurses' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path'
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal' '--with-soap=shhared' '--enable-soap' '--with-xmlrpc'

* Any other information unique or specific to your setup.
nothing special.

 * Any changes made in your php.ini compared to php.ini-dist (not your
whole php.ini!)
nothing

* A gdb backtrace.
none


Reproduce code:
---------------
session_name("siteBsessionhash");

session_start();

$ServObj = new
SoapServer("http://somesite.com/somewsdl",array('encoding'=>'GB2312'));
$ServObj->setClass("SomeServiceClass");
$ServObj->setPersistence(SOAP_PERSISTENCE_SESSION);
$ServObj->handle();



Expected result:
----------------
script workout to put some message when called by another script on the
same machine using soap method.

Actual result:
--------------
blocked at the line where session_start() locates.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31464&edit=1

Reply via email to