Solved

Setting up PHP server

Posted on 2015-01-29
3
199 Views
Last Modified: 2015-02-03
Hi, a bit of advice please.
I am looking to move from .Net website development to PHP development and looking for advice on the best way to set up my server.

My options (i believe)  currently are :
1) Manually install Apache, MySQL, PHP, etc and configure it yourself.
2) Install such an environment automatically using a special package, such as DAMP, WAMP or MAMP. (https://www.acquia.com/downloads looked good to me)
3) Use a virtual machine to set up your server in its own environment

any advice one preferred solutions
option 1) to set up from scratch is probably my preferred solution being bit of a control freak
2) Appears to be a nice and easy method, just a bit concerned if I would be able to upload to production server (particularly the database) and also would it be an issue using more than one CMS system in development. (are these issue relevant or should I not worry)
3) I could set up sites on remote servers for development. Are there any issues with this. can you easily copy a live site set it up as a dev site on another remote server (i appreciate that this is effectively live) and develop there.

Which of these options are your preferred solution, or do you have a different set up. Our main development precess will be purchasing themes and developing them on Dreamweaver / Adobe creative cloud

Your thoughts/ views / opinions would be so welcome.
0
Comment
Question by:Simon Cripps
3 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 167 total points
ID: 40578753
I have always gone for option 1, since I am another of your control-freak brethren.  My preferred environment is an Ubuntu LAMP stack.  Actually setting up Apache, MySQL, and PHP is a breeze once you do it once or twice.  

For option 2, I dislike this option.  Sure, they are just installing the regular services you would install yourself, but I find I always have to go back and reconfigure everything anyways.  It's an easy setup to get up and running quickly, but customizing everything becomes just a little more painful.  Also, some packages (WAMP) like to install to paths with spaces in the name, which can cause a host of assorted issues.

With option 3, you're still looking option 1 or 2 in addition.  That said, all my servers are remote, some VMs, some hardware.  Migrating a PHP site is generally pretty easy, though that can depend on the complexity of the application.  As long as you're familiar with configuring your environment, though, PHP is as portable as you can ask for.
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 40578800
IIS always hogs port 80 on a machine even if you set up Apache on a different IP address.  I have Ubuntu and CentOS machines along with WAMP, XAMPP, and IIS on Windows.  I never use VMs because all my machines are old and slow.  But they were cheap so I just have a different machine for each purpose.

The only migration problems is with CMS's like Wordpress where the domain name is part of the info recorded in the database.  Still, there are methods for dealing with that, it just means that it takes more than just coping the files and database to make the site work on another machine.

Option #1 is always an educational experience the first time.  Part of that is that Apache is set up differently in different situations.  Ubuntu and CentOS don't use the same directories for Apache and the binary install of Apache on Windows is different yet.  The 'conf' configuration files use 99% the same directives but you do have to pay attention.  PHP for Windows comes with a module to install in the Apache directories to integrate into the server.  MySQL binary is a breeze except you do need to do some configuration and setup users appropriately.
0
 
LVL 12

Assisted Solution

by:profgeek
profgeek earned 167 total points
ID: 40580380
I agree with the LAMP stack as a good way to do it.  But it can be a bit time-consuming at first as you figure out the configurations.  I have my students develop on their own machines, and most have laptops, so I have them load WAMP or MAMP for development and then upload their projects to our class server (which is housed on a VPS at a hosting provider).  When they do database assignments, they write their PHP code so that the databases, tables, etc., are created by the code.  You could do the same on your LAMP stack.  Develop the code there and use test data and then re-create the database on the real server when you deploy your applications.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now