Page 1 of 1
Running PHP pages through browser offline
Posted: Wed Jul 25, 2007 10:34 am
by Twinbee
I am trying to develop PHP code, and keep having to upload the page to a website to try it. I can of course install my PHP to my own PC, but then I also have to install a server too (I use Win XP).
My question is if it's possible to run PHP scripts through my browser without installing a server (e.g. IIS), and also without having to upload constantly to webspace to try it out (where I need to be online).
Posted: Wed Jul 25, 2007 10:42 am
by superdezign
There are editors that can do it for you, but installing a server lets you browse the website as though it was online.
Posted: Wed Jul 25, 2007 11:03 am
by Twinbee
Yeah, basically, I want it running through the browser offline, but I'm basically forced to install the server too?
Posted: Wed Jul 25, 2007 11:10 am
by Jenk
Posted: Wed Jul 25, 2007 11:44 am
by Twinbee
Hi,
Thanks very much, that seems like the best option at the moment, though the download is quite high (almost 200 MB) if I just want to use it for PHP. I presume there's nothing else?
Posted: Wed Jul 25, 2007 12:19 pm
by Benjamin
If you download each piece separately, install it and configure it yourself, the download would probably be smaller and it would be a good experience for you.
Posted: Wed Jul 25, 2007 12:37 pm
by superdezign
If you get them separately, try to get the newest of each (Apache 2, PHP 5, MySQL 5).
Posted: Wed Jul 25, 2007 12:59 pm
by Twinbee
Just tried EasyPHP which was initially found at:
http://en.wikipedia.org/wiki/Comparison_of_WAMPs
Only 8 mb (compressed), and it does the job nicely. The only thing I was stuck on was that I needed to put web pages into its special www folder (found in the browser via
http://127.0.0.1) rather than loading from an arbitrary place on my HD. Is there any way to load from any place I want from the HD?
Thanks all for the help!
Posted: Wed Jul 25, 2007 1:52 pm
by John Cartwright
You can specify the ServerRoot in your httpd.conf, however all your php files must be placed in this directory
Posted: Wed Jul 25, 2007 2:56 pm
by Jenk
You mean DocumentRoot. ServerRoot is where the binary files (php.exe etc.) are found.
Posted: Wed Jul 25, 2007 11:19 pm
by Z3RO21
On apachefriends.org the installer for XAMPP 1.6.3 is only 34 MB, where did you find it where it was 200? And in my opinion XAMPP is good. It is much quicker than downloading individual parts and makes set up easier. Having a localhost testing server is a must for me because it allows me to test across many browsers and many operating systems quickly.
Posted: Thu Jul 26, 2007 12:02 am
by John Cartwright
Jenk wrote:You mean DocumentRoot. ServerRoot is where the binary files (php.exe etc.) are found.
Whoops yea, thanks for the correction.
Posted: Thu Jul 26, 2007 6:25 pm
by Ollie Saunders
Could someone please more this thread to Installation and Configuration. Feel free to delete my post after.
Posted: Thu Jul 26, 2007 6:42 pm
by John Cartwright
Moved to Installation and Configuration.
Thanks ole
