1

Been searching around Google for quite some time and cannot find any clear cut explanation of how to install and use Zend Gdata on a shared host.

I e-mailed my hosting company's support department and they told me that they cannot help with third party installs, pointing me in the direction of the INSTALL.txt that came with the framework. Unfortunately, that tells me to install the framework in my include_path, to which I do not have access.

I placed the framework in /public_html/includes/, which is where I store my third party scripts and such. When I try to access the YouTube Browser in the Demo, I get the following error:

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /home/tappess1/public_html/includes/ZendGdata/demos/Zend/Gdata/YouTubeVideoBrowser/index.php on line 42

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tappess1/public_html/includes/ZendGdata/demos/Zend/Gdata/YouTubeVideoBrowser/index.php on line 42

I've seen mention of this being "stand-alone" but cannot seem to find any instructions on how to use it in that capacity. How does one use these features without placing the framework where it wants it to be - the include_path?

Thanks

Ben
  • 13
  • 3

1 Answers1

1

Depending on PHP's and your webserver's configurations you may be able to use an .htaccess file to override the setting using

php_flag include_path ".:/somewhere:/somewhere/else:/and/so/on"

You'll want to be sure that the normal include_path (get it from phpinfo(); ) is included or you'll break everything else.

Otherwise, you'll have to use set_include_path() at the top of every script before you use gdata.

DerfK
  • 19,313
  • 2
  • 35
  • 51
  • Thanks, this looks promising but I need a little bit more details before I try this out (don't want to break PHP). If my new includes directory is located at /public_html/phpincludes, what would the include_path be? And how would I also include the normal include_path? Thanks! – Ben Jan 20 '11 at 19:19
  • Create a tiny script: ``. View that page, and you'll see all of PHP's current settings. On there is a line for include_path. Mine is `.:/usr/share/php:/usr/share/pear`. Add `:/public_html/phpincludes` (are you sure that's not /home/me/public_html/phpincludes?) and call `set_include_path()` with that string – DerfK Jan 21 '11 at 00:34
  • Okay, here is what I tried and it broke everything (error 500), added this to .htaccess in document root - php_flag include_path ".:/usr/lib/php:/usr/local/lib/php" php_flag include_path ".:/home/MYUSERNAME/public_html/includes" You mentioned including the normal include path -- is the above how I would do that? Is my directory structure wrong? Thanks... – Ben Jan 21 '11 at 18:07
  • Finally got it worked out with the web host, as long as I did not mention I needed help installing a third party app they let me have full control over php.ini. Hosed the system at first but now know how to use more than one include_path. Cheers – Ben Jan 22 '11 at 01:06