0

A month ago a client asked me to develop an application, he didn't mention weather it’s a desktop or a web application.

So I chose to develop a web application using the symfony framework

Now the application is working fine, the client is satisfied, but a problem comes up

actually the client want to sell that application to his customers, so he want me to hide the source code, in other words he want me to deliver an archive or something so that his clients won't read the code. I don't know how to hide PHP code, now if I can't find any solution I have to start from scratch and develop the application using java :/

After googling

  1. Hiphop: a PHP compiler, its main purpose is to speed up the code. The fact that it becomes unreadable as a compiled executable is a bonus.

  2. PHAR archive: like JAR in java but I think it's easy to read the content of the archive

Any suggestions ?

benaich
  • 912
  • 11
  • 29
  • My suggestion would be to host the application and charge users for access to it. It would require a user management system but it would be a sure-fire way. The downsite of your situation is: if a computer can read the source code, a human can read the source code with enough effort. If you dont want the users to have the source code, you don't give it to them. – castis Mar 13 '15 at 22:53
  • I think first thing you had to do is sign a contract with all the rules valid to this project. I have no idea how you developed the application without knowing is it a web application or it has to be packed to sell as a software. – Paul Denisevich Mar 13 '15 at 22:54
  • @castis thanks for the suggestion but the client want to sell the application to other customers – benaich Mar 13 '15 at 23:03
  • @PavelDenisevich I'm a beginner in freelancing, I starve for experience so no contract needed – benaich Mar 13 '15 at 23:05
  • 1
    Going on what @castis said, There should be 0 expectation of making an unreadable for a working desktop application. My recommendation would be to run your code through an obfuscater then package it up into a phar. IF it has to be a desktop app. HOWEVER you really should just make it a white-label capable web application, then you can still sell it to other people. – Chase Mar 13 '15 at 23:12

2 Answers2

1

Pack the application into an virtual appliance using VirtualBox, and disable the login on that virtual machine.

Apart from being the best possible solution to your 'problem' it also makes things easy for end user and your client. It is not perfect solution, but it is as good as you can get.

McKracken
  • 680
  • 8
  • 17
  • That's a rather clumsy way of packaging an application. Worse, though, it's not even effective. Mounting a VirtualBox image externally and extracting files from it is easy. –  Mar 14 '15 at 04:06
1

What you seem to be looking for is a PHP encoder. A number of these are available commercially; two of the more commonly used ones are Zend Guard and IonCube.

Note that both will require a special PHP extension to be installed on the target machine, and may place some special requirements on your application. (In particular, Zend Guard currently only supports PHP 5.4.)

  • The end user planned to sell the app to end users to be run as *desktop app*. Expecting end user to have extensions PHP, even PHP itself is clumsy. – McKracken Mar 14 '15 at 06:02
  • @McKracken That's not actually stated explicitly in the question anywhere. The question is asking for a way to create an "unreadable archive" of a PHP application, which is what a PHP encoder does. If they actually want a desktop application… well, that's an entirely different question. –  Mar 14 '15 at 06:05
  • @duskwolf From experience, having a client that is not capable to early enough communicate that he intends to sell the application to others justa makes usage of anything that requires even thinking about which version of php you have a royal pain. Hence the appliance, that can be provisioned with ZendGuard or sth like it. It is entirely possible that I have thought more of the business reasoning behind it than plain technical ones. – McKracken Mar 14 '15 at 06:11