I have a command line php app that I need to distribute to a client. I just want to give them an executable, not instructions for installing php ;)
What is a good php compiler for windows that includes support for php 5, curl, TLS, and a few other libs I use?
I need to control memory and time limit usage, so I must be able to use a custom php.ini. (this should be packaged in the exe as well, not a separate file)
Additionally, I don't want the code to be easily extracted. This isn't a huge requirement, but I'd rather not have the source viewable in a hex editor.
I've got a few hits on Google, but if anyone has actually used one, your feedback would be invaluable.
edit
If I knew I was going to distribute this to the client when i started, I'd have used C#. But I didn't. Now they want to buy it. It needs to be DEAD SIMPLE. one executable containing the php interpreter and my script plus an entry point to start my script when the exe is run.
It would also be great if I didn't have to redistribute dll's either.
edit2
I am look for somthing along the lines of phc, or roadsend. phc doesn't support windows, and roadsend doesn't support php5 in windows.
Okay I figured it out. there is a open source program called phc-win. It supports php 5.3.1, compiles scripts to byte code (obfuscation!) and is simple to use (It even has a gui).
It needs a php-embed.ini and whatever DLL's you use, but it just works.
Thanks for all the answers everyone!
phc-win 0.3.1 (c) 2009 Andrew Fitzgerald - [email protected] PHP Version: 5.3.1
To compile a single file:
- Choose 'Compile single file' from the File menu.
- Then select the file to compile.
To build an EXE containing all files in a directory and all sub directories:
- Choose 'Compile directory' from the File menu.
- Select the project folder.
- Select the main program file.
- phc-win will then recursively scan the specificed directory.
- All files with 'php' anywhere in the extension will be compiled into .phb files.
These .phb files, along with all files in the directory tree will be added to the project EXE.
Once the EXE has been created, you will be asked about the EXE type:
- CONSOLE (displays DOS box)
- WINDOWS (no DOS box).
Place the EXE in the same directory with the required DLL file(s) and php-embed.ini file if needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With