0

I really am stumped on this one. I followed the instructions on http://code.google.com/apis/gdata/articles/php_client_lib.html#php-path-installation The PHP Installation Checker (can be found on the linked page) gives me an error that the include dir is wrong, so I tried to be sure that is not the problem.

This is what my directory looks like:

[...]/httpdocs/include/library/Zend# ls
Exception.php  Gdata  Gdata.php  Http  Loader.php  Registry.php  Uri  Uri.php  Validate  Version.php  test.php

as you can see, my test.php and Loader.php are in the same folder.

[...]httpdocs/include/library/Zend# cat test.php
<?php
require_once("Loader.php");
echo "ok";
?>

This error comes up in my error.log:

 PHP Fatal error:  require_once(): Failed opening required 'Loader.php' (include_path='.:') in /var/www/vhosts/[domain]/httpdocs/include/library/Zend/test.php on line 2

I also tried setting an absolute include path:

[...]httpdocs/include/library/Zend# cat test.php
<?php
$clientLibraryPath = '/var/www/vhosts/[domain]/httpdocs/include/library/Zend';
$oldPath = set_include_path(get_include_path() .  $clientLibraryPath);
echo get_include_path();

require_once("Loader.php");
?>

It does echo .:/var/www/vhosts/[domain]/httpdocs/include/library/Zend but again:

 PHP Fatal error:  require_once(): Failed opening required 'Loader.php' (include_path='.:/var/www/vhosts/[domain]/httpdocs/include/library/Zend') in /var/www/vhosts/[domain]/httpdocs/include/library/Zend/test.php on line 6

Some info from phpinfo():

PHP API => 20090626
PHP Extension => 20090626
Zend Extension => 220090626
Zend Extension Build => API220090626,NTS
PHP Extension Build => API20090626,NTS

PHP Version => 5.3.2-1ubuntu4.14

I really hope you guys can help me out.. this is driving me crazy

puddy
  • 1
  • Oh, by the way, if I replace the Loader.php with a custom file, the error is gone.. So to me that means there is content in the Loader.php which causes PHP to tell me it is not able to load that file. Is this a PHP bug? I don't think content should be able to cause a "Failed opening required" error – puddy Mar 09 '12 at 12:19

1 Answers1

0

After installing the debugging extension xdebug, I found out that the files I uploaded were owned by another user and usergroup which is why my test.php (root:root) was not allowed to access Loader.php (sis:pcacln) chown sis:pcacln test.php helped a lot

puddy
  • 1
  • Congrats on the fix! When you are able, please make sure to mark your answer as 'accepted' so that others will be able to learn from your success. Cheers~ – Andrew Kozak Apr 02 '12 at 14:48