Solved

PHP Encrypt publish files on web server

Posted on 2014-03-28
7
1,210 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

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…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

688 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