views:

140

answers:

3

Hello,

I've decided to code some applications in PHP that are supposed to run offline in the user's machine. However, I can't seem to find an user-friendly install wizard to create a local server in where the script will run. Any ideas?

PS: Here's an example of what I want: http://www.nolapro.com

+4  A: 

You could go to the old school route and try using PHP-GTK.
Text Tutorial here: http://www.kksou.com/php-gtk2/References/Compiling-standalone-PHP-GTK2-applications-on-windows-using-PriadoBlender.php

or you could go the route that I believe has much more promise: Adobe AIR + PHP
It has the added bonus of running on any platform!
Video tutorials here: http://www.vtc.com/products/Adobe-AIR-PHP-Development-Tutorials.htm

There's also a new player in the game, Appcelerator. It lets you write your code in whatever language you want (PHP, Ruby, Python, etc) and compile it for the platform of choice (iPhone, Android, Windows, OSX). Parts of it are still beta, but it looks unbelievably slick & cool, and there are lots of tutorial videos. http://www.appcelerator.com

lo_fye
Thanks! I'll go with the AIR + PHP route.
Daniel S
haXE is fine too
Arpit Tambi
+2  A: 

I hate to advocate this, because it just feels so wrong. You would probably be better off using a language inteded for use for stand-alone applications, if you're going to be doing this often or in a production setting.

With that said, a colleague of mine used to use the Bambalam PHP to EXE Compiler for this. He actually had a profitable product built around it.

Bambalam will generate an EXE that doesn't rely on any external DLLs, based on your PHP code.

http://www.bambalam.se/bamcompile/

jfkiley
Cool. Can't say I really advocate it either, but a cool piece of software.
mgroves
Yeah, looks cool. However I'm too used to PHP5 to go back to PHP4
Daniel S
A: 

If you really talking about a client application you are really wrong to do this.

If you want to wrap a server + browser to deploy your web based application so it runs local you might check out three options:

1) Deploy a simple webkit browser (you can get a QT Webkit Browser in 30 lines of code) and an apache server that is installed somewhere standalone (not via the apache control script as this uses port 80 and i probably conflicts with another installed webserver.

2) Look at the Firefox PRISMA solution. I have read about this only in a news article but it wrapps the firefox around one single start URL. You have to deploy a webserver in the same way as

3) Try to wrap it as a HTA application. Search the corresponding info on MSDN.

I would prefer (1) as you can add special application interacting code as needed.

Lothar