-1

I've prepend a PHP file to all of script files using php.ini config:

auto_prepend_file = "./file.php"

Then I got this error while running script:

Site error: the file /home/user/public_html/path/index.php requires the
ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the website
operator. If you are the website operator please use the ionCube Loader Wizard
to assist with installation.

Since the script is encoded by ionCube, is there any way to make this okay?


just for more details, here is the file.php contents:

<?php
    $_SERVER['SERVER_ADDR'] = '100.101.102.103';
    $_ENV['SERVER_ADDR'] = '100.101.102.103';
    $HTTP_SERVER_VARS['SERVER_ADDR'] = '100.101.102.103';
?>
PRO MAX
  • 87
  • 3
  • 11
  • setting a fake server ip for a purchased script, now that does not sound dubious –  Aug 16 '13 at 03:13
  • @Dagon: Why you are Prejudicing? My problem is that my purchased script is on our Cloud Network and the server has a private IP address behind NAT. And this script is not compatible with this network design. I've paid $700 for it while I can not use it. The script validates 3 item: Domain, IP, Path and I just have problem with the IP address. – PRO MAX Aug 16 '13 at 03:28
  • 1
    so talk to the seller, you are bound to breaching the terms you agreed to when purchasing it. –  Aug 16 '13 at 03:36
  • @Dagon: Yes, I've opened a support ticket there, still waiting... They are really slow in solving our problems... – PRO MAX Aug 16 '13 at 03:42

2 Answers2

1

Doing what you are trying, with a prepend script to modify SERVER_NAME and SERVER_ADDR, is definitely a way that can defeat licensing solutions written in PHP. However this would not work for ionCube licensing because collection of the data used in license validation is performed before any PHP code is run. Other solutions are likely to work similarly, and is one of the advantages of a native licensing solution over a home-brew DIY approach.

Talking to the seller and not asking how to defeat a licensing scheme is the correct and morally responsible way to approach your problem.

Nick
  • 1,334
  • 10
  • 14
0

You need to setup the ionCube PHP Loader as the error message is telling you.

  1. Download the appropriate loader from here: http://www.ioncube.com/loaders.php

  2. Follow the docs to get it setup: http://www.ioncube.com/loader_installation.php

  3. There is a loader wizard that helps with the setup: http://www.ioncube.com/loader-wizard/loader-wizard.zip

Once you have the ionCube PHP Loader working, the encoded script should just work.

jszobody
  • 28,495
  • 6
  • 61
  • 72
  • My server is using cPanel/WHM and ionCube is enabled and works perfect. So ... ?! – PRO MAX Aug 16 '13 at 03:30
  • If ionCube worked perfectly, you wouldn't be getting an ionCube error now would you? – jszobody Aug 16 '13 at 03:35
  • I think it's because of prepending a simple PHP file to a ionCubed one. Otherwise this error wouldn't occurs. – PRO MAX Aug 16 '13 at 03:42
  • Is ionCube configured via run-time loading or in the php.ini file? Sounds like ionCube isn't setup until after PHP tries the include the prepend file. Probably could be fixed by manually setting up ionCube in the php.ini file. – jszobody Aug 16 '13 at 03:44
  • Thanks. I've searched your speech and got this [link](https://billing.handsonwebhosting.com/knowledgebase/327/Add-IonCube-to-a-custom-phpini-PHP-53plus.html), I've put the codes in my customized php.ini and it solved the ionCube error. – PRO MAX Aug 16 '13 at 03:57