I am making an AJAX request, for example using jQuery:
$.ajax({ type: "GET", url: "getvideo.php", data: 'videoid=' + vid,
Am I using firebug to tell me what is happening and it tells me that an internal 500 server error has occurred? Here is the script part:
$videoid = $_GET['videoid']; $get = new youtubeAPI(); $get->getVideoAPI($videoid); class youtubeAPI extends Exception { function getVideoAPI($videoid){ if (isset($videoid)) { $clientLibraryPath = 'library'; $oldPath = set_include_path( get_include_path() . PATH_SEPARATOR . $clientLibraryPath ); require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path
I use the same AJAX call for other scripts and they are fine. I used these scripts on another server, and on the other server it was fine except the file is called "getvideo.php5", whereas here I called it "getvideo.php", since I have PHP 5.2.6 installed only.
Please, help
UPDATE
This is mistake:
[Wed Feb 11 20:48:17 2009] [error] [client xx.xx.xxx.xxx] PHP Fatal error: class DOMDocument not found in /var/www/html/library/Zend/Gdata/App.php in line 734, referent: http://xx.xx.xx.xxx/
I have hidden my IP. On this line:
public static function importString($string, $className='Zend_Gdata_App_Feed') { // Load the feed as an XML DOMDocument object @ini_set('track_errors', 1); $doc = new DOMDocument(); // LINE 734 $success = @$doc->loadXML($string); @ini_restore('track_errors');
But I should not play with this right? In any case, this class does not exist as a script and does not exist in this script as a class. I am using this same library in my other server. It is also missing that too ??? This is what I downloaded from the Zip Youtube API folder.
solvable
It was a completely new server and it installed minimal PHP. I lacked the functions of PHP dom. A quick installation fixed this problem. Thanks for reminding me to see the magazines. First I had to try.
yum install php-xml yum install php-xmlrpc