Contact: Web / Voice / Email / Tips
Simple Thoughts Blog - Java and Web Technologies

Simple solutions for complex problems.

 

How To: PHP Script To Windows EXE File Generation

March 22nd, 2008 by Angsuman Chakraborty

PHPPHP 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 to EXE ConverterBambalam 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.


Tags: Headline News, How To, Microsoft, PHP, Programming, Web, Windows | | RSS 2.0 | Trackback this Article | Email this Article

You may also like to read

»How To Make Friends on MySpace Automatically
»How To Use AWK To Simplify Scripting: Multi-Database Backup Example
»Subversion: How To Ignore Files From Status Display
»All Destops Are NOT Apple!... At Least Not Yet.
»Simple Logging in PHP (File based & one-liner)
»How To Quickly Backup HSQLDB Database...
»How To Backup PmWiki in Subversion (Code)
»Creating link files (.lnk ) files in windows
»Windows Vista: How to Install Second OS / Manage Boot Configuration Easily
»How To Add Functions To Javascript onload Over Third Party Scripts; Playing Nice
»Search
»Google Pages Allows GMail Email Harvesting
»How To Burn Cross-Platform Readable CD's in Windows Vista
»How To Display AdSense & Yahoo Publisher Ads Using AdRotator Plugin for WordPress
»ZoneAlarm Firewall Crashes (BSD) Asrock Motherboard Systems

No Responses to “How To: PHP Script To Windows EXE File Generation”

  1. prefabrike Says:

    thankss you.. soo much.

  2. Azad Says:

    Hello, how can I use PHP server to creat a web page please? Steps and requirements. Thanks

Looking forward to hear your thoughts.



Please enter the code shown below ( to verify that you are human ) before you click Submit Comment.

No. 1 method to ethically increase your blog traffic and reach.

Translate

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanPřeložit do Čech/CzechOversætte hen til Dansk/DanishKääntää jotta Finnish/FinnishLefordít -hoz Magyar/HungarianÞýða til Íslenska/IcelandicTraducir a Latinoamericano Español/Latin American Spanishtagapagsalin sa Filipino/FilipinoTłumaczyć wobec Polski/PolishA traduce la spre Român/RomanianPrevesti za Srpski/Serbiantolmačiti v slovenski/SlovenianÖversätta till Svensk/SwedishChyfieitha at Cymraeg/Welshtercüme etmek -e doğru Türk/TurkishPrevesti to Hrvatski/CroatianПревеждам към Българин/BulgarianTraduzca al Español/SpanishTraduisez au Français/FrenchTraduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplifiedترجمة الى العربية/ArabicVertaal aan het Nederlands/DutchΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/Norwegian中文翻译/Chinese TraditionalTraduzir a Língua portuguesa brasileira/Brazilian PortugueseReddo ut Latin/Latin

Taragana Network

»Ctrl-S
»Enterprise Blog
»Free Book on Eye Care by Natural Therapy
»Health Care Blog
»Hot Computer Jobs Blog
»Pet Care & Grooming News and Tips
»Phil Law Blog
»Taragana - Software Outsourcing
»The Angsuman Chakraborty Blog
»The Diabetes Cure Blog
»The Eye Treatment Blog
»The Stem Cell Blog
»Weblog Hosting Blog
"We can't solve problems by using the same kind of thinking we used when we created them." - Albert Einstein