A blend of programming and seo

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

wapache screen How to turn a php script to an exe..for free
(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

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Reddit
  • Twitter
  • HackerNews
  • StumbleUpon
  • Technorati

3 comments

1 Justin’s Blog: How to turn a php script to an exe…for free | Cole Design Studios { 05.14.09 at 2:05 pm }

[...] a new post to his blog today Justin points out a tool you can use – WApache – to turn your PHP script into a [...]

2 Andre Vitorio { 05.27.09 at 12:11 am }

Interesting post.
Could I create, with this, a .exe that runs wordpress, or oscommerce?
Let me know.

3 Justin (rawseo) { 05.27.09 at 8:21 am }

@andre,

yes, you could. But, it would only be running locally on your own machine.

Leave a Comment