[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1363
  • Last Modified:

PHP Encrypt publish files on web server

Hello,

I am .net Developer. I have recently started learning PHP as well.

In .net for deploying any asp.net web application, i used to publish the whole project, so it creates .dll file which i use to publish it on clients server. The beauty of .net is whatever source code(C# code) i write, is encrypted in .dll so client is not able to read and cannot access my source code so it s safe.

Can we do that in PHP? when i upload any pgp web application, what i have learned so far is need to upload all php files, class files to clients web server. Now if client can easily download those php file useing ftp software and have access to my source code. How can i protect my source code while uploading php web application.

thanks
0
ronipats
Asked:
ronipats
  • 3
1 Solution
 
Ray PaseurCommented:
Consider using IonCube software.
http://www.ioncube.com/php_encoder.php

However a better solution, more in keeping with current trends in web application development, is to host the web application in the cloud (or on your own servers) and give the client an API.  The advantage you obtain in a setup like this is that you not only get to protect your software, you get to hold the client's data.  It is an arrangement that will keep you in the driver's seat for a very long time.  You can learn more about API designs here:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_12239-Introduction-to-Application-Programming-Interfaces.html
0
 
ronipatsAuthor Commented:
Sir,
Thanks for comments.

Let me explain few things in details.

I am designing one accounting web application using php. I want to re-distribute this application to many clients who are interested in it.  I will distribute this application to both type of clients. (1. those who want to run this application offline) and (2. those who want to run this application online their web server).

1. For those who want to run this application offline. I will install and configure XAMPP on this machine and install/copy full published project on this offline server.

2. for those who want to run this application online, i will copy/publish this application to their web server using ftp.

Now in both this scenario which techniqies is best suited.

thanks
0
 
Ray PaseurCommented:
Did you read the links I posted?  When you have read about IonCube, if you still have questions, please post back here.

PHP may not be the right language if you want to distribute applications in the way you describe.  PHP is better suited to server-side web applications.  That is what PHP was, and is, intended to do.  

You can think of it as being like a passenger car.  It's designed to haul passengers on paved roads.  Can you use it to haul chickens on the farm?  Maybe, but the results are likely to be suboptimal for both you and the chickens.  You might want to consider some market research before you choose an application language.  It's easier (read: less costly) to make changes now, before the application has been deployed.
0
 
rfportillaCommented:
The only option is to have full control of the server.  Even then, if they can hack into the server, which in most cases is not too difficult, they will be able to read the file system and your code.  You can add some file system security to this mix, but you would not be able to give them a privileged user account.  PHP is not made to be secure.  

Even .net can be decompiled.  

There may be an option for obfuscation.  Another may be a semicompiled solution (which is closer to .Net) like hhvm.  I have not used it, though.  It looks like something similar to Java and its  JVM.
0
 
Ray PaseurCommented:
@ronipats: Perhaps you do not understand the grading guidelines.

In accordance with the Experts-Exchange Grading Guidelines, please explain why you gave the worst possible grade.

Thank you, ~Ray
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now