1

We have a gym display screen working on our server, and now the client is asking me to add another screen to it. I'm new to php and Zend, so any help is appreciated.

I'm trying to set up a sub domain (eg. gymtest.group.com) so I can work on it, it is exact the same code with the working one (gym.group.com), the following warning error comes up.

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /home/group/subdomains/gymtest/Lynfield/Screen_01/includes/configure.php on line 131

Can anyone give me some direction on this please? I can give you more info if needed. Thank you.

S:)

here is some code from configure.php

switch($_SERVER['SERVER_NAME'])
{
    case 'localhost':
        // SERVER PATHS
        define('DOC_ROOT_LYNFIELD_1', $_SERVER['DOCUMENT_ROOT'].'gymtest/lynfield/Screen_01/');
        define('BASE_HREF_LYNFIELD_1', 'http://'.$_SERVER['SERVER_NAME'].'/gymtest/lynfield/Screen_01/');
        break;
    default:
        // SERVER PATHS
        define('DOC_ROOT_LYNFIELD_1', $_SERVER['DOCUMENT_ROOT'].'/lynfield/Screen_01/');
        define('BASE_HREF_LYNFIELD_1', 'http://'.$_SERVER['SERVER_NAME'].'/lynfield/Screen_01/');
        break;
}


switch($_SERVER['SERVER_NAME'])
{
    case 'localhost':
        break;
    default:
        require_once('Zend/Loader.php');
        Zend_Loader::loadClass('Zend_Gdata');
        Zend_Loader::loadClass('Zend_Gdata_Calendar');
        break;
}   

Update- I've got the answer from a developer.

Just in case someone got into the same situation, the config was actually in the htaccess files, all the working screens has this line

php_value include_path "/home/group/subdomains/gym/screen3/ZendGdata/library"

except the not working screen, so I added the line above in htaccess with a different screen number, and it worked.

I'm still not so sure how the first working site works while the line is missing for lynfield, but the screen works perfectly fine for the original site, so it would be great if someone can explains it?? But for now here is the answer for my copied screen.

Thanks everyone. S:)

grumpypanda
  • 571
  • 1
  • 10
  • 37
  • possible duplicate of [Problem autoloading Zend Framework classes](http://stackoverflow.com/questions/6840350/problem-autoloading-zend-framework-classes) – Phil Aug 02 '11 at 00:08
  • Another possible duplicate: [Failed to load Zend/Loader.php. Trying to work out why?](http://stackoverflow.com/questions/39364/failed-to-load-zend-loader-php-trying-to-work-out-why) – hakre Aug 02 '11 at 01:25
  • Hi Phil and Hakre, thanks for your reply! Where would be the place to look for set_include_path? I actually can't figure out how the working site gym.group.com connected to Zend/Loader.php As soon as I move the site to another domain, the google data can't come in due to the error above. i have updated some code from configure.phph if it's useful. Your help is appreciated, S:) – grumpypanda Aug 02 '11 at 03:42

1 Answers1

2

In htaccess file, php_value include_path "/home/group/subdomains/gym/screen3/ZendGdata/library" fixed the problem. Full details please see the update above. Thanks everyone.

grumpypanda
  • 571
  • 1
  • 10
  • 37