compile php to Windows

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
itp
Forum Commoner
Posts: 67
Joined: Fri Jun 15, 2007 6:50 am

compile php to Windows

Post by itp »

I would like to take an existing web site that uses HTML, css, javascript (including ActiveWidget javascript library) and PHP5 and create an executable file for Windows, or at least generate an application that can be installed easily by users, and that does not require installing a Web Server to run PHP.

I have seen posts for Roadsend.com, bcompiler and others products/utilities that claim to compile PHP code, but I am not sure how they would handle HTML, Css and javascript. Would I have to re-write HTML and javascript logic in a Windows compatible language and then interface to compiled php?

What other options do I have?

thNKS!
User avatar
Weiry
Forum Contributor
Posts: 323
Joined: Wed Sep 09, 2009 5:55 am
Location: Australia

Re: compile php to Windows

Post by Weiry »

A quick google lead me to two. Google Search

PHP Compiler
WinBinder

However, one thing i have noticed, is none of them seem to be up to date with the latest version of php. And im not even sure they carry a database application like MySQL which the majority of PHP developers would use when creating a dynamic application. WinBinder does say that you dont require a database server if your using SQLite though.
Cirdan
Forum Contributor
Posts: 144
Joined: Sat Nov 01, 2008 3:20 pm

Re: compile php to Windows

Post by Cirdan »

Learn C# and .net. PHP, HTML, CSS, and Javascript were not designed to develop native Windows applications.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: compile php to Windows

Post by daedalus__ »

why do you want to do this? :|

dont stick with php if your reason is "becuz its all i kno"

c#/forms is the way to go if you want to develop a desktop application. you'll have to adjust to strong types and bounds checking, etc. but it is a valuable skill to have.
itp
Forum Commoner
Posts: 67
Joined: Fri Jun 15, 2007 6:50 am

Re: compile php to Windows

Post by itp »

I ask the question because I support an web-based medical information and diagnostic site.
Someone asked how hard it world be to convert to Windows desktop application.

I think options are a complete re-write to a Windows .net solution like VB,C# -or- install
Apache server and run locally on PC/MAC as web application. Initial tests of loading
Apache/PHP on MAC and PC desktops have proved very time consuming and complicated for
non-technical users. A re-write is probably out because it is likely a several month project.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: compile php to Windows

Post by califdon »

itp wrote:I ask the question because I support an web-based medical information and diagnostic site.
Someone asked how hard it world be to convert to Windows desktop application.

I think options are a complete re-write to a Windows .net solution like VB,C# -or- install
Apache server and run locally on PC/MAC as web application. Initial tests of loading
Apache/PHP on MAC and PC desktops have proved very time consuming and complicated for
non-technical users. A re-write is probably out because it is likely a several month project.
The answer to your first question is: hard, very hard. As has been stated by others, the whole concept of HTML, CSS, Javascript, and PHP is to create platform independent web applications. To achieve the same, or even similar behavior as a standalone Windows application requires totally rewriting the application in another language.

I don't know why you had trouble installing Apache/PHP/MySQL on Max/PC/Linux platforms. It is very common and usually goes very smoothly. Often you can be up and running in an hour or so. Sometimes you might have a problem, usually due to misinterpreting installation instructions. I would definitely recommend this approach. If you have trouble installing the web server and PHP and database, if required, check back in here. We can help you through it. But ordinarily it doesn't even require outside help.
itp
Forum Commoner
Posts: 67
Joined: Fri Jun 15, 2007 6:50 am

Re: compile php to Windows

Post by itp »

I talked user through installation on a MAC. Apache and PHP were actually pre-installed on MAC, but first PHP had to be enabled in config file, which was difficult because config file was hidden, then we had to bring up servers and then user had to figure out where root directory was and how to point to to root directory using localhost URL. Not quite as easy as an auto-install Windows wizard.

I don't think that this is a reasonable deploy for non-technical users.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: compile php to Windows

Post by daedalus__ »

i don't think telling non technical people to install web server on their system is a good idea :oops:

what about a chm?
User avatar
JNettles
Forum Contributor
Posts: 228
Joined: Mon Oct 05, 2009 4:09 pm

Re: compile php to Windows

Post by JNettles »

What I don't understand is why the client would be wanting to move to a desktop environment.... Typically companies want to move into the cloud, not out of it.
itp
Forum Commoner
Posts: 67
Joined: Fri Jun 15, 2007 6:50 am

Re: compile php to Windows

Post by itp »

what about a chm?
I don't thinks Microsoft Compiled HTML Help (CHM) would be enough. We have have some math functions in the javascript and php. It would probably require a re-write, which is something we would like to avoid.
Typically companies want to move into the cloud, not out of it.
Windows desktop applications still make a compelling case when you are not always connected to the WWW.
User avatar
JNettles
Forum Contributor
Posts: 228
Joined: Mon Oct 05, 2009 4:09 pm

Re: compile php to Windows

Post by JNettles »

If you're programming for a desktop environment then I strongly suggest you use .NET.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: compile php to Windows

Post by Weirdan »

There are several commercial tools available aimed to make offline web applications creation easier.
Post Reply