473,378 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

2 web servers serving same pages

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.
Apr 9 '08 #1
2 1264
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.

Apr 9 '08 #2
Michael Vilain wrote:
In article
<2d**********************************@x41g2000hsb. googlegroups.com>,
pl*******@yahoo.com wrote:
>>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.
js*******@attglobal.net
==================

Apr 10 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Captain Ranger McCoy | last post by:
Hello! Suppose I have ten servers at ten ips: x.x.x.1 x.x.x.2 x.x.x.3 x.x.x.4 and so on Each server hosts 100+ photo galleries, all under a single domain name,
3
by: -[ CaMeL ]- a55m0nk | last post by:
Hi there i am creating a clan website in ASP and am making a page serving script a link sends a query to the default page and then serves the page by grabbing the HTML from a database that...
5
by: Alan | last post by:
I have a website with no ssi, php, cgi...nothing. Plain old flat pages are all it serves. I need to upload a list to it - a big, plain text list in html. A 2Mb list! With gzip compress, it comes...
0
by: jack | last post by:
I am getting this error on my web server runnint ASP.NET on Windows 2003, it kills the serving web pages. The only way to get the web pages to start serving is to restart the server. I can't find...
1
by: Stephen | last post by:
Hi, I have to keep 2 server's folders in sync as they are used for load balancing purpose. I tried to create a FileSystemWatcher Service and found out that it goes to an infinite loop and...
2
by: Chris Fink | last post by:
What is the recommendation for sharing master pages across IIS Servers? In our corporation, we have many webservers in different environments (intranet, extranet, etc). I've done some searching,...
2
by: Jim Stools | last post by:
Server 2000 IIS 5 The server stopped serving pages on all the web sites: The Following error message: The page cannot be found HTTP 404 - File not found Internet Information Services
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
9
by: -Lost | last post by:
In Firefox and Safari for example, if I serve my XHTML documents as application/xml or xhtml+xml they only display the top inch or so of the document. In Opera it says "object has been blocked."...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.