Testing PHP on my PC

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
BurnCK
Forum Newbie
Posts: 8
Joined: Wed Aug 22, 2007 5:41 am

Testing PHP on my PC

Post by BurnCK »

How can I test/run PHP scripts on my PC without having to upload it to a internet host ?

Many thanks :)
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

Well you basically install php on your PC

http://php.net/install

You will probably want to install apache and mysql too. And if you want people from outside to see stuff on your PC there are some additional networking adjustments and security considerations.
But go one step at a time.
If have specific problems with install procedure let us know.
Enjoy
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

might I suggest using Uniform Server?

http://www.uniformserver.com/

might make things easier to set up (just unzip and run) - comes with mysql, phpmyadmin, apache, etc...
BurnCK
Forum Newbie
Posts: 8
Joined: Wed Aug 22, 2007 5:41 am

Post by BurnCK »

I installed php on my PC but still cant get it to run in Internet Explorer.....doesnt even open when I select 'open with'.
I got Firefox to open it but didnt seem to run properly. I know the script is ok 'cos it worked when I uploaded it to a web host.
I will try that uniformserver......thanks.
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

well try this..
Other than that how exactly do you know you have installed php. How tested it?
Do you have cli running ? Cause for web you will need web server like apache.
BurnCK
Forum Newbie
Posts: 8
Joined: Wed Aug 22, 2007 5:41 am

Post by BurnCK »

Actually it probably wasnt installed properly as I uninstalled it but get the same results through Firefox.
Not sure what I did wrong as it seemed to install ok. Just did basic install, no server options.

Firefox just displays :-

".$mydate."
"; echo "";$img=$myback_colort=$bgcolo; #include "pom.html"; echo "";} echo ""; #echo ""; unset($img); } }echo "
"; $sc1=" "; $ip_list=file("ip_list.txt"); for ($i=0; $i
".$ip_address[2]." ". $ip_address[0]." ".$ip_services[$j]."
"; } else { print"The file ip_list.txt does not exist"; } ?>


Im trying to run a network monitor program that just pings specified network devices periodically. I cant run from the internet cos it wont find the IPs im trying to ping due to network security / firewalls, hence I have to run the script locally.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

uniform server - seriously. Setting up all the components yourself seems a tad high on the old learning curve if you just want to get up and running quickly (<1min).

Then use http://localhost/ to access your local site.
BurnCK
Forum Newbie
Posts: 8
Joined: Wed Aug 22, 2007 5:41 am

Post by BurnCK »

Thanks...but whereabouts do I put my files ? In the WWW folder ?
BurnCK
Forum Newbie
Posts: 8
Joined: Wed Aug 22, 2007 5:41 am

Post by BurnCK »

Doesnt matter. I got it working. Many Thanks :)
Post Reply