php - Intermittent 500 errors from Apache running Zend Framework with multiple virtual hosts -
we have been working on project several months without problems until set of recent updates. server running amazon linux ami release 2010.11.1, apache 2.2.16 , php 5.3.3. project divided few separate developer branches, running virtual hosts, each separate copy of code including zend framework 1.11.3. project includes doctrine 2.0.1, don't think problem is. have experimented apc in past, don't have installed right now. issue seems occur when multiple users hitting server across different branches. suspect issue related differing versions of core classes required during zend framework bootstrap process, can't figure out root cause is. have tried forcing branches @ same version our git repo, , restarted apache. temporarily resolves issue, returns. began week ago when merely installed set of mainstream updates linux, php, , zend framework. when issue occurring, propagates our phpmyadmin virtual host, doesn't have zend framework. stumped. following set of errors see in apache log:
[wed mar 02 20:32:40 2011] [error] [client 127.0.0.1] php warning: array_keys() expects parameter 1 array, null given in /var/www/dev/library/zend/loader/autoloader.php on line 251, referer: https://foo.bar/admin/asset_manage/search [wed mar 02 20:32:40 2011] [error] [client 127.0.0.1] php warning: invalid argument supplied foreach() in /var/www/dev/library/zend/loader/autoloader.php on line 345, referer: https://foo.bar/admin/asset_manage/search [wed mar 02 20:32:40 2011] [error] [client 127.0.0.1] php warning: array_key_exists() expects parameter 2 array, null given in /var/www/dev/library/zend/loader/autoloader.php on line 194, referer: https://foo.bar/admin/asset_manage/search [wed mar 02 20:32:40 2011] [error] [client 127.0.0.1] php fatal error: class 'zend_config_ini' not found in /var/www/dev/library/zend/application.php on line 383, referer: https://foo.bar/admin/asset_manage/search
well, after agony on issue, turns out problem caused change in behavior of php realpath_cache. when set realpath_cache_ttl = 0
in php.ini, issue improperly loading classes goes away.
i not sure how got introduced in these updates, don't think cache required on dev box, gets me on track. on production server, should have 1 instance of app running per apache server anyway (no virtual hosts), use cache in scenario.
if has additional insight cause of realpath_cache issue, wouldn't mind hearing it.
Comments
Post a Comment