Connecting Tech Pros Worldwide Forums | Help | Site Map

2 web servers serving same pages

plenty900@yahoo.com
Guest
 
Posts: n/a
#1: Apr 9 '08
Hi folks,

If 2 copies of Apache are serving the same pages and
running the same PHP, what if anything could get
messed up? I am specifically thinking session
variables might, but I know I don't know... so anybody know?

Thanks.

plenty900@yahoo.com
Guest
 
Posts: n/a
#2: Apr 9 '08

re: 2 web servers serving same pages


Quote:
This is not recommended unless the PHP does not modifications to the
pages or a database. Unless you put logic in the php code to check for
simultaneous access, you're libel to get weird and unpredictable results
of the two servers attempt to modify the same thing at the same time.
My impression is that every SQL access would have to be
surrounded by LOCK TABLES and UNLOCK TABLES commands.

But regarding sessions, it occurs to me that if a user
does one access and it goes to server A, and the next
access goes to server B, each server could have different
session info for that user.

Jerry Stuckle
Guest
 
Posts: n/a
#3: Apr 10 '08

re: 2 web servers serving same pages


Michael Vilain wrote:
Quote:
In article
<2da27430-370a-48ea-8a3d-f0ad51a098c0@x41g2000hsb.googlegroups.com>,
plenty900@yahoo.com wrote:
>
Quote:
Quote:
>>This is not recommended unless the PHP does not modifications to the
>>pages or a database. Unless you put logic in the php code to check for
>>simultaneous access, you're libel to get weird and unpredictable results
>>of the two servers attempt to modify the same thing at the same time.
>My impression is that every SQL access would have to be
>surrounded by LOCK TABLES and UNLOCK TABLES commands.
>>
>But regarding sessions, it occurs to me that if a user
>does one access and it goes to server A, and the next
>access goes to server B, each server could have different
>session info for that user.
>
The OP didn't say they were using a database, so SQL isn't involved.
>
LOCK TABLES and UNLOCK TABLES are SQL statements...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Closed Thread