Em um servidor eu tenho php-5.6.7-1
e eu instalei ioncube
lá sem problemas. Eu coloquei ioncube_loader_lin_5.6.so
em /usr/lib/php5/20131226
e adicionei zend_extension = ioncube_loader_lin_5.6.so
a php.ini
.
Mas isso não funciona para o outro servidor. Eu tenho php-5.4.4-14+deb7u4
lá. Eu coloquei ioncube_loader_lin_5.4.so
em /usr/lib/php5/20100525
e adicionei zend_extension = ioncube_loader_lin_5.4.so
a php.ini
.
$ php -i | grep extension_dir
extension_dir => /usr/lib/php5/20100525 => /usr/lib/php5/20100525
$ php --version
Failed loading ioncube_loader_lin_5.4.so: ioncube_loader_lin_5.4.so: cannot open shared object file: No such file or directory
PHP 5.4.4-14+deb7u4 (cli) (built: Aug 23 2013 14:37:41)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
E agora para a parte divertida:
$ strace php --version
...
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
open("/lib/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
munmap(0x7f1f3e188000, 37265) = 0
write(2, "Failed loading ioncube_loader_li"..., 128Failed loading ioncube_loader_lin_5.4.so: ioncube_loader_lin_5.4.so: cannot open shared object file: No such file or directory
) = 128
open("/usr/lib/php5/20100525/mysqlnd.so", O_RDONLY) = 6
...
No primeiro servidor php
aparentemente carrega a biblioteca sem nenhum problema:
$ strace php --version
...
futex(0x7fbf391860c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/php5/20131226/ioncube_loader_lin_5.6.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF$ php -i | grep extension_dir
extension_dir => /usr/lib/php5/20100525 => /usr/lib/php5/20100525
$ php --version
Failed loading ioncube_loader_lin_5.4.so: ioncube_loader_lin_5.4.so: cannot open shared object file: No such file or directory
PHP 5.4.4-14+deb7u4 (cli) (built: Aug 23 2013 14:37:41)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
$ strace php --version
...
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
open("/lib/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/lib/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7fff2cc8cf60) = -1 ENOENT (No such file or directory)
open("/usr/lib/ioncube_loader_lin_5.4.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
munmap(0x7f1f3e188000, 37265) = 0
write(2, "Failed loading ioncube_loader_li"..., 128Failed loading ioncube_loader_lin_5.4.so: ioncube_loader_lin_5.4.so: cannot open shared object file: No such file or directory
) = 128
open("/usr/lib/php5/20100525/mysqlnd.so", O_RDONLY) = 6
...
$ strace php --version
...
futex(0x7fbf391860c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/php5/20131226/ioncube_loader_lin_5.6.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%>%pre%%pre%%pre%%pre%0o%pre%%pre%%pre%%pre%%pre%"..., 832) = 832
...
%pre%%pre%%pre%%pre%%pre%%pre%%pre%>%pre%%pre%%pre%%pre%0o%pre%%pre%%pre%%pre%%pre%"..., 832) = 832
...
Tem algo a ver com algumas opções de configure
, que estão impedindo que ele pesquise por extensões zend dentro de /usr/lib/php5/20100525
? Existe uma maneira de descobrir? O que devo fazer?