Wapache : Making desktop application in PHP

This one is kind of very handy if you want to create a desktop application which can have serverside processing in PHP. Though there are nattive libraries of PHP to create desktop application, but the problem here is distributing the application. If the application needs to be a desktop application and be distributable then there is no option we can have it running with PHP :( .

The good news is Wapache. A very nifty simple opensource framework on top of Apache server. Just copy it to any where and start running the exe in the bin folder.Voila, all your dynamic webpages will run in all the windows desktops. Wapache bundles an Apache server, PHP libray and internet explorer in it. The framework it self comes with the handy demo files which exposes all the properties we can play around with.Making a full screen window,making a chromeless window,defining size of create window are just some of the things Wapache can do. Just for an usage example, say we need database admin tools such as PhpMyAdmin or PhpPgAdmin to run in our machine. We already have Mysql or PgSql running, but then we need to install Apache and PHP to run the admin models! Just put “PhpMyAdmin” or “PhpPgAdmin” in the Wapache folder and link it in the index page.Whew, there you go!! Its that simple.

Though it would have been better if Wapache could serve to any  platform.I think this project needs a lot of deserved appreciation than it is getting now. A very well thought and well done project. Cheers to Wapache.

35 thoughts on “Wapache : Making desktop application in PHP

  1. Wow! This is marvellous for us PHP developers. I didn’t know about this project at all – thanks for posting the blog entry.

    I will sink my teeth in it over the weekend :)

  2. hi saumya
    Is it possible to make an exe file selecting entire php project with mysql database using this wapache software? can you send me information about this in elaborate

    sai gopal

  3. ei saigopal. based on what i have understand on your question, you are thinking of if using this software wapache, your php file and mysql will be converted to .exe.. well, it isnt like that. but based on your php codes you can create desktop application by just configuring the wapache. i’ll show you how. maybe i’ll create a tutorial for this in my site.
    http://www.ads.0fees.net

  4. Hi Saumya,
    Needed to re-install Flash plugin in IE. Have embedded SWF inside a HTML page, and it’s working now. Thank you.

  5. My pleasure. Glad it worked.
    About the Flash plugin, I hope yes. One need to update that. As the library itself is quite old and current flash player must not be present in there. Thanks for the tip ;)
    Cheers

  6. Hello Saumya

    Thanks for your site. I downloaded Wapache.

    Looks like Wapache has already included mysql. But I cannot connect to the database from the command-prompt like i do the following in Wampserver:

    C:\>c:\wamp\bin\mysql\mysql5.1.36\bin\mysql mysql -u root

    Admin account set-up:

    C:\>c:\wamp\bin\mysql\mysql5.1.36\bin\mysqladmin -u root password 12345

    Admin log-in:

    C:\>c:\wamp\bin\mysql\mysql5.1.36\bin\mysql -h localhost -u root -p

    Can you tell me how i can connect to the Wapache database please?

    Thank you.

    Habib

  7. Hey Habib,
    I am not sure if Wapache contains MySql !! As far as I know its Apache and PHP.
    Well, anyway I am sorry, could not help you in that front.

    But I think, you already know that if you have a database in your machine, you can very well configure your Wapache for that.

    Cheers

  8. Can wapache run remote files? I mean, can wapache run the files from other site?
    Because, i have developed an application and packed it with wapache. Now i want to distribute this app to one of my clients. But i dont want him to view my source code.

    So iam wondering whether i can make wapache to run files from a remote site, where i host my files, instead of wapache running the files in htdocs folder. Is it possible ?

  9. Hey Shashi,
    thats an interesting thought. But i am not sure about that. Will let you know once I get anything on that line. In the mean time, let me know, if it works for you.
    Just thinking, if at all, you have to serve the files from a server, why not process it on the server.

  10. Hi Saumya,

    Hope you’re well.

    I’m using the ‘commonly used command identifiers’ to interact with the contents of the wapache window:
    http://wapache.sourceforge.net/menu_conf.html#BasicMenuItem

    I did some searching online:
    http://cdserv1.wbut.ac.in/81-203-1773-4/workshop/author/dhtml/reference/commandids.htm

    and by trial and error found some others that will work:
    IDM_ITALIC
    IDM_INDENT
    IDM_HORIZONTALLINE
    IDM_FIND

    So, for example to open up a Find dialog box from a wapache drop-down menu I typed:
    BasicMenuItem “&Find” _this IDM_FIND

    I’m sure there would be a few more, and am wondering where I could find a complete list of available commands.

    Your help appreciated.

    David

  11. Saumya, im now starting to dig my PHP skills to our desktops, do you have any tutorials there to start with this wapache?

    thats all . thanks for the post.

    1. Hey Mak,
      Sorry for not writing up any tutorials on this, but I am sure the demo which is budled into Wapache is a good and easy start.

  12. Saumya, i m nw starting my skill in php but i want to develop desktop software in php, is it possible if it is please suggest any tutorial to help me to develop desktop

    thanks in advance

    1. Hi Dumi,
      AJAX is possible as its frontend implementation only and you can do it with Wapache as it give a server to host your files.
      Unfortunately as with other web applications, one has to host the source code in the server and that means Wapache will contain your soruce code.
      Hope that helps.

  13. i copied all my php pages into htdocs, but how to connect it with mysql database, so that it will run dynamic pages, please explore this…..i wil be very thankful

  14. hi there !,
    do you know if it is possible to change the icon of the wapache.exe file inside of the bin folder?
    I would like to edit it,
    Thanks !

  15. hi tony,
    I am sure its possible to change the icon. I am currently not having the folder with me, But have done this is a past project. So I am sure about it, you may need to search a bit inside the source folder and replace the icon image.
    cheers

    1. hi,
      I am working at a desktop application and I need to get the path to a file. i’ve used a input file but if i run it on Internet explorer 8 or 9 wapache put C:\\fakepath\\ before file name. Do you have any idea how can I make it to get the real path? thanks:)

  16. I just came across this blog, have used wapache, the database is no problem, just use sqlite! the database is then in flatfile. worked a treat with a cd / dvd catalogue that I built for a friend. Lost my copy in a pc crash unfortunately, and I’m just starting a rebuild now.

  17. hi saumya. basically im a php developer.. im trying to create a dektop application using php. and i found wapache. but i need to connect database too. how can in connect wapache programme with mysql or other database?? is it any other option to store my data(like file creation or connect with ms access, or xls) pls reply ASAP

  18. I tried my application with wapache, but session is not working, how to resolve this? i dono whether cookies is disable or not

Leave a reply to saumya Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.