Source Rally PHP Community Scripts .. Sign up .. Login
As of PHP 5.2.5 you can only load extensions using a filename, this means that applications (like amember) which store the ioncube loaders in a separate directory all of a sudden do not work. As the encrypted files can't be edited you stand with a problem when your server has been updated to PHP 5.25 !!!

But do not worry, help is near and simple - this guide is amember+apache specific but will probably work for other applications that are using ioncube:

Step #1
Create a file called loader.php in the amember/ioncube/ directory and store following content in the file:
<?php
    $origdir = getcwd();
    chdir(dirname(__FILE__).'/');
    dl('ioncube_loader_lin_5.2.so');
    chdir($origdir);
?>

Step #2
Create a .htaccess file in the amember/ directory and store following content in the file:
#htaccess file start
php_value auto_prepend_file ./ioncube/loader.php
#htaccess file end

Step #3
Create a .htaccess file in the amember/admin directory and store following content in the file:
#htaccess file start
php_value auto_prepend_file ../ioncube/loader.php
#htaccess file end

And you are up and running....

Where you include or require other ioncube encoded files you will also need to include the loader.php file.

Example:
<?
    include("amember/ioncube/loader.php");
    include("amember/plugins/protect/php_include/check.inc.php");
?>

Sign up to add your own comment here!

All user contributed content is available under the LGPL unless specified otherwise.
Remaining copyrights Regin Gaarsmand © 2006-2008
About SourceRally.net
Programador PHP