lostprophetpunk Posted August 5, 2010 Share Posted August 5, 2010 I have installed the Zend framework in xampp correctly, checked and re-checked the include path etc. But when I try to run the following it comes up with an error... Fatal error: Class 'Zend_Uri_Http' not found in C:\xampp\php\Zend\Gdata\App.php on line 643 The php involved with the 'index.php', the page the error is on, is below... require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path Zend_Loader::loadClass('Zend_Gdata_YouTube'); $yt = new Zend_Gdata_YouTube(); Zend_Loader::loadClass('Zend_Gdata_AuthSub'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); // Assuming that $yt is a valid Zend_Gdata_YouTube object $yt->setMajorProtocolVersion(2); function getAndPrintVideoFeed($location = Zend_Gdata_YouTube::VIDEO_URI) { $yt = new Zend_Gdata_YouTube(); // set the version to 2 to receive a version 2 feed of entries $yt->setMajorProtocolVersion(2); $videoFeed = $yt->getVideoFeed($location); printVideoFeed($videoFeed); } function printVideoFeed($videoFeed) { $count = 1; foreach ($videoFeed as $videoEntry) { echo "Entry # " . $count . "\n"; printVideoEntry($videoEntry); echo "\n"; $count++; } } function printVideoEntry($videoEntry) { // the videoEntry object contains many helper functions // that access the underlying mediaGroup object echo 'Video: ' . $videoEntry->getVideoTitle() . "\n"; echo 'Video ID: ' . $videoEntry->getVideoId() . "\n"; echo 'Updated: ' . $videoEntry->getUpdated() . "\n"; echo 'Description: ' . $videoEntry->getVideoDescription() . "\n"; echo 'Category: ' . $videoEntry->getVideoCategory() . "\n"; echo 'Tags: ' . implode(", ", $videoEntry->getVideoTags()) . "\n"; echo 'Watch page: ' . $videoEntry->getVideoWatchPageUrl() . "\n"; echo 'Flash Player Url: ' . $videoEntry->getFlashPlayerUrl() . "\n"; echo 'Duration: ' . $videoEntry->getVideoDuration() . "\n"; echo 'View count: ' . $videoEntry->getVideoViewCount() . "\n"; echo 'Rating: ' . $videoEntry->getVideoRatingInfo() . "\n"; echo 'Geo Location: ' . $videoEntry->getVideoGeoLocation() . "\n"; echo 'Recorded on: ' . $videoEntry->getVideoRecorded() . "\n"; // see the paragraph above this function for more information on the // 'mediaGroup' object. in the following code, we use the mediaGroup // object directly to retrieve its 'Mobile RSTP link' child foreach ($videoEntry->mediaGroup->content as $content) { if ($content->type === "video/3gpp") { echo 'Mobile RTSP link: ' . $content->url . "\n"; } } echo "Thumbnails:\n"; $videoThumbnails = $videoEntry->getVideoThumbnails(); foreach($videoThumbnails as $videoThumbnail) { echo $videoThumbnail['time'] . ' - ' . $videoThumbnail['url']; echo ' height=' . $videoThumbnail['height']; echo ' width=' . $videoThumbnail['width'] . "\n"; } } function getAndPrintUserUploads($userName) { $yt = new Zend_Gdata_YouTube(); $yt->setMajorProtocolVersion(2); printVideoFeed($yt->getuserUploads($userName)); } $meh = getAndPrintVideoFeed("http://gdata.youtube.com/feeds/api/users/kermitcasson/uploads"); echo $meh; I have tried surfing the net for a solution, and found nothing. If anyone could help, thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/209899-zend-framework-problem/ Share on other sites More sharing options...
frizi Posted October 7, 2010 Share Posted October 7, 2010 I cannot provide you a proper answer but I would go for the Zend server instead of mixing Apache PHP + Zend. Zend server provides you the same as an usual framework so you don't need to install extra the xampp. Otherwise, try to check any tutorial or youtube. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/209899-zend-framework-problem/#findComment-1119733 Share on other sites More sharing options...
thehippy Posted October 7, 2010 Share Posted October 7, 2010 You're not using an autoloader so you'll have to load stuff manually, try loading Zend_Uri_Http Zend_Loader::loadClass('Zend_Uri_Http'); Quote Link to comment https://forums.phpfreaks.com/topic/209899-zend-framework-problem/#findComment-1119801 Share on other sites More sharing options...
ignace Posted October 7, 2010 Share Posted October 7, 2010 You're not using an autoloader so you'll have to load stuff manually, try loading Zend_Uri_Http Zend_Loader::loadClass('Zend_Uri_Http'); The use of the Autoloader is encouraged. Quote Link to comment https://forums.phpfreaks.com/topic/209899-zend-framework-problem/#findComment-1119871 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.