Portal Home > Knowledgebase > Articles Database > PHP/MySQL App as a stand-alone app


PHP/MySQL App as a stand-alone app




Posted by computerwiz3491, 06-08-2007, 06:16 PM
I have a PHP/MySQL app, and I want to be able to distribute it as a stand alone app (so that the average windows user could use it on their home computer), possibly commercially. Does anyone know the best way to do this? Thanx

Posted by case, 06-08-2007, 10:32 PM
You can freely distribute PHP under the PHP 3.01 license. MySQL on the other hand has duel licensing options. If your application is commercial you'll need to purchase a license(s). If you distributed your application under an open source license you could bundle php/mysql free of charge. There are plenty of Windows installers all over the web. Provide some more details/specifics and I'm sure you'll get more help.

Posted by mwatkins, 06-08-2007, 11:29 PM
Assuming that your application requires a web server, you'll need to consider that, too. If I had my druthers, I would write applications intended to be run "standalone" using Python or Ruby - both have more than one "built-in" web server. Deployment can be a lot easier. Python for example has sqlite built in these days. Having a start up script that essentially turns up the web server and your application and shuts it all down when its done would seem to be a requirement. You don't want these things run as "services", typically.

Posted by Xeentech, 06-09-2007, 01:07 AM
Google are attempting to make it easier to do a similar thing you are after, I think. Check out Google Gears Only thing is, I doubt they're doing anything with PHP. If you're after making a fully GUI PHP app I think the most popular method is GTK-PHP. GTK-PHP will also be cross-platform AFAIK, since GTK+ is on Linux/Win32/OS X. I also found this.. http://www.zzee.com/php-gui/ It basically loads what looks like a browser, but isn't. It cuts out the HTTP/Web server and takes the output of PHP and dumps it straight to a HTML render window (browser). I think this + SQLite could be quite interesting. If it can work along side Smarty I might check it out. As for running a full PHP app, eg PHP + HTTPd + MySQL, as a standalone distributable app.. there's WAY to much to go wrong given all the crazy configurations of windows and all the click happy users out there

Posted by Burhan, 06-09-2007, 02:45 AM
In all honesty; PHP is not the ideal language for a desktop application, and PHP-GTK is a proof of concept; not production ready code. If you are trying to package your application with mysql + php + webserver; and expecting a user to run it in a browser; then its okay. Don't thnk you can make production quality applications in PHP-GTK

Posted by case, 06-09-2007, 03:41 AM
You could always make the application remote accessible. It eliminates cost, bundling and licensing headaches. If its good software people will buy user accounts. A hosted application prevents people from peeking at your code which is something some think about when going commercial. I'm just curious about the stand alone requirement. Last edited by case; 06-09-2007 at 03:49 AM.

Posted by Ks Jeppe, 06-09-2007, 09:34 AM
Well, if the program needs to interact with the users harddisk/computer, which seems likely (if not, then you'd be crazy not to make it hosted remotely) then you'd need it as a standalone application As said though, PHP is really not the ideal language for this, why not Java, VB, C++, .NET etc? They all can do the same as PHP in many cases, but you'd be MUCH easier off...

Posted by computerwiz3491, 06-09-2007, 09:57 PM
Does anyone know about licensing SQLite?

Posted by gogocode, 06-09-2007, 10:36 PM
VMWare - you should consider distributing your full application setup as a virtual machine, it would be much easier than trying to manage the install of a web server, php mysql etc onto a windows host, just give them the machine, and a free copy of the vmware player. If it's setup right they'd probably not even know the difference.

Posted by Burhan, 06-10-2007, 01:08 PM
That's something to think about @ James' suggestion. I wonder what are the licensing implications of that.

Posted by mwatkins, 06-10-2007, 01:13 PM
sqlite is included now in Python; the Python Software Foundation would not have included a component which did not have a liberal license. Maybe you could give us some more information on your application. Threads which go off on their own with little direction from the OP are not very productive.

Posted by Xeentech, 06-10-2007, 01:43 PM
http://www.sqlite.org/copyright.html

Posted by chrisranjana, 06-11-2007, 12:08 PM
Also you didn't mention whether it is a Web server dependent application or a console based application ?

Posted by mwatkins, 06-11-2007, 12:51 PM
Yes. I'd asked for details. WHT is rife with threads where the OP puts out very little information and then the thread takes a life of its own, frequently with no further input from the OP. While most want to be helpful, its not terribly helpful or informative if the thread is going in directions 180 degrees away from where the OP needs help.

Posted by Ks Jeppe, 06-11-2007, 03:58 PM
Depends if you want to give the OP information, or future searchers as well

Posted by mwatkins, 06-11-2007, 04:15 PM
Wading through threads which have gone off in a million directions (we have GUI, web, console here, experimental PHP gui no less, sheesh!) are not as likely to be useful to future "searchers" as a thread which exposes a specific need - plainly written - paired up with useful, on target, answers. But I've said my point and have nothing to add unless the OP would be good enough to fill people in.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
installing ioncube (Views: 486)
MCHost Forums Gone? (Views: 501)
Mod security Rules (Views: 482)