0

I have developed an application in PHP that acts as a service; I mean it does not need to be run under a Web Server. I want a way to protect my libraries so I can release a commercial version along the open source one. What do you recommend to compile the code or any other method to achieve this purpose, please?

Alexar
  • 1,858
  • 5
  • 24
  • 34
  • Depending on what you really mean by *compiling*, this is a possible duplicate of [Can you "compile" PHP code?](http://stackoverflow.com/questions/1408417/can-you-compile-php-code) or [Code obfuscator for php?](http://stackoverflow.com/questions/232736/code-obfuscator-for-php) – Gordon Dec 18 '10 at 23:55
  • thanks, but you'r not right. i know about compilers. i have asked about my specific need, compiling a CLI php application. those you mentioned, one asks for a general compiler and one asks for his specific need. so they're not related to my question. – Alexar Dec 20 '10 at 09:01

2 Answers2

1

We have used Zend Guard on one of our projects due to such requirement. Aside from minor code modifications (removing autoloader and similar), it worked out well. The only downside is the licence price, but since it was paid by client as it was their request, we had no problems with that.

Update: Forgot earlier, project was mostly web based app, but there was around 8-10% of it CLI, and there was no problem with it either.

David Kuridža
  • 7,026
  • 5
  • 26
  • 25
0

Something like this: http://www.phpcompiler.org/

ifaour
  • 38,035
  • 12
  • 72
  • 79
  • thanks, i've seen that. have you used it or any experience about it? – Alexar Dec 18 '10 at 20:09
  • 1
    No I don't, but you are asking for a protection this is why I listed this compiler "# Obfuscate PHP code (--obfuscate flag - experimental).", but I really have no idea how good this compiler is. Also check this post, it may help in someway:http://blog.paulbiggar.com/archive/a-rant-about-php-compilers-in-general-and-hiphop-in-particular/ – ifaour Dec 18 '10 at 21:22
  • thanks about the article. it changed my mind about phc (http://phpcompiler.org) and hiphop completely!! – Alexar Dec 20 '10 at 09:03