Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's the situation I have...

I am working on 3 small websites (one is a photography showcasing site for a family member, one is a blog, and one is a custom CMS I am working on to gain experience in PHP)

I am coding all 3 sites rite now using dreamweaver and uploading the files directly to the (remote, CentOS) production server. There is no development server.

As my CMS is getting more and more involved, I realized Dreamweaver isn't going to cut it as far as debugging. Using an IDE would probably make my coding endevour much easier. I downloaded netbeans PHP and began experimenting with its XDEBUG features. I installed XDEBUG on the remote server and configured it so it connects to my computer. Now, my fear is that with XDEBUG open and running on the production server, it will slow down performance and make it more vulnerable.

I am developing everything on a windows 7 machine in the same home network (its self-hosted). I was planning on installing XAMPP on my windows machine, but I realized that having a development server on a different operating system would not truly help me locate and debug all the problems.

Would it be better for me, a 15 year old web guru, to keep using my production server with XDEBUG, using my windows localhost to debug and upload working projects to the production server, or to use a virtual host on my windows computer (through VMware, VirtualBox, etc) and set up CentOS through that. (If that is the solution, how do I transfer the files back and forth. Will I have to use netbeans for linux? How do I do that if this is the answer?)

share|improve this question

closed as not constructive by Ward, Iain, RobM, Bart De Vos, ThatGraemeGuy Nov 9 '11 at 11:07

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

I haven't really had any problems running XAMPP for a development environment. The operating system (beyond any constraints it might impose - e.g. available packages) doesn't usually have a significant impact on debugging php/mysql sites. (An offhand comment - if you are writing an 'involved' CMS, you may consider using something such as SVN to track your changes and allow you to commit the changes directly to the server or rollback changes that don't work out). If you do go the VirtualBox route, use a bridged network and you can access the VM as if it was a real machine on your network. – cyberx86 Nov 9 '11 at 2:37
I think you have too many questions in there... – Ward Nov 9 '11 at 6:38
up vote 1 down vote accepted

I agree with Ward - you have too many questions there.

On the main point, yes, you'd be well served to go ahead and set up a separate development host. There are several reasons. One, as you suggested, it allows you to run a more tied-down production server, for better security and performance. Running XDEBUG on a production server is bad practice, and you'll never need to do it if your development server mirrors production.

Two, it allows you to do testing on the development server, so you have more confidence in updates before you push them out.

Three, it's standard practice in enterprises, so it gives you useful experience and shows your professionalism to potential employers. In fact, the government agency I work for requires separate development, test, and production servers, but that would be overkill IMO for a small development shop.

Four, a development server is a natural place to back up production files and databases. All of my production files are just exports from version control on the development server, so it's easy to recreate them if they're lost. And I back up the production databases nightly onto the development host.

Pushing files out from development to production is no big deal. Your version control system can do it for you, transported over ssh (e.g. I use bzr push). Similarly you'll want to simplify the job of copying databases from production down to development. I built a fancy script that basically just runs ssh production mysqldump | mysql.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.