Page 1 of 1

asl-2.0 php-ioncube-loader strangeness

Posted: Sat May 17, 2008 11:39 am
by faris
Well, I have a strange situation.

In preparation for installing asl 2 on a Centos 4 VPS, I enabled the asl-2.0 repo and did a yum update.

php-ioncube-loader, rkhunter and mod_security rpms were flagged to be updated. I was curious about the php-ioncube-loader, because I'd never knowingly installed that. but rpm -qa gave me

php-ioncube-loader-3.0-06101212
(Which has a dep of PPWSE (the Plesk Professional Website Editor option), and I therefore assume it was installed when I installed Plesk)

Nevertheless, I had always manually installed the ioncube loader and ages ago had done so and added a line in php.ini. I do not have any ioncube stuff in /etc/php.d

Anyway, as ioncube is ioncube so I figured it was safe enough to update.

Unfortunately it wasn't. It stopped websites displaying. I was easily able to fix the situation, but I'm curious to learn what exactly was going on/what went wrong.

Here's what happened:
After php-ioncube-loader.i386 (1:3.1-2.el4.art) was installed, as I had expected the line I had manually added to php.ini was gone and I now had ioncube.ini with

zend_extension=/usr/lib/php/ioncube/ioncube_loader_lin_5.1.so

But as I mentioned before, with things set up like this no websites would display even though apache restarted OK.

Commenting that line out and adding the line that was originally in php to ioncube.ini would not work either.

In fact the only way to get things working was to put it back in php.ini

Now I know ioncube and the Zend Optimizer are a bit sensitive to loading order, and I suspect that that is what the problem was.

i.e. my working php.ini has

[Zend]
zend_extension_manager.optimizer=/usr/local/Zend328/lib/Optimizer-3.2.8
zend_extension_manager.optimizer_ts=/usr/local/Zend328/lib/Optimizer_TS-3.2.8
zend_optimizer.version=3.2.8
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.1.so
zend_extension=/usr/local/Zend328/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend328/lib/ZendExtensionManager_TS.so

Surely having the ioncube loader load via the file in php.d is quite common?

If not, what exactly is going on here? What would I need to change in order to get the php-ioncube-loader's way of doing things to work?

Note: I'm not using the ART php5. I'm using the Centos Plus repo PHP5.

Faris.

Posted: Sat May 17, 2008 3:48 pm
by scott
Could be your manual install of zend and your rpm install of ioncube rolling over one another. Order of loading matters.

Posted: Sat May 17, 2008 3:53 pm
by breun
You can install both ioncube and Zend Optimizer from ART's RPMs. I guess that should work fine.

Posted: Sat May 17, 2008 5:08 pm
by faris
I guess I'll just exclude php-ioncube-loader in the asl-2.0 repo then.

I suspect the original php-ioncube-loader was not quite the same thing as the ASL one. I definitely have no loaders located anywhere other than where I put them myself. Mysterious!

Faris.

Posted: Sat May 17, 2008 5:49 pm
by scott
Sitebuilder installs one if memory serves

Posted: Tue May 20, 2008 10:29 am
by faris
Yes. You are right. I don't use that either :-)

I'll get rid of it anyway, one way or another.

Faris.