2

Forgive me if the question looks silly. I was wondering that, when we develop a project in Codeigniter, we give entire source code of it to user and he/she uses it and is also able to make changes in the code.

Since, sometimes he/she don't understand code, some undesirable changes made by user may cause the application generate error or malfunction. In other words, it can be concluded that I am looking for some kind of encryption technique, that will work just as normal PHP code do but will be in encrypted format.

Is there anything, that enables users to use the application, but won't allow him/her to make changes in the code? And the working of application should also remain intact.

V15HM4Y
  • 1,757
  • 4
  • 26
  • 40
  • 2
    encode your php. there are commercial encoder called `Zend Guard ` from http://www.zend.com. – DevZer0 Jul 10 '13 at 11:59
  • 1
    Not really. I suppose you could encrypt your source code, but this doesn't always work with frameworks, and won't stop someone from breaking something anyway. It's better to tell your customer which folders they can edit (markup and styles) and which they may not. – halfer Jul 10 '13 at 12:00
  • You could supply your source code tarball with your Git folder in it - that will make it very easy to see if someone has tinkered with something they should not have `:)`. – halfer Jul 10 '13 at 12:01
  • Beware of possible license issues. I may be wrong but if you use open source code you have to keep it open source (usually) – STT LCU Jul 10 '13 at 12:02
  • Interesting question. I guess encryption or hiding/storing any sensitive code elsewhere, but again, that probably breaks the contract. – Shomz Jul 10 '13 at 12:02
  • @STT, you can get around that (in the spirit of the licenses, imo) by simply offering links to the original sources. – halfer Jul 10 '13 at 12:02
  • Need more info on the scenario. Do you release the code to the user's server or does the user get access to your server? The problem can be solved either through obfuscation, or through POSIX access management (simply deny access to folders not related to the MVC area of CI). – Maxim Kumpan Jul 10 '13 at 12:04
  • Why do you care if other users edit the code? It's their problem. Can you explain more about the product and situation? – Wesley Murch Jul 10 '13 at 12:07
  • @all I am looking for some kind of encryption technique, that will work just as normal PHP code do but will be in encrypted format. – V15HM4Y Jul 10 '13 at 12:08
  • @DevZer0 Zend Guard will encode the code. Does it also decodes it? – V15HM4Y Jul 10 '13 at 12:44
  • @V15HMAY one way encode, you need Zend Guard Loader (for PHP 5.3 and 5.4) or Zend Optimizer (for PHP 5.2 and earlier), to run the code. – DevZer0 Jul 10 '13 at 13:02

1 Answers1

2

server him with encrypted code: something look like this.

 Before encode

<?php

  echo "Hello World";

?>

After encoded

<?php $_F=__FILE__;$_X='Pz48P3BocA0KNWNoMiAiSDVsbDIgVzJybGQiOw0KPz4=';
eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLC
cxMjM0NTZhb3VpZScsJ2FvdWllMTIzNDU2Jyk7JF9SPWVyZWdfcmVwbGFjZSgnX19GS
UxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));?>
Rajeev Ranjan
  • 4,152
  • 3
  • 28
  • 41