Different IonCube Loaders for cron and site?

Different IonCube Loaders for cron and site?

Posted by: rudberg
Posted on: 2009-08-11 02:56:00

Hi,

I'm getting this error when putting a cron-job to ignite a program that is encoded by IonCube. The program is part of WHMCS and is only used to fetch e-mails into a trouble-ticketing system.

I went through the correct way according to the Wiki on IonCube_Loader for installing IonCube for the 5.2 PHP version in cgi-bin for myself according to, and everything works fine on the main install of WHMCS itself (that would not want to run until I installed the ioncube_loader_lin_5.2.so), it's ONLY when this particular program is called that I get an error that says:

Site error: the file <b>/home/myaide/myaide.net/pipe/pop.php</b> requires the ionCube PHP Loader ioncube_loader_lin_4.4.so to be installed by the site administrator.

The problem is that my phpinfo says I'm running 5.2.9 which makes sense since all the rest would only install using the ioncube_loader_lin_5.2.so so I'm a bit at a loss at what to do here?

Can two loaders be used simultaneously, and if so, how do I configure them to do so?


Re: Different IonCube Loaders for cron and site?

Posted by: sXi
Posted on: 2009-08-11 07:04:00

Cron uses the default CLI (on my server that'd be PHP ver 4.4.9)

If the script you're running can be 'started' via the web, try using curl or wget to call it.

curl http://myaide.net/pipe/pop.php




How To Install PHP.INI / ionCube on DreamHost

Re: Different IonCube Loaders for cron and site?

Posted by: Atropos7
Posted on: 2009-08-11 07:53:00

In reply to:

The problem is that my phpinfo says I'm running 5.2.9 which makes sense since all the rest would only install using the ioncube_loader_lin_5.2.so so I'm a bit at a loss at what to do here?

Can two loaders be used simultaneously, and if so, how do I configure them to do so?


As sXi pointed out, the first php binary found in PATH is that of php-cli 4.4.9

When you built PHP 5.2.9 you should have two binaries - the CGI version and the CLI version. Running a binary with the -v argument will tell you what version it is. You need to determine the absolute path (/home/username/[build_dir]/bin/php ) and make note of it.

Then your commands for the cron job need to specifiy the location of your PHP.ini as well as the php-cli binary, something like

/home/username/[build_dir]/bin/php -c /home/username/PHP.ini -f /home/username/script.php

You might want to try running similar command from shell first to test it out:

/home/username/[build_dir]/bin/php -c /home/username/php.ini -v
/home/username/[build_dir]/bin/php [continue] -c /home/username/php.ini -r 'phpinfo();' | more

Related documentation:
http://us3.php.net/manual/en/features.commandline.php
http://us3.php.net/manual/en/configuration.file.php

Edit: changed paths for literal interpretation to avoid confusion.

Customer since 2000 cool openvein.org Edited by Atropos7 on 08/11/09 09:37 AM (server time).

Re: Different IonCube Loaders for cron and site?

Posted by: sXi
Posted on: 2009-08-11 08:49:00

There'd be a "php-cgi", but not a "php-cli" wink

/home/username/[build_dir]/bin/php [continue]




How To Install PHP.INI / ionCube on DreamHost

Re: Different IonCube Loaders for cron and site?

Posted by: sXi
Posted on: 2009-08-11 09:18:00

I just read those Wiki scripts.. neither probably exists frown

Wiki on installing PHP needs alot of garbage removal btw admins.




How To Install PHP.INI / ionCube on DreamHost

Re: Different IonCube Loaders for cron and site?

Posted by: rudberg
Posted on: 2009-08-12 07:43:00

Both work great, thanks!

Tags: cron jobloaderswikiioncube