Different IonCube Loaders for cron and site?

software development

#1

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 /home/myaide/myaide.net/pipe/pop.php 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?


#2

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.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

[quote]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?[/quote]
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


#4

There’d be a “php-cgi”, but not a “php-cli” :wink:

/home/username/[build_dir]/bin/php [color=#00CC00][continue][/color]

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

I just read those Wiki scripts… neither probably exists :frowning:

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

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#6

Both work great, thanks!