views:

256

answers:

2

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
A: 

Could it be the process that is running PHP does not have the required rights to read the file? Don't forget that a directory needs to be executable in order for a process to change to that directory (i.e. see the contents of its subfolders.)

soulmerge
Even modifying the library files to nobody:nogroup with permissions 7777+X does not allow PHP to open the file
tombazza
Did you change the permissions of the folders? What are the permissions on /usr/local/zend, /usr/local/zend/share, /usr/local/zend/share/ZendFramework, /usr/local/zend/share/ZendFramework/library, /usr/local/zend/share/ZendFramework/library/Zend, etc?
soulmerge
The permissions for all of the directories that you mention are 7777/drwsrwsrwt
tombazza
Looks like the problem is something else. I'll let the answer here so others know it has been tried.
soulmerge
+4  A: 

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

gnarf
My word! Such an amateur mistake, well as they say it helps to have a second pair of eyes sometimes.
tombazza
*tips hat* My pleasure, I hate getting puzzled on things like this :)
gnarf