Search code examples
phpzend-frameworkrequire-once

PHP: Failed to open required file that exists


I am trying to include the Zend_Service_Amazon_S3 file by using

require_once 'Zend/Service/Amazon/S3.php';

I have also included in the include path the directory where the entire Zend library is located, AND the installation is inside Zend Server CE (which includes the Zend Framework by default). However, no matter what I try, I only get the following for my troubles:

Fatal error: require_once() [http://php.net/function.require]: Failed opening required 'Zend/Server/Amazon/S3.php' (include_path='/usr/local/zend/apache2/htdocs:/usr/local/zend/apache2/htdocs/app/:.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear:/usr/local/zend/apache2/htdocs/app/vendors') in /usr/local/zend/apache2/htdocs/app/models/item.php on line 3

The Zend/Service/Amazon/S3.php is located under the paths:

  • /usr/local/zend/share/ZendFramework/library
  • /usr/local/zend/apache2/htdocs/app/vendors

Solution

  • Your error message says Zend/Server/Amazon/S3.php - Shouldn't it be Zend/Service/Amazon/S3.php?