Solved

PHP Encrypt publish files on web server

Posted on 2014-03-28
7
1,128 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
  • 3
7 Comments
 
LVL 109

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 109

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 109

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php construct 5 27
google map tracking website 5 24
showing loader for php/mysql/ajax live search 13 26
Which userID to use for shopping cart application 13 19
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

810 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