Getting PHP to work on a desktop

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
L4E_WakaMol-King
Forum Commoner
Posts: 26
Joined: Wed Jun 14, 2006 10:54 am

Getting PHP to work on a desktop

Post by L4E_WakaMol-King »

Sorry... wasn't sure where to put this. As you can probably tell, I'm new.

Is there a way to get PHP to work on my desktop for testing purposes? For example, I can write html in Textpad or some other editor and launch it in a browser to see what it looks like... but I can't do that with PHP documents. Is there a simple way to make that possible? Right now I have to upload everything I do in PHP to my server and test it there, and that gets kind of tiresome.

Thanks in advance if anyone can help.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

Download php from http://www.php.net , then read install.txt and follow the instructions for your webserver. I presume Apache.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You need a server first. Install either IIS (if you have the ability and are in Windows) or httpd (The apache web server) and get that set up first. Then download and install PHP. If all goes well, it will detect your server and modify the configuration of the server so that the server can serve up PHP without any modifications on your part. If that is the case, you are golden and should be able to write your first PHP page, doing this...

Code: Select all

<?php
phpinfo();
?>
Save that into your local servers web root as my-php-info.php and hit it at http://localhost/my-php-info.php. If you did it right, you should see a lot of information about your PHP installation. If you did it wrong, you will see the code that is above instead of what the code does.
exedesign
Forum Newbie
Posts: 1
Joined: Sun Aug 20, 2006 6:12 pm
Location: Atlanta, GA

Easy PHP

Post by exedesign »

I use Easy PHP, Its a nice little application that has PHP, Apache, and mysql Built-in. Very easy to install.
Its also FREE
get it here. http://easyphp.org/
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

An excellent and easy to use package is XAMPP. If you don't want to install everything manually this package is an alternative. Download, click install, ready. Switch between php4 and 5. For the mac, I'm using MAMP.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

If you are new to all of this and/or aren't to handy with your computer, I would recommend using package.

I wanted to add that Windows 98, ME, and 2000 can use PWS (Personal Web Server) from Microsoft while Windows XP Professional can use a dumbed down IIS 5.5 (not sure of the version). XP Home doesn't support either.
L4E_WakaMol-King
Forum Commoner
Posts: 26
Joined: Wed Jun 14, 2006 10:54 am

Post by L4E_WakaMol-King »

I found WAMP, and that seems to be working fine. Thank very much for the help!
Post Reply