How to turn a php script to an exe..for free
There are a few commercial products out there that allow you to turn your php scripts into an executable. While most of them work well, I have found a way to do it for free, using an open source application. This application is called Wapache (based on the apache web server) and it is open source (distributed under the Apache License 2.0).
WApache doesn’t convert your script directly into an executable, it runs on the combination of a windows app (which uses an embedded IE control) and a stripped down version of apache.
Features
- No Internet Explorer menu, tool bar, or address bar.
- Precise control over placement of windows
- Three types of windows: basic, tool windows, and dialog boxes (modal and modeless)
- Fully customizable drop-down and context menu
- System Tray integration
- Asynchronous data handling
- Works with standard Apache modules like mod_php and mod_perl
screenshot

(this is a screenshot of wapache running phpmyadmin)
How to turn your php script into an executable
1) copy all of your scripts/files into the htdocs directory (make sure that the main file is called index.php)
2) launch bin/wapache.exe
3) you will now see your php script in the application that is running
There is also many options that allow you to configure the app in many different ways. This can be found on line 100 of conf/default.wcf (documentation for this config file can be found here):
<StandardWindow Main>
HorizontalAlign Center
VerticalAlign Middle
Height 60%
Width 60%
3DBorder Off
IconPath "../icons/lightbulb.ico"
</StandardWindow>
This could be used for a demo/trial of a web application. A windows installer could also be used (NSIS works well and is free) to create a fully installable, desktop application.
Since this only relies on the apache web server, it’s also possible to use this with any type of supported scripts.
Download
The latest version of Wapache can be found here
20 Comments so far
Leave a reply






[…] Symfony2Exe Add I have just read about an ability to convert php applications into exe with Wapache project: How to turn a php script to an exe..for free […]
[…] From the JSLabs blog today, there’s a mini-tutorial on how to convert your PHP files into executable files (.exe) to be used on Windows. There are a few commercial products out there that allow you to turn your php scripts into an executable. While most of them work well, I have found a way to do it for free, using an open source application. This application is called Wapache (based on the apache web server) and it is open source (distributed under the Apache License 2.0). […]
[…] How to turn a php script to an exe…for free Posted in October 27th, 2007 by admin in Free Tools, News, PHP, PHP News From the JSLabs blog today, there’s a mini-tutorial on how to convert your PHP files into executable files (.exe) to be used on Windows. There are a few commercial products out there that allow you to turn your php scripts into an executable. While most of them work well, I have found a way to do it for free, using an open source application. This application is called Wapache (based on the apache web server) and it is open source (distributed under the Apache License 2.0). […]
why embedded IE instead of Firefox?
“why embedded IE instead of Firefox?”
Probably because there isn’t an easy way to embed it. I’m not sure if I have even seen an embedded version of FF.
Unfortunately it seems a bit dead… have somebody tried to download the source and rebuild with newer PHP ???
Have you any problem with JavaScript on this blog page?
I am only able to see it with JavaScript disabled.
“Have you any problem with JavaScript on this blog page?
I am only able to see it with JavaScript disabled.”
We have been making some changes/updates to our site. Is it working for you now? I just tried it on FF and IE 6/7, and I don’t see any issues with javascript.
[…] and posted on October 30, 2007 at 2:24 pm and filed under Programacion, Internet. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Both comments and trackbacks arecurrently closed. […]
It a very nice to use this method for converting php files in to exe formate, but i would like some one to solve my issue when using this package.
After incorporating my php files i can able to view my phage and it works fine, but if i found any image, i cant able to save the image as such format available in the application.
For Eg: if jpeg image was found, while right click he image and if i save, i am getting as “untitled” as bmp formate.
some one could resolve my issue it will be great,
thanks in advance
[…] Read More […]
Very interesting.. but I can’t find any documentation or tutorial how to include MySQL. Anybody?
[…] Un atkal - par šo uzzināju Jaslabs: High performance Software blogā. […]
[…] (source: http://www.whenpenguinsattack.com/2007/10/25/how-to-turn-a-php-script-to-an-exefor-free/ ) Share This […]
Good but I think PHP should really stick to what it’s best at - web programming. There’s very little memory management in PHP, although more than a lot of coders think.
[…] turn a php script into an exe […]
Hi does any body tried to use it with some ajax tutorials from www.ribosamatic.com I got this error:
an error has ocurred in the script on this page
Line: 9
Char: 1
Error: Object Expected
Code:0
URL: http://ribosomatic/index.php
Do you want to continue using script on this page?
Thanks
Chris
[…] Buscando por la red algunos ejemplos académicos de AJAX, y otras virguerías en PHP, me he dado de pleno con YAML (Ain’t Another Markup Language) y Symphony (framework PHP). […]
You know, I was really impressed with this particular incarnation of apache. Just wanted to comment on something a previous poster said about embedding firefox. Now, I don’t know about an embedded firefox in particular, but there is an embeddable version of Mozilla called MozillaBrowser that claims to be an equivalent implementation of the IE control using Mozilla. Problem with it is that it’s a little dated, and it seems to be missing features that are simple with an IE control. That said, there’s always something like XULrunner, which could probably be used instead, and uses a new version of the framework. Just a thought.
anyone tried including external content using wapache? I can’t get iframes or frames to work - it only looks in the htdocs folder for content. I tried :
echo file_get_contents(’external-address’) and that works but not really much help in my case. I’ll update if I find a way…