Jump to content

PHP session variables on nested Apache request


arst

Recommended Posts

Configuring Apache/PHP is not my usual occupation, so bear with me if I make some mistakes.

 

The scenario is this one:

1 - The web server gets a SOAP WSDL request from a browser (something like http://localhost/magento/api/?wsdl)

2 - While processing this request in PHP, the PHP script makes another server request to get the WSDL data: http://www.mysite.se/magento/api/index/index/wsdl/1/?SID=9xeZigrCy3hPF.... And the host www.mysite.se resolves to localhost.

 

The first script waits for 2 to complete, does some processing of the result and then sends it back to the browser.

 

Both scripts (actually the same script called with different URLs) use PHP session variables. Now, what happens in 2 is that a PHP call to session_start takes very long to complete (2 minutes).

 

Searching the Internet on this topic, I find an explanation "The files holding session vars are locked in exclusive use by the script/process using them." 

 

Now I wonder:

- Is there some way to configure PHP session var handling with Apache so that a 'nested call' to the server could use the same session vars?

- I've configured Apache and PHP in default mode (Apache 2.2.9, PHP: 1.2.6). As I understand it, no separate process is spawned for a nested call. I understand that file locking works per-process. But here, the process should be the same one?

 

Some useful input / explanation is appreciated.

 

Regards

// Arne S.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.