ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

PHP Compilers to make standalone PHP-Exes

(1/1)

JoTo:
Hi DCs,

our great mouser found another free PHP-Compiler to achieve standalone executables from php scripts. As he is in deep meditation now about the new blog portal feature of our great site, he wished, as he knows that i am interested in this sort of programs, that i'll do the job of looking at them and post about my very first opinion and experiences.

mouser found (so far) the following alternatives:

- Roadsend PHP Compiler
seems to be the best and completest, but it is commercial and very expensive (about $139 for a personal licence) (see: http://www.roadsend.com)

- phc-win
A compiler that goes together with winbinder (see: http://winbinder.org/), a windows api binding for PHP. (See: http://winbinder.org/forum/viewtopic.php?t=282)
It confuses me a little, at the first look, but it sounds interesting. And its free. Cons: It needs beside the application exe at least some extra dlls in the appdir (a php-dll and the winbinder.dll). So you have not really a single, stand-alone application. But there is no need to install sth. Just deliver the dlls with your app and you're set.

- bambalam PHP Compiler
Another free PHP Compiler that sounds interesting. It is based on PHP 4.4.x (5.x will come as the author states) and has some php-libs statically linked within the "core". It creates a really single, stand-alone file of your app that dont need any further files. If you need php-extensions, you have to have a own php.ini with the php-extensions variable set with relative paths and the neccessary php-files in the app dir too. Then bambalam claims, that it can compile a single file exe, (including php.ini and the extension libs) that can access these extensions like the builtin ones. Exes can be compressed automatically (via a commanline option) with upx to get smaller results.
(see: http://www.bambalam.se/bamcompile/)

Both free compilers can compile multi-script applications. You can compile a whole directory of php-scripts of an application together in one executable. Then you have to tell the compiler which script is the main/startscript.

I have quick-tested both free compilers only with a single phpinfo-script yet. Both worked for me. Pro for bambalam over PHC, it was really only a single EXE-file, while phc needs more "helperfiles" (dlls). Not tested Roadsend, because i feel it is too expensive to purchase when there are free alternatives.

As i said earlier: Have not tested very much and have not digged in very deep in both free compilers so far. But i will test both more deeply in future and report.

Maybe there are more experiences with this by other users who will contribute with informations. If there are more free PHP-Compilers out there, this will be a helpful information too.

CU
JoTo

mouser:
awesome post, thanks joto! :up:

app103:
Bookmarked!

Sooner or later someone is going to ask me about something like this and I'll just send them here.

Thanks joto!

Navigation

[0] Message Index

Go to full version