How To: PHP Script To Windows EXE File Generation
PHP files are scripts which are interpreted by php interpreter (php.exe in windows). Converting them to exe files makes it easy to distribute PHP applications to Windows users. Unfortunately Zend, the PHP company, doesn't provide a way to convert PHP scripts to Windows executables. Today I am going to show you a simple way to convert your PHP scripts to regular Windows executable files (.exe). Not only that you can also convert an entire directory of PHP scripts and assign one of the files as the main file to execute first. Additionally the source files are encoded which not only improves the performance but also protects your source code. You can also set the icon for the file which is useful when you are distributing your PHP application as a stand-alone executable.
Bambalam PHP EXE Compiler / Embedder is a free command line tool to convert PHP applications to standalone Windows .exe applications. The exe files produced are totally standalone with no need for php dlls etc. The php code is encoded using the Turck MMCache Encode library. It's a perfect solution if you want to distribute your application to Windows users while protecting your source code at the same time. The converter is also suitable for producing .exe files for windowed PHP applications (created using, for example, the WinBinder library). It's also good for making stand-alone PHP Socket servers/clients (using the php_sockets.dll extension).
It's NOT really a compiler in the sense that it doesn't produce native machine code from PHP sources, but it works! Currently, the converter uses a PHP runtime based on PHP 4.4.4.
The tool is free and open source.
Usage:
bamcompile [-options] infile.php [outfile.exe]
bamcompile [-options] project_directory mainfile.php [outfile.exe]
bamcompile projectfile.bcp
Options:
-w Hide console window for windowed applications
-c Compress output exe (using UPX)
-d Do not encode PHP files
-e:extension.dll Embed and use PHP extension
-i:icon.ico Add icon to exe
You can download it here.
Filed under Headline News, How To, Microsoft, PHP, Programming, Web, Windows | Tags: Open Source |
5 Comments |
Email this Article
















March 24th, 2008 at 5:11 pm
thankss you.. soo much.
April 12th, 2008 at 8:30 am
Hello, how can I use PHP server to creat a web page please? Steps and requirements. Thanks
January 27th, 2009 at 7:17 am
hello,
i downloaded bambalam software and it has given .exe file also when i run the .exe file it is not showing anything does any changes has to made before running bambalam and how to connect with mysql is it any settings to connect mysql.
please anybody help me.
thanx in advance.
February 14th, 2009 at 10:18 am
anybody can help me, i dont know how to use this bambalam..i did click just like praveen said
please~
TQ
March 10th, 2009 at 2:41 pm
how to make browser disablde pop menu, read only, can’not copy, can’t save as, and how to execute exe file with php ? please help me
May 5th, 2009 at 9:10 am
I have done a project in PHP. Now i need to know how to use php to exe converter(such as bamblam)
May 5th, 2009 at 9:11 am
I have done a project in PHP. Now i need to know how to use php to exe conveto
r(such as bamblam)