View Full Version : Embeding PHP, MySQL and Apache?
02-10-2010, 09:36 PM
Let's say I have a small CMS script which is based on PHP, MySQL and Apache... is there anyway I can embed all these in a .exe file?
desperately looking for this solution, as I have developed a script and clients are complaining and wanting to have the software locally installed :'(
02-10-2010, 09:52 PM
There is a project called bcompiler. It's labeled EXPERIMENTAL in the PHP manual.
02-10-2010, 10:00 PM
Anyway we can use that bcompiler in windows?
02-10-2010, 10:31 PM
You are now as familiar with bcompiler as I am :p
02-10-2010, 10:37 PM
Why do they want it locally installed?
There are all in one packages of those programs like xampp. It would install what you need and then just drop your PHP scripts into web server root.
02-10-2010, 10:38 PM
oracleguy!!!!!!!! what an idea that is!!!!! xampp is what I was looking for .. Thanks a million
02-12-2010, 03:10 AM
Everything works perfectly!, now what I need is, I want a simple dedicated browser, where I want to open the http://localhost/index.php in it
Is it possible? I have done one using Visual C# its called Gecko/XUL Runner something.
02-12-2010, 03:17 AM
Couldn't you just set the home page to http://localhost/ and also create a bookmark? Then they can use the browser as both a browser and an application for your cms
02-12-2010, 03:22 AM
Thanks for your ideas, yes, I can do that but I think a dedicated browser would be much better, because if I change their homepage to localhost/cms then they might want to change it later on, bookmark will be better, but I am thinking of a dedicated browser because the address bar etc are are not needed :-S
02-12-2010, 04:05 AM
Take a look at:
Take a little time to read over the features. Most of the more interesting ones like shell execute slipped by me at first.
It also has an internal SQLite engine. Definitely worth taking a close look at the help documentation. Not free but might be exactly what you need.
02-12-2010, 04:38 AM
WOW matty, thats the one I need, :( but expensive..... can you help finding an alternative?
02-12-2010, 12:02 PM
All I can tell you is that I had similar needs. This was the best I could find. There are other compilers out there but few support PHP and SQLite, most use TCP meaning you can packet sniff the content right back and some look good but are not maintained (no updates since 2007).
I was googling under "website compiler".
Perhaps it is worth the price. Assuming your application is for work maybe they'll fund it. If you find an alternative, please do let me know.
Now if you don't care about source code protection you may wish to double check up on Titanium from http://www.appcelerator.com/ I don't know if it has all teh features you need but it may come close.
02-12-2010, 02:48 PM
Thanks for the ideas, I will see, I think it will be better to stick to xammpp and then use a software like "wise installation" or something to keep all files together and then what the user will do is to just install the software and run the xammp_start
Is there anything easier than that?
02-12-2010, 03:13 PM
Will you be installing the software yourself? If so why not just add a different browser, set the homepage to localhost and then hide the address bar and any other toolbars you don't want to show. I know it's not perfect, but it would not cost you anything and is fairly simple to do
02-12-2010, 03:16 PM
No I am not using the software myself, but customers will use it. Let's say I developed a expenses calculator which is 1 page script based on PHP and a bit of Ajax, so what I need is put all the xampp files in an installed, once the user install it it will goto Program Files/calculator and they will need to run the xampp_start
Is there any easy way to get this done?
02-12-2010, 05:13 PM
Perhaps you should simply use a tool that is made for your purposes; something like Visual Basic perhaps.
02-13-2010, 02:23 PM
muneeba9071: No problem.
One thought occurs, would other people on the customers network be able to connect to the XAMMP solution running on the customers machine? If so have you considered security? You might want to use non-default ports, authentication and incorporate a system firewall rule at the same time.
Imagine EvilGuyA looks at network and discovers BossA is running a webserver. Access it and has access to your app. Even if you put in basic authentication EvilGuyA only needs to to figure out how to crash the 'now aging' xammp version installed. A quick Google reveals a later version that fixed known bugs, google hacking sites and you have exploit code... etc. EvilGuyAgets fired (cos he is evil) and uses the attack on his last day. Company tries to figure out who to sue or at least yell at once they've put the pieces together... if they paid you for it I suspect the sakes increase.
The point is webservers need securing and updating. Which is work you may be setting yourself up for or a risk of consequences if you don't. the risk may be fine for you and the work load low, I don't know. so long as you have it considered. Perhaps there are measures you can build in.
Fumigator mentioned Visual Basic. I'm in the same boat I developed web app and now want to install locally. VB would be a better choice but little time to redevelop. Hence ZZEE being worth the investment for me.
I still think ZZEE would be a better solution but it matters not if it is fiscally out of reach. I really hope someone finds a cheaper version of the same or ZZEE drop prices.
Good luck either way.
02-13-2010, 03:27 PM
Very nice discussion..
You are right MattyUK, there will be ports problem, because I tested xammpp on a computer where there was already an apache server running and it messed up the server :(
So I think, ZZEE will be the only option :-S Let's see if someone come up with any ideas.
02-13-2010, 03:38 PM
The visual basic option sounds like a viable solution. You can run apache on ANY port number. You just need to change the port number in the httpd.conf file.
Running it on something like port 2000 or just a random number (below 65535 and above 1024 to be safe) should be fine, and only requires a small change of the httpd.conf for each install (or save the httpd.conf and copy-paste it each time)
Not sure but it might even be configurable in the xampp installer
02-13-2010, 03:45 PM
Yes it is configurable in xammpp, Jay, can you please explain the visual basic solution in brief?
02-13-2010, 03:47 PM
In visual basic you can make your own browser which you can configure to connect to a certain url of your choice. This means you can restrict it to your specific server and port number if you wish, but it will still show the same way it would in the browser
02-13-2010, 03:51 PM
I see, I have tried that solution and used XULL and gecko for that, but there were few problems, first problem was, it was very very slow, secondly the user has to run the xammpp_start manually in order to start the webserver.
02-13-2010, 03:53 PM
You can set the xampp up as a service and get it to run automatically. You could also get visual basic to run the xampp start if it's not running
02-13-2010, 03:55 PM
Jay, can you help in finding a tutorial to get this done
02-13-2010, 05:31 PM
02-13-2010, 06:17 PM
I meant a tutorial for turning on the xammpp service from VB
02-13-2010, 06:19 PM
I used "how to launch an application in visual basic" in google and got that. You should really try and use google before posting questions. It's your friend
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.