|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-05-04 19:12 UTC] brett at brettbrewer dot com
Description: ------------ I'm not quite sure if this belongs here as I can't provide source code or backtraces to help diagnose this, but it seems like an APC bug to me. I was running APC 3.1.7 on a new server and was having probs with those "Unable to allocate memory for pool" error messages all over my sites. I read the changelog for apc 3.1.8 and it looked like maybe those errorss were suppressed in the latest version, so I tried running "pecl update apc" and it failed to install due to missing C compiler in my path. I then updated using "yum update php-pecl-apc" via the remi repos where the rest of my php install came from and it worked. I then restarted apache and checked my wordpress sites and they load fine on the first request, but then on subsequent requests various include files included via "require" cause warnings and fatal errors such as: Warning: require(twitter.php): failed to open stream: No such file or directory in on line 411 Warning: require(twitter.php): failed to open stream: No such file or directory in require(twitter.php): failed to open stream: No such file or directory on line 411 Fatal error: require(): Failed opening required 'twitter.php' (include_path='.:/usr/share/pear:/usr/share/php') in � ��* on line 411 I did some brief testing on my non-wordpress sites and didn't see this error on my sites built in Kohana, but I'm not 100% sure this is specific to Wordpress or not. I can't tell if this is only an issue with Wordpress plugins or if all require statements are triggering this. I have ensured that my wordpress installs and all plugins are updated to the latest versions just to be sure that wasn't the prob. I do not have any special wordpress caching plugins turned on either as I know there have been some conflicts with APC and supercache or some other wp cache plugins in the past. I'm not a linux expert or an internals programmer (obviously), so that's about the best info I can provide. Anyone else seen this problem? I have no example code to provide other than the current Wordpress codebase, but here are some specs for my OS, Apache, PHP and APC configuration: OS: CentOS5 - x64 Linux Kernel Version: 2.6.18-238.9.1.el5 Apache Version: Apache/2.2.3 (CentOS) Apache API Version: 20051115 Loaded Modules: core prefork http_core mod_so mod_auth_basic mod_auth_digest mod_authn_file mod_authn_alias mod_authn_anon mod_authn_dbm mod_authn_default mod_authz_host mod_authz_user mod_authz_owner mod_authz_groupfile mod_authz_dbm mod_authz_default util_ldap mod_authnz_ldap mod_include mod_log_config mod_logio mod_env mod_ext_filter mod_mime_magic mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_proxy mod_proxy_balancer mod_proxy_ftp mod_proxy_http mod_proxy_connect mod_cache mod_suexec mod_disk_cache mod_file_cache mod_mem_cache mod_cgi mod_version mod_php5 mod_proxy_ajp mod_ssl PHP Version: 5.3.6 - installed from remi repos via yum. PHP configure command from phpinfo(): './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-mhash' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc Loaded Configuration File /etc/php.ini Scan this dir for additional .ini files /etc/php.d Additional .ini files parsed /etc/php.d/20ioncube.ini, /etc/php.d/apc.ini, /etc/php.d/curl.ini, /etc/php.d/dba.ini, /etc/php.d/dom.ini, /etc/php.d/fileinfo.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini, /etc/php.d/mcrypt.ini, /etc/php.d/memcache.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/pspell.ini, /etc/php.d/soap.ini, /etc/php.d/sqlite.ini, /etc/php.d/wddx.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini PHP API 20090626 PHP Extension 20090626 Zend Extension 220090626 Zend Extension Build API220090626,NTS PHP Extension Build API20090626,NTS Debug Build no Thread Safety disabled Zend Memory Manager enabled Zend Multibyte Support disabled IPv6 Support enabled Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.* Non-standard PHP extensions I'm running: ionCube PHP Loader v4.0.8 - the one you know and probably don't love DBG v3.9.10 - the debug extension for my ide APC Runtime config settings: APC Support disabled (for now) Version 3.1.8 APC Debugging Disabled MMAP Support Enabled MMAP File Mask /dev/zero Locking type pthread mutex Locks Serialization Support broken Revision $Revision: 308812 $ Build Date May 4 2011 16:07:55 Directive Local Value Master Value apc.cache_by_default On On apc.canonicalize Off Off apc.coredump_unmap Off Off apc.enable_cli Off Off apc.enabled Off Off apc.file_md5 Off Off apc.file_update_protection 2 2 apc.filters no value no value apc.gc_ttl 3600 3600 apc.include_once_override Off Off apc.lazy_classes Off Off apc.lazy_functions Off Off apc.max_file_size 1M 1M apc.mmap_file_mask /dev/zero /dev/zero apc.num_files_hint 0 0 apc.preload_path no value no value apc.report_autofilter Off Off apc.rfc1867 Off Off apc.rfc1867_freq 0 0 apc.rfc1867_name APC_UPLOAD_PROGRESS APC_UPLOAD_PROGRESS apc.rfc1867_prefix upload_ upload_ apc.rfc1867_ttl 3600 3600 apc.serializer default default apc.shm_segments 1 1 apc.shm_size 64M 64M apc.slam_defense On On apc.stat On On apc.stat_ctime Off Off apc.ttl 7200 7200 apc.use_request_time On On apc.user_entries_hint 0 0 apc.user_ttl 7200 7200 apc.write_lock On On I have tweaked most of the apc runtime settings to no avail. My dedicated server support team of linux experts has also had no luck in explaining this as anything other than an APC bug. Let me know if I can provide any further info. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 22:00:01 2025 UTC |
My test case is: cat index.php <?php include_once("a/include1.php"); ?> cat a/include1.php <?php include_once('include2.php'); ?> cat a/include2.php <?php echo "Whateva"; ?> The first refresh loads fine, the second fails with: Warning: include_once(include2.php) [function.include-once]: failed to open stream: No such file or directory in �z� on line 2 This looks to be related to the: op_array->filename = filename; in my_compile_file(), which is used on compiled files. From GDB: (gdb) p executor_globals.active_op_array.filename $39 = 0xeb77f0 "Hz?" If this is something you want to fix, I'd be glad to help with more debug/patches.One more problem. The test case: apc.stat = 0 cat index.php <?php include_once("a/test.php"); ?> cat a/test.php <?php include_once('b/include1.php'); ?> cat a/b/include1.php <?php include_once('include2.php'); ?> cat a/include2.php <?php echo "Wrong file"; ?> cat a/b/include2.php <?php echo "Correct file"; ?> On the first execution, I get "Correct file". On the second execution and after I get "Wrong file". It looks to be related to the fact that apc_copy_op_array() calls apc_search_paths(), which uses zend_get_executed_filename(), which for this test case returns the path to test.php, and the canonization of the path to include2.php gets incorrectly set to .../a/include2.php instead of .../a/b/include.php. Again if this is something that you think should be fixed, I'd be glad to help with more debug and patches.