Page 1 of 1
Testing PHP on my PC
Posted: Thu Aug 23, 2007 1:48 am
by BurnCK
How can I test/run PHP scripts on my PC without having to upload it to a internet host ?
Many thanks

Posted: Thu Aug 23, 2007 2:05 am
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
Posted: Thu Aug 23, 2007 2:21 am
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...
Posted: Thu Aug 23, 2007 3:06 am
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.
Posted: Thu Aug 23, 2007 3:16 am
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.
Posted: Thu Aug 23, 2007 3:29 am
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.
Posted: Thu Aug 23, 2007 3:40 am
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.
Posted: Thu Aug 23, 2007 3:55 am
by BurnCK
Thanks...but whereabouts do I put my files ? In the WWW folder ?
Posted: Thu Aug 23, 2007 4:13 am
by BurnCK
Doesnt matter. I got it working. Many Thanks
