1

I recently upgraded a small server to Ubuntu 12.10 (from 12.04), thus upgrading PHP from 5.3 to 5.4. However, I'm getting this in root's mailbox several times a day:

Subject: Cron <root@xxxxxxx>   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Message-Id: xxxxxxxxxxxxxxxxxxxxxxxx
Date: Sun,  9 Dec 2012 05:09:02 -0500 (EST)

Failed loading /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so:  /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so: undefined symbol: php_body_write

I assume that's coming up because it's for PHP 5.3. How can I just get rid of ioncube? I have no need for it, I don't even remember installing it. That .so file doesn't exist, and I've grep'd several locations for "ioncube" and I can't seem to figure how to stop that message from flooding the mailbox.

Theuni
  • 938
  • 5
  • 14

4 Answers4

2

Usually there is a specific ioncube.ini file in the php conf.d directory

/etc/php5/conf.d/ioncube.ini

Just remove this one and the warnings will stop.

noqqe
  • 173
  • 8
1

dpkg-reconfigure php5-ioncube-loader solved it at my server

Eric
  • 11
  • 1
0

Under /etc/php.d/ folder there must be ioncube.ini file usually looks like 20-ioncube.ini, you can remove this file and try to reinstall the ioncube loader using yum install php-ioncube-loader

Yogesh
  • 1
0

There should be a zend_extension line for it in your /etc/php.ini - remove that.

If it's not there, try locate php.ini. If you don't have locate (e.g. you didn't run updatedb yet), then use find / -name php.ini.

If that doesn't work, and you can get this error on the command line, strace it:

strace -f -e trace=open php /path/to/script.php 2>&1

One of those will be a configuration file. If not (e.g. you see an open attempt for ioncube_*.so and none of the *.inis contain a line for it) then the chances are your PHP script is trying to dl() it.

Jay
  • 6,439
  • 24
  • 34
  • There was no `zend_extension` in any of my php.ini's. In fact: root@xxxxxx:~# grep -r 'ioncube' /etc root@xxxxxx:~# grep -r 'zend_' /etc /etc/php5/fpm/php.ini.ucf-dist:;report_zend_debug = 0 /etc/php5/fpm/php.ini:;report_zend_debug = 0 /etc/php5/cli/php.ini:;report_zend_debug = 0 (edit: Ugh, I really wish pressing enter didn't submit comments) –  Dec 09 '12 at 10:59
  • I ran `strace` on both PHP scripts (Roundcube and Postfixadmin), and didn't get any zend or ioncube related .ini or .so files :\ - thanks for your help on this. –  Dec 09 '12 at 11:01
  • Perhaps it forks another process, can you try with `strace -f ...`? – Jay Dec 09 '12 at 11:04
  • Nope. Here's the output for both scripts if interested: http://pastebinr.com/24w –  Dec 09 '12 at 11:07
  • There's also no attempt to open `ioncube_*so`. When you run it under `strace`, does the error appear? If it does, 'lower' the `strace` to `strace -f -e trace=file` (or even `strace -f e -trace=all` if that doesn't help). – Jay Dec 09 '12 at 11:09
  • I can't seem to trigger the error with any of your `strace` commands, I think it is a cron job. It comes up every half-hour at nn:39 and nn:09. –  Dec 09 '12 at 11:16
  • How about if you run it normally? You need to be able to get the error to reproduce before you can `strace` it. `strace` doesn't actually "do" anything by itself, it just intercepts all of the system calls your script makes and logs it. – Jay Dec 09 '12 at 11:34