-1

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?)

alecwhardy
  • 211
  • 2
  • 5
  • 1
    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 09 '11 at 02:37
  • I think you have too many questions in there... – Ward - Trying Codidact Nov 09 '11 at 06:38

1 Answers1

1

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.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47