Solved

PHP Encrypt publish files on web server

Posted on 2014-03-28
7
1,170 Views
Last Modified: 2014-06-15
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
Comment
Question by:ronipats
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39961310
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
 

Author Comment

by:ronipats
ID: 39961367
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39961400
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
 
LVL 9

Expert Comment

by:rfportilla
ID: 39961416
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 40119232
@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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question