SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 15th, 2004, 12:49 PM
miner2049er miner2049er is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 6 miner2049er User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Working on site while it is simultaneously live?

A few questions:

(1) For privacy, while testing my web pages, how can I access a page so that it loads fine on my PC - but to anybody else who tries to view it they get some sort of error or message? i.e. what does my PHP code need to do in order to allow it to just work when I view it in my browser? (I know I can develop a site locally on my PC, but that is NOT what I want to do here - I wish to load the pages off my host's server - just as regular visitors would do.)


(2) I would like to continue development on my site, while a version of that site is also live. I want my site to be running 24/7, and don't want to shut it down to add updates or do maintenance. How do sites like Amazon.com, CNN.com etc. handle this sort of thing - does anybody have any advice on working with such a system - how is the switch over to updated code and database made? Can anybody point me to any articles, resources etc?

(3) Anything else I should consider when developing a site that is simultaneously live - any other tips?

Thanks in advance, Simon.

Reply With Quote
  #2  
Old August 16th, 2004, 06:54 PM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2Folding Points: 651767 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 32 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
(1) simple, add an if statement around your code, like this:
PHP Code:
if($_SERVER["REMOTE_ADDR"]==/*your ip address here*/)
/* program */ 


(2) At my work we do this by running a testserver that's a complete copy of the live server, on which all dev work is done. Then when a new section is done, it's either copied to the live server (if it's one or two files), or when it's a large scale overhaul, the web server config is altered so the test server is now the live server. (Both servers run off the same machine as virtual servers). At home I do the same, I run a webserver off my own machine, which is a complete mirror of my real website which is hosted elsewhere. I change things locally, then when I'm finished, I upload the entire bunch to the other server.

(3)If you use any of the aforementioned tips, make sure all your links, paths etc are relative, not absolute. Also make sure you make your code as generic as possible, so don't use non-standard stuff like register_globals and stuff, as your code will crash hidiously when copied to a non-compatible webserver.
As for working on a real, live server, I really won't recommend that, unless a few parse errors shown to your visitors don't matter.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Working on site while it is simultaneously live?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway