当我通过shell_exec()消息调用 PHP 脚本 ( process.php ) 时发现一个奇怪的错误 :
Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'The memcache extension must be loaded for using this backend !' in /Applications/XAMPP/xamppfiles/htdocs/shared_lib/ZendFramework/1.5.2-patched/Zend/Cache.php:208
但是,如果我在终端中调用它,我可以毫无错误地调用 process.php 。
伪代码:
控制.php
// some business logic ....
shell_exec("php process.php");
// some business logic ....
process.php
// some business logic ....
call Zend_Cache to retrieve data from memecache
// some business logic ....