unemployment Posted June 16, 2011 Share Posted June 16, 2011 I am trying to install the youtube API which apparently needs elements from the zend framework. In my library folder I want to include the "zend" folder. How can I tell php to include and entire directory and all of it's sub directories? Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/ Share on other sites More sharing options...
wildteen88 Posted June 16, 2011 Share Posted June 16, 2011 Add the zend folder to your include_path. ini_set('include_path', ini_get('include_path') . DIRECTORY_SEPARATOR . 'full/path/to/your/zend/folder/here'); Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230649 Share on other sites More sharing options...
unemployment Posted June 16, 2011 Author Share Posted June 16, 2011 Add the zend folder to your include_path. ini_set('include_path', ini_get('include_path') . DIRECTORY_SEPARATOR . 'full/path/to/your/zend/folder/here'); This doesn't seem to be working. Any idea why? ini_set('include_path', ini_get('include_path') . DIRECTORY_SEPARATOR . 'assets/lib/zend'); my install check throws this error: Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true. Make sure you include Zend Framework in your include_path which currently contains: .: Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230653 Share on other sites More sharing options...
wildteen88 Posted June 16, 2011 Share Posted June 16, 2011 Sorry I meant to use the PATH_SEPERATOR constant ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . 'assets/lib/zend'); However that may not work either as assets/lib/zend is a relative path. You need to use a full system path. Prehaps use ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . $_SERVER['DOCUMENT_ROOT'] . '/assets/lib/zend'); Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230658 Share on other sites More sharing options...
unemployment Posted June 16, 2011 Author Share Posted June 16, 2011 Sorry I meant to use the PATH_SEPERATOR constant ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . 'assets/lib/zend'); However that may not work either as assets/lib/zend is a relative path. You need to use a full system path. Prehaps use ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . $_SERVER['DOCUMENT_ROOT'] . '/assets/lib/zend'); I received this error; Use of undefined constant PATH_SEPERATOR - assumed 'PATH_SEPERATOR' Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230672 Share on other sites More sharing options...
redixx Posted June 16, 2011 Share Posted June 16, 2011 Sorry I meant to use the PATH_SEPERATOR constant ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . 'assets/lib/zend'); However that may not work either as assets/lib/zend is a relative path. You need to use a full system path. Prehaps use ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . $_SERVER['DOCUMENT_ROOT'] . '/assets/lib/zend'); I received this error; Use of undefined constant PATH_SEPERATOR - assumed 'PATH_SEPERATOR' He misspelled it. It should be : PATH_SEPARATOR Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230678 Share on other sites More sharing options...
unemployment Posted June 16, 2011 Author Share Posted June 16, 2011 Sorry I meant to use the PATH_SEPERATOR constant ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . 'assets/lib/zend'); However that may not work either as assets/lib/zend is a relative path. You need to use a full system path. Prehaps use ini_set('include_path', ini_get('include_path') . PATH_SEPERATOR . $_SERVER['DOCUMENT_ROOT'] . '/assets/lib/zend'); I received this error; Use of undefined constant PATH_SEPERATOR - assumed 'PATH_SEPERATOR' He misspelled it. It should be : PATH_SEPARATOR Hmm for some weird reason my install checker doesn't seem to like it. Right now I am using this to include my files and yes, I did try the document root thing... foreach (glob($path . '/lib/*.inc.php') as $lib_file) { include($lib_file); } ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/assets/lib/zend'); Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230681 Share on other sites More sharing options...
redixx Posted June 16, 2011 Share Posted June 16, 2011 Hmm for some weird reason my install checker doesn't seem to like it. Right now I am using this to include my files and yes, I did try the document root thing... foreach (glob($path . '/lib/*.inc.php') as $lib_file) { include($lib_file); } ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/assets/lib/zend'); Define "doesnt seem to like it" Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230688 Share on other sites More sharing options...
unemployment Posted June 16, 2011 Author Share Posted June 16, 2011 Hmm for some weird reason my install checker doesn't seem to like it. Right now I am using this to include my files and yes, I did try the document root thing... foreach (glob($path . '/lib/*.inc.php') as $lib_file) { include($lib_file); } ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/assets/lib/zend'); Define "doesnt seem to like it" I still get this error... Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true. Make sure you include Zend Framework in your include_path which currently contains: .: Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230689 Share on other sites More sharing options...
redixx Posted June 16, 2011 Share Posted June 16, 2011 Hmm for some weird reason my install checker doesn't seem to like it. Right now I am using this to include my files and yes, I did try the document root thing... foreach (glob($path . '/lib/*.inc.php') as $lib_file) { include($lib_file); } ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/assets/lib/zend'); Define "doesnt seem to like it" I still get this error... Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true. Make sure you include Zend Framework in your include_path which currently contains: .: A quick search says to omit zend from the path. ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/assets/lib'); Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230691 Share on other sites More sharing options...
devWhiz Posted June 16, 2011 Share Posted June 16, 2011 http://www.sumob.com/watch/ implemented nicely Quote Link to comment https://forums.phpfreaks.com/topic/239572-youtube-api/#findComment-1230793 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.