Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What do I need in order to develop with PHP locally?

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,506
Scotland
Hi All,

I am a beginner in PHP. I am following the tutorials, and have successfully written some simple scripts. I uploaded these to a test area of my company's web site, and they run fine.

I'd now like to go further. I'd like to be able to do PHP development locally, on my desktop system, and only upload the scripts to the web server when they are fully debugged.

My question is: What do I need to install on my PC to achieve that?

I am running Windows XP. I don't know anything about how to set up a web server. Ideally, I would like a complete package that installs everything I need in one go. (I'm not too bothered about editing tools; for now, Notepad is fine.)

I've discovered Hotscripts.com, where they have a list of "installation kits", with names like "Apache Friends XAMPP" and "Apache2Triad", but I'm not sure if these are what I need. Also, I'd appreciate a specific recommendation from you experts.

Thanks in advance from a PHP novice.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Normally you should install one by one (Apache from apache.org, PHP from php.net, and eventually MySQL from mysql.com if you need a database). It is pretty easy to install and to make them work together. Plus, it will give you more insight how they work

I'm also a beginner and just recently installed Apache2.2 with PHP5.2. Now I still have to install MySQL.

If you would like to install the complete package at once, I recommend you to check this out:

It will install everything you need.

Andre
 
if you are going to use windows, i'd recomment installing php and mysql on top of IIS. this is built in to XP although you may need to shove your installation cd in the drive if you want to enable this functionality.

apart from that i'd do as aas1611 suggests and install the latest downloads from php and mysql. for the former do NOT download and install the windows installer variant of php: download the zip file instead. the instructions are extremely easy to follow for both packages.

i do not recommend using any prebuilt installation pack combining two or more programmes.
 
I managed tofind a program that installs all three pretty easy, let me know if you still want it and i will upload it and put a link in here.

Cheers

Columbo1977
 
I use XAMPP from Apache friends. It's fine for using locally and has everything you will need. One thing though, I would look for the version that has the same version of php/mysql an apache as your production server to make sure what you are writing is supported by it.

Richard
 

Hi All,

Many thanks to all of you for those excellent replies. I'll check out the various links you suggested.

A couple of follow-ups:

JPaide: You said I should install the IIS built into Windows. I considered doing that, but I couldn't see it in my Add/Remove Programs (Windows Components) dialogue, and I'm one of those computer users who never had a Windows CD, because it came pre-installed on my computer (perhaps I should have insisted on a CD from the vendor; too late now).

Richard: I appreciate your point about using the same versions of PHP and MYSQL as my production server. I'm OK on that, except that the server will be running Linux and my development machine is Windows. But I don't see that as a problem, provided I take care not to use any platform-specific features.

So, thanks again. No doubt you'll be hearing from me again in this forum.

Mike





__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,

My point about the php/mysql versions wasn't to do with windows/linux, it was more to do with the package versions as various php pr mysql functions from later versions won't have been implemented in earlier versions. I had this exact problem recently, trying to do something that wasn't available in the version my host runs. It worked fine on my later version of php and mysql but not on my hosts. Had to change my local version then rewrite the script so it did what I want.

I like you develop on my windows machine (because I don't have room for a linux machine - at least that's what the wife tells me) the I upload to my linux host.

Xammp has all the old versions in it's download archive, with details of php/mysql/apache versions etc. Do a check on the production server and make sure you are working with teh same components on your local server.

Richard

Richard
 

Richard,

That's good advice. Thanks. I've now checked the versions available on the host, and I'll make sure I use the same versions for development. It shouldn't be a problem.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,


If you're developing on Windows, you might want to take a look at Server2Go ( It's a free (donation requested), self-contained, no-install web server running Apache, PHP and MySQL.

I have it loaded on my USB drive and can do my development anywhere, at any time. Just plug in your USB drive/key (I prefer the Seagate 5GB "hockey puck"), double-click the server2go icon, and you're ready to develop.

They're using modern versions of most applications, but double-check the site for specifics. (Just checked, they updated this week)
 
Even though I agree that installing each component separately is the best alternative, Yyou might want to look into EasyPHP.

It is also an installer package, which I use sometimes when I have to deploy a testing server really quickly and don't have time to mess around with php.ini files and configurations.

Just Google for it.




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Does anyone know of a step by step prodedure for any of the above? I tried installing apache, mysql, and php, and apache never would start yet was listed in Services in Admin Tools.

But that' just one example of my forays into installing and configuring those things.

No idea why an install of any package, even a command-line one, cannot option out the custom settings in a dialogue with the user, and even run tests, with reports, and thereby confirm a smooth or glitched install with procedures on how to fix, or even option that out as well in the dialogue.
 

Columbo1977

You are absolutely correct. Dev 5 installed smoothly and all works fine. The best thing I've seen for php/mysql.

Thanks
 
I used XAMPP in the past and I loved it. It made it really simple for me to get set up and start testing. I am by no means an expert at anything but for my initial setup it definatly made everything easy and ready to go.
 

Hi All,

Just to finish off this thread ....

I decided to try both XAMPP and PHPDev5. I ended up with Dev5 because I found the installation instructions easier to understand. That's no reflection on XAMPP. I was being lazy, and didn't spend much time trying to read the instructions.

With Dev5, I was up and running in minutes. I've just spent the weekend working on my first PHP project, and had no trouble at all.

So, thanks again for all the good advice. I'll be posting more questions about PHP as I delve further into it.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Glad you got sorted Mike. I've never used Dev5, but may have a look at it. I started with xampp a few years ago which is why I still use it. No reflection on any of the other bundled packages at all. Like you, I probably just use it because it's easy to get working (as I've been using it for ages). For a development server, I don't see any reason for compiling everything seperately unless you need a non standard config.

Good luck with the php, I'm sure we'll see plenty of you in here, and it's a great friendly place to learn.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top