View Single Post
Old 11-03-2003, 12:09 AM   #7 (permalink)
Latch
In Your Dreams
 
Latch's Avatar
 
Location: City of Lights
First of all.. great idea seretogis!

Quote:
Originally posted by spived2
Is there a way to test php code without having to upload it to a server? Like a program for a virtual enviroment or something
<--Php newbie
You can run a http server with php on your own system, so you can test from your home system (don't even need to be connected to the net).

Windows:
HTTP Server:
I recommend Apache. Windows 2000 and XP comes with IIS (Microsoft's Web Server), but as I've never used PHP w/ it, I won't talk about it. As gigawatz said, it is a good quick 'n dirty test enviroment. Google for IIS+PHP if you want to try that. You can get the latest version of Win32 Binaries for Apache at:

http://www.apache.org/dyn/closer.cgi...inaries/win32/

I suggest a 2.x version. At the time of this writing, apache_2.0.48-win32-x86-no_ssl.msi would be appropriate for you. Use the .exe version if you don't have the MSI installer (chances are you already do. XP, 2K, and ME comes with it).

Note: If you're using XP, you need to have XP SP1 installed.

PHP:
You can get PHP from:
http://www.php.net/downloads.php

At the time of this writing, the latest stable version is 4.3.3. You can get it here:

http://www.php.net/get/php-4.3.3-ins.../from/a/mirror

Setup:
Once you install those two programs (apache first, then PHP), edit your apache configuration and add this:

ScriptAlias /php/" c:/path-to-php-dir/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Then start the Apache service and you should be able to run PHP scripts with no problems.

Other:
There are distributions out there that install everything for you in one big go (and usually come with MySQL, a Database Management System). I've never tried these, so can't verify how good they are. I don't have any links, but I'm guessing you could google for them. Also, below's some links with more indepth insturctions on setting up Apache/PHP/MySQL. Good luck!

http://www.coe.uncc.edu/~asingh/setup_apm.htm
http://www.weberdev.com/ViewArticle.php3?ArticleID=86


Linux
HTTP Server:
Once again, Apache 2.x is recommended. You can get it from:
http://httpd.apache.org/download.cgi

Just chose one of the Unix sources.

PHP:
You can get PHP from: http://www.php.net/downloads.php.

Just choose one of the sources.

Other:
You may want to install MySQL as well. Setting up Apache/PHP on Linux can be a pain, but not too bad. Below are some sites that give you good insturctions on how to do it. These may also go through installing other stuff, like SSL.

http://www.weberdev.com/ViewArticle.php3?ArticleID=378
http://www.devshed.com/Server_Side/P...inglySeamless/
http://www.linuxguruz.com/z.php?id=3...p+mysql+apache


General Links:
The following link(s) will give you setup/install instructions for either Linux or Windows.

http://www.php.net/manual/en/install.apache2.php


OK. That's it. Good Luck. If anyone has anything to add to this or thinks should be changed, just reply to the thread and I'll add it in.

Last edited by Latch; 11-04-2003 at 04:06 PM..
Latch is offline   Reply With Quote