Discussion:
[PHP-INSTALL] install extension zend opcache 7.0.2
Martino
2013-06-08 10:15:07 UTC
Permalink
Hello,
I have ubuntu server 12.04 lts+apache 2.4 and I updated from php 5.4.9 to
php 5.4.16 adding
the zend opcache extension, compiling from source code, because through
apt-get install
I have php-5.3 at most and I needed the 5.4.16.
So I downloaded and untared the source code for php 5.4.16.
Then I downloaded igbinary, APCU and zend opcache 7.0.2 and I untared their
respective directory into the ext directory of php-5.4.16.
Then I gave the following commands being in the php-5.4.16 dir:
rm -rf configure
./buildconf --force
./configure
--enable-opcache
--enable-apcu
--enable-igbinary
--disable-short-tags
--disable-cgi
--disable-ipv6
--disable-fileinfo
--disable-filter
--disable-json
--disable-pdo
--disable-tokenizer
--disable-mod-charset
--disable-calendar
--disable-bcmath
--disable-dba
--without-bz2
--without-enchant
--with-curl
--disable-exif
--enable-mbstring
--disable-shmop
--disable-sigchild
--enable-maintainer-zts
--with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/usr/local/apache2/conf
--with-gd
--with-jpeg-dir=/usr
--with-mysqli
--without-openssl
--with-png-dir=/usr
--without-xmlrpc
--with-pcre-regex
--without-sqlite3
--without-pdo-sqlite
--without-iconv
--without-pear
--without-gettext
--disable-soap
--disable-sockets
--disable-phar
--disable-posix
--without-zlib

make

make install.
APCU and igbinary are static extensions, so nothing to configure.
then I added the zend_extension string to the php configuration file for
opcache.so, it includes the absolute path of the file opcache.so (filename
included), created during the make instal procedure.
From phpinfo, the extension directory is the same of that I indicated in the
zend_extension string for opcache.so. I checked that opcache.so is present
in the directory and that it has read and execute permission for the apache
user, together with its parent directories.

Then in the php config file I added a section for opcache settings.
Everything is working ok with php+apache.
Now my issue:
The zend opcache extension doesn't load.
The error in the log is
Failed loading opcache.so: opcache.so: cannot open shared object file: No
such file or directory
I checked, the file is there, the path in the zend_extension string is also
correct.
Feel free to ask for any relevant information I eventually missed.
Your help is highly appreciated.
Thanks for your cooperation,
Best regards
Martino



--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Una settimana a Giugno per 4 persone in vacanza a Rimini, pensione completa, bevande ai pasti, 1 bimbo gratis fino a 7 anni, camera quadrupla, 300 mt dal mare.Ingresso Beach Village di Riccione
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12904&d=8-6
Hendrik Schmieder
2013-06-20 06:44:38 UTC
Permalink
Post by Martino
Hello,
I have ubuntu server 12.04 lts+apache 2.4 and I updated from php 5.4.9 to
php 5.4.16 adding
the zend opcache extension, compiling from source code, because through
apt-get install
I have php-5.3 at most and I needed the 5.4.16.
So I downloaded and untared the source code for php 5.4.16.
Then I downloaded igbinary, APCU and zend opcache 7.0.2 and I untared their
respective directory into the ext directory of php-5.4.16.
rm -rf configure
./buildconf --force
./configure
--enable-opcache
--enable-apcu
--enable-igbinary
--disable-short-tags
--disable-cgi
--disable-ipv6
--disable-fileinfo
--disable-filter
--disable-json
--disable-pdo
--disable-tokenizer
--disable-mod-charset
--disable-calendar
--disable-bcmath
--disable-dba
--without-bz2
--without-enchant
--with-curl
--disable-exif
--enable-mbstring
--disable-shmop
--disable-sigchild
--enable-maintainer-zts
--with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/usr/local/apache2/conf
--with-gd
--with-jpeg-dir=/usr
--with-mysqli
--without-openssl
--with-png-dir=/usr
--without-xmlrpc
--with-pcre-regex
--without-sqlite3
--without-pdo-sqlite
--without-iconv
--without-pear
--without-gettext
--disable-soap
--disable-sockets
--disable-phar
--disable-posix
--without-zlib
make
make install.
APCU and igbinary are static extensions, so nothing to configure.
then I added the zend_extension string to the php configuration file for
opcache.so, it includes the absolute path of the file opcache.so (filename
included), created during the make instal procedure.
From phpinfo, the extension directory is the same of that I indicated in the
zend_extension string for opcache.so. I checked that opcache.so is present
in the directory and that it has read and execute permission for the apache
user, together with its parent directories.
Then in the php config file I added a section for opcache settings.
Everything is working ok with php+apache.
The zend opcache extension doesn't load.
The error in the log is
Failed loading opcache.so: opcache.so: cannot open shared object file: No
such file or directory
I checked, the file is there, the path in the zend_extension string is also
correct.
Feel free to ask for any relevant information I eventually missed.
Your help is highly appreciated.
Thanks for your cooperation,
Best regards
Martino
What is the path for the php_extendir ?
Where exactly opcache.so is located ?
What is the output of ldd opcache.so ?

Hendrik
Martino
2013-06-20 09:48:24 UTC
Permalink
Hello Hendrik,
Thank you for your mail.
Post by Hendrik Schmieder
What is the path for the php_extendir ?
from phpinfo, core section:
extension_dir
/usr/local/lib/php/extensions/no-debug-zts-20100525/
Post by Hendrik Schmieder
Where exactly opcache.so is located ?
it is located in this same directory.
Post by Hendrik Schmieder
What is the output of ldd opcache.so ?
linux-vdso.so.1 => (0x00007fff919ff000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f02e92f
b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f02e8f3c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f02e9741000)



I don't see any strange thing inside.
Your idea is welcome.
I could still try a fake "example" extension that does nothing, just to see
if it works. I say this because for the moment I have no shared extensions
active.
Thank you,
Martino



--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
PEC nel Registro delle Imprese entro il 30/6/2013, attivala ora e risparmi fino al 20%
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12825&d=20-6
Hendrik Schmieder
2013-06-20 09:54:14 UTC
Permalink
Post by Martino
Hello Hendrik,
Thank you for your mail.
Post by Hendrik Schmieder
What is the path for the php_extendir ?
extension_dir
/usr/local/lib/php/extensions/no-debug-zts-20100525/
Post by Hendrik Schmieder
Where exactly opcache.so is located ?
it is located in this same directory.
Post by Hendrik Schmieder
What is the output of ldd opcache.so ?
linux-vdso.so.1 => (0x00007fff919ff000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f02e92f
b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f02e8f3c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f02e9741000)
I don't see any strange thing inside.
Your idea is welcome.
I could still try a fake "example" extension that does nothing, just to see
if it works. I say this because for the moment I have no shared extensions
active.
Thank you,
Martino
My suspicion is that linux-vdso.so.1 isn't found.

Hendrik
Martino
2013-06-20 10:14:51 UTC
Permalink
Post by Hendrik Schmieder
My suspicion is that linux-vdso.so.1 isn't found.
Thank you for your idea.
The library that you see as linux-vdso.so.1 is a virtual library or Virtual
Dynamic Shared Object, that resides only in each program's address space.
Older
systems called this linux-gate.so.1. This virtual library provides the
necessary logic to allow user programs to access system functions through
the fastest
means available on the particular processor, either interrupt, or with most
newer processors, fast system call.
So this is not the cause.



--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Le tue email come raccomandate puoi spedirle con il servizio PEC di Email.it
* Attivala ora, il 30/6/2013 e' il termine ultimo per mettersi in regola secondo la normativa di legge
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12828&d=20-6
Hendrik Schmieder
2013-06-20 11:34:00 UTC
Permalink
Post by Martino
Post by Hendrik Schmieder
My suspicion is that linux-vdso.so.1 isn't found.
Thank you for your idea.
The library that you see as linux-vdso.so.1 is a virtual library or Virtual
Dynamic Shared Object, that resides only in each program's address space.
Older
systems called this linux-gate.so.1. This virtual library provides the
necessary logic to allow user programs to access system functions through
the fastest
means available on the particular processor, either interrupt, or with most
newer processors, fast system call.
So this is not the cause.
OK,

let's have a look on the PHP side.
Is PHP loaded as module ?
If not, does the problem also occur when PHP is loaded as module ?

Hendrik
Martino
2013-06-21 07:27:41 UTC
Permalink
OK,

let's have a look on the PHP side.
Is PHP loaded as module ?
If not, does the problem also occur when PHP is loaded as module ?

Hendrik



Thank you for your cooperation Hendrik,
all solved, php 5.5.0 is here, so no more need to install the extension.


--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Le tue email come raccomandate puoi spedirle con il servizio PEC di Email.it
* Attivala ora, il 30/6/2013 e' il termine ultimo per mettersi in regola secondo la normativa di legge
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12828&d=21-6
Adinata
2013-08-01 08:56:44 UTC
Permalink
Post by Martino
Thank you for your cooperation Hendrik,
all solved, php 5.5.0 is here, so no more need to install the extension.
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con
Post by Martino
Email.it http://www.email.it/f
Le tue email come raccomandate puoi spedirle con il servizio PEC di Email.it
* Attivala ora, il 30/6/2013 e' il termine ultimo per mettersi in regola
secondo la normativa di legge
Post by Martino
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12828&d=21-6
Hi, I know you have solved it, but I have the same problem and doesn't wanted
to upgrade to php 5.5 (yet).
You can solve it by using fullpath for loading the extension.
So, using

zend_extension=/usr/local/lib/php/extensions/no-debug-zts-20100525/opcache.so

should work.

Loading...