coolcat50 0 Report post Posted January 6, 2008 I have just recently bought a laptop and would like to use PHP for local reasons on it, but I am not allowed to setu p a local webserver because it would slow down our already crappy internet. Is there a way for me to run local PHP without using Apache or any other webserver for purely local uses. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted January 6, 2008 Install a copy of XAMPP or WAMP or Easyphp onto your laptop to set up an Apache, mysql, etc that will not affect your Internet connection at all.It allows you to run php scripts on your localhost with no Internet connection at all.It also saves the Server at the Hosting account from getting messed up by your testing of Scripts... Google XAMPP, for example.XAMPPlite is also available as a Portable Application so you can run it from a Flash Drive, too. Again, no impact on your Internet connection. Share this post Link to post Share on other sites
truefusion 3 Report post Posted January 6, 2008 The only way it'll affect your current internet connection is if someone tries to access your server with your IP address. You could tell any firewall you may have to prevent any outside traffic from coming in through ports 80 and 8080. Share this post Link to post Share on other sites
Dsavi_X4 0 Report post Posted January 8, 2008 I have heard about something like this, except maybe a bit advanced and not what you're looking for. It lets you run .php files as standalone programs. And by the way, since when can't you run PHP on LocalHost? I've always thought that doing that was the only way to get it to work offline. I'll see what that thing was called again...*Gets out Ye Olde book of PHP*It's called Command Line PHP. I'll find something on it.Oh yes, I forgot, first post. Share this post Link to post Share on other sites
gogoily 0 Report post Posted January 10, 2008 Register Envirement variables of Windows, then you can use command to run php code just like this:C:\php somephpfile.php Share this post Link to post Share on other sites
anachro 0 Report post Posted January 10, 2008 thats pretty cool, I didn't know that you could localhost run scripts while offline. hmm... I wounder if my teacher will let me test the theory out on her PC for an assignment Share this post Link to post Share on other sites
khuongcomputer 0 Report post Posted January 12, 2008 That's crap if you can't get a local webserver.I really suggest for something like Easy PHP, it's setup a webserver on your PC really fast. Then you can use it for your purpose (only your computer can use this localhost). If needed, can be removed later. Share this post Link to post Share on other sites
nika201 0 Report post Posted October 26, 2009 Viewer for PHP is a single executable file that will run your PHP scripts in an embedded browser window and its open source!look herehttp://viewerforphp.sourceforge.net/ Share this post Link to post Share on other sites
mahesh2k 0 Report post Posted October 26, 2009 That;s nice find Nika. Viewerforphp looks good. It can let users view the results of php pages and applications without need to install the server. All they did is packaged apache server in it's own standalone base. And they bundled it as browser package. Very nice way to go anywhere with this small package as there is no need to install anything. You can call it portable. I'm going to try this, will review more about it soon. Share this post Link to post Share on other sites
shadowx 0 Report post Posted October 26, 2009 This is a *really* old thread, but nonetheless i feel nika's contribution is valid...But i would say that if you are going to be coding PHP seriously, or even for fun, you might as well get XAMPP (they do a light version too, and a portable USB version i think) you get your MYSQL databases etc... and even FTP and email server with the full version. It wont slow your internet connection at all, not one bit. It is all contained on your computer. Just make sure your firewall doesnt let people in to it (just get someone else to type your IP into firefox/IE if php pages come up your firewall is letting people in. If there is no page to display you're fairly safe.)This way you get to use MYSQL, FTP, various server settings etc... and you can run a real control panel etc... so it is just like your real webhost and so you can test things effectively. Share this post Link to post Share on other sites
Mordent 0 Report post Posted October 26, 2009 The only main issue I'm aware of with XAMPP is its incompatibility with 64-bit Linux (and possibly Windows, but I can't comment on that). There may well be a way to get it to work, but it's certainly not the friendliest thing to do, and doesn't work on it out-of-the-box, so to speak. Other than that, I can certainly recommend XAMPP as an excellent means of testing your PHP scripts before uploading them. Another good alternative is WAMP (only works on Windows, unlucky Linux and Mac users!)One thing I should point out about WAMP is that it stops some of the worries with other server software in that it has a "Go Online" setting that, when off, there's no way anyone can access the files by typing in your IP, firewall or not. If that's a big concern of yours (for whatever reason), go with WAMP just for that peace of mind. Share this post Link to post Share on other sites
BCD 1 Report post Posted October 26, 2009 All they did is packaged apache server in it's own standalone base.Viewer for PHP uses a small light weight server called Mongoose. An extremely small and easy to use server. Share this post Link to post Share on other sites
mahesh2k 0 Report post Posted October 26, 2009 Ah, thanks for the correction. I'll take a look at Mongoose webserver now. Share this post Link to post Share on other sites
networker 0 Report post Posted October 26, 2009 I had the same problem as you before. I downloaded easy php, a localhost server : http://www.easyphp.org/ and quite simplydisconnected from the internet when using it.It worked fine that way. Share this post Link to post Share on other sites
TheDarkHacker 0 Report post Posted October 26, 2009 I don't know why but XAMPP server for me very much times stops because my Skype port usually is the same like xampp's so i don't know how to change xampp's port.I tried with Skype port changing but,Skype is not the problem xampp is.The most annoying for me is that it sometimes slows my computer and i need to end some processes.Very much times it is stopping,like server is going down I tried to install php on localhost but it is too complicate+you need to edit lots of files...I would try easyPHP but if i need to be disconnected from Internet that is not good for me.I am user which uploads and downloads files every second and i can't live without Internet. Share this post Link to post Share on other sites