0

I'm trying to get the zend framework running, but the include path doesn't like me ;)
The zend directory is here http://mydomain.com/zend/

<?php
set_include_path('/var/www/www.mydomain.com/htdocs/zend/library/');

require_once 'Zend/Gdata/Youtube.php';
require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path

Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

?>

And I get this error:

Warning: require_once(Zend/Gdata/Youtube.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/www.mydomain.com/htdocs/zend/index.php on line 4

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Gdata/Youtube.php' (include_path='/var/www/www.mydomain.com/htdocs/zend/library/') in /var/www/www.mydomain.com/htdocs/zend/index.php on line 4

I have a smiliar setup on another server where it works, but here has to be something wrong..

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
Chris
  • 4,255
  • 7
  • 42
  • 83
  • 1
    Note: You should put the Zend package outside your document_root directory, like /opt/vendor/Zend or whatever. You don't want people to be able to request those files directly. – Alex Howansky May 31 '12 at 15:20
  • yes thanks. It's just for testing purposes right now. – Chris May 31 '12 at 15:30

1 Answers1

1

I think you want:

require_once 'Zend/Gdata/YouTube.php';

(note the capital T). Your other server where it works is probably using a case-insensitive file system.

Tim Fountain
  • 33,093
  • 5
  • 41
  • 69