Jaslabs: High performance Software

High Performance Software

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

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati

20 Comments so far

  1. Symfony2Exe - SymfonyLab October 25th, 2007 9:04 am

    […] 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 […]

  2. […] 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). […]

  3. […] 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). […]

  4. A.P.Palaniraja October 28th, 2007 1:37 am

    why embedded IE instead of Firefox?

  5. Justin Silverton October 28th, 2007 10:37 am

    “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.

  6. Logicoder October 29th, 2007 11:55 am

    Unfortunately it seems a bit dead… have somebody tried to download the source and rebuild with newer PHP ???

  7. piotr October 30th, 2007 11:16 am

    Have you any problem with JavaScript on this blog page?
    I am only able to see it with JavaScript disabled.

  8. Justin Silverton October 30th, 2007 11:35 am

    “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.

  9. […] 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. […]

  10. karthikeyan November 1st, 2007 2:36 pm

    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

  11. […] Read More […]

  12. Jay November 4th, 2007 11:01 am

    Very interesting.. but I can’t find any documentation or tutorial how to include MySQL. Anybody?

  13. […] Un atkal - par šo uzzināju Jaslabs: High performance Software blogā. […]

  14. Adam November 13th, 2007 12:02 pm

    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.

  15. Tims Blog » Blog Archive » Games and games November 19th, 2007 9:55 am

    […] turn a php script into an exe […]

  16. Christian Rivera December 26th, 2007 6:06 pm

    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

  17. […] 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). […]

  18. Sam Moshe January 25th, 2008 11:34 pm

    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.

  19. Jive February 1st, 2008 8:56 am

    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…

Leave a reply