|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74766 Error building Opcache as an additional module
Submitted: 2017-06-16 06:41 UTC Modified: 2019-10-27 04:22 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: naf at altlinux dot org Assigned: cmb (profile)
Status: No Feedback Package: opcache
PHP Version: master-Git-2017-06-16 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
28 - 27 = ?
Subscribe to this entry?

 [2017-06-16 06:41 UTC] naf at altlinux dot org
If PHP builds with disabled opcache, then the HAVE_OPCACHE_FILE_CACHE macro
is undefined in the global php_config.h .

Compiling Opcache as an additional module with --enable-opcache-file 
in that case produces with references to the zend_file_cache.h
functions from ZendAccelerator.c, but functions itself does not compiles
and links in the result as HAVE_OPCACHE_FILE_CACHE is undef 
in the zend_file_cache.c .

(And compiling Opcache as an additional module with --disable-opcache-file 
goes fine, as HAVE_OPCACHE_FILE_CACHE is disable both in the global 
php_config.h and ZendAccelerator.c .)

Test script:
Compile PHP without Opcache (with --disable-opcache --disable-opcache-file)
and install it.
Then compile Opcache as a module:
cd ext/opcache
./configure --enable-opcache --enable-opcache-file
make install

Expected result:
php -r 'print "OK\n";'

Actual result:
php -r 'print "OK\n";'
Failed loading undefined symbol: zend_file_cache_script_load


opcache-zend_file_cache.patch (last revision 2017-06-16 06:42 UTC by naf at altlinux dot org)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-11-10 05:55 UTC]
I don't appear able to reproduce this, anyone else ?
 [2019-10-19 07:43 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-10-19 07:43 UTC]
Is this still a problem?
 [2019-10-27 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Oct 02 19:01:25 2023 UTC