Apigility基础:ServiceNotCreatedException

时间:2014-07-10 12:26:41

标签: php zend-framework zend-framework2 apigility

我跟随this tutorialthis one创建了一个带有Apigility的基本REST API,我不是Zend的专家,因为我的目标是在symfony2 app上构建api ,但就目前而言,在完成两个教程中的所有步骤之后,我达到了同一点,当访问http://api.example.com/endpoint1时,我得到一个异常:

Zend\ServiceManager\Exception\ServiceNotCreatedException

File:

/var/www/api.example.com/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:1070

Message:

An abstract factory could not create an instance of exampleapiv1restprovinciacontroller(alias: ExampleAPI\V1\Rest\Provincia\Controller).

1 个答案:

答案 0 :(得分:0)

查看运行网络服务器的用户是否在项目文件夹中有permission to write

看看你是否disabled opcache and others code chaches(如APC)。

Apigility需要权限才能生成和更改/config/modules文件夹中的文件。