我在共享主机上工作,我可以选择PHP版本:5.4.23或5.3.28。
我想使用最新的Zend 2.2.5,但在PHP版本5.4.23上,我收到错误:
Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\InvalidArgumentException' with message '$initializer should be callable.'
in /home/rr197664/public_html/domain.com/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:366 Stack trace:
... ...
当我切换到PHP 5.3.28页面打开但所有重定向($ this-> redirect() - > toRoute())停止工作。
我在ZendSkeletonApplication上测试过它。
知道可以做些什么吗?
由于
编辑(用...替换服务器路径):
Current PHP version: 5.4.23
Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\InvalidArgumentException' with message '$initializer should be callable.' in .../Zend/ServiceManager/ServiceManager.php:366 Stack trace:
0 .../Zend/Mvc/Service/ServiceManagerConfig.php(142): Zend\ServiceManager\ServiceManager->addInitializer(NULL)
1 /.../Zend/ServiceManager/ServiceManager.php(128): Zend\Mvc\Service\ServiceManagerConfig->configureServiceManager(Object(Zend\ServiceManager\ServiceManager))
2 /.../Zend/Mvc/Application.php(251): Zend\ServiceManager\ServiceManager->__construct(Object(Zend\Mvc\Service\ServiceManagerConfig))
3 /.../public/index.php(19): Zend\Mvc\Application::init( in /.../Zend/ServiceManager/ServiceManager.php on line 366
答案 0 :(得分:0)
转到您编辑的最后一个模块。打开Module.php
在您的函数中
public function getServiceConfig()
或
public function getViewHelperConfig()
您有一个无法找到的工厂的引用,或者内联一个未正确形成的函数