PDA

View Full Version : Running PHP on a local machine



Jackthemeangiant
09-07-2005, 02:29 PM
I have been asked to create a program for a store to allow customers in enter information into. I have concluded that the easiest way to do this is the use a webpage with PHP.

Now, in order to run a PHP script on the local machine, do I need to install a webserver on the machine?

I just want to be able to open the *.php file locally on the machine, and for the script to be run properly.

NiTeFiRe
09-07-2005, 03:49 PM
As far as I know, yes. If its running off of the machine you need to run a server like Apache and enable PHP on it. Atleast that's what I did.

dusty550
09-07-2005, 05:24 PM
As far as i know, you would have to run a webserver (Like apache) setup PHP, and If you want a database MYSQL, Then to run the php script localy from that machine you would have to do like localhost/Script.php

Tim
09-07-2005, 08:40 PM
yes you need something like apache, php, and mySQL. I know there are windows versions of these out there I haven't installed them. If by some small slim chance you have access to something that runs OS X, it has all of these installed and ready to run. Machines to do this can be as cheap as about 150 bucks.

Jackthemeangiant
09-08-2005, 12:33 AM
Alright, thanks guys. I got it working by setting up an Apache server, but now the thing is now that I am running a web server, how can I make it so no one on the "outside" can access it?

Lsv
09-08-2005, 12:36 AM
this runs apache + php installed + a mysql server all in a tiny 5 meg download, you can disable outside access from it's console.

http://www.easyphp.org/

cygnus
09-22-2005, 08:22 PM
Alright, thanks guys. I got it working by setting up an Apache server, but now the thing is now that I am running a web server, how can I make it so no one on the "outside" can access it?

If you're behind a firewall, don't worry (unless your gateway is forwarding port 80 to your computer).

Now, if you're behind a firewall, people in your office can still get at the site, so the quickest way is to either
1. install sygate personal firewall on your computer and deny incoming requests
2. just google something called .htaccess because there are a few techniques you could use with it.