douzhang5199 2013-06-20 21:49
浏览 14
已采纳

$ videoFeed = $ yt-> getUserUploads使脚本死亡

I am using a yt-getuseruploads-script that has been working for years, but suddenly it aborts without an error message. It starts like this

<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
ignore_user_abort(true);

function anmelden_yt($name,$passwort)
{
$yt_source = 'known';  
$yt_api_key = 'key';
$yt = null;    
$authenticationURL= 'https://www.google.com/accounts/ClientLogin';  
$httpClient = Zend_Gdata_ClientLogin::getHttpClient(  
$username = $name,  
$password = $passwort,  
$service = 'youtube',  
$client = null,  
$source = $yt_source, // a short string identifying your application  
$loginToken = null,  
$loginCaptcha = null,  
$authenticationURL); 
abschnitt("Login");
return new Zend_Gdata_YouTube($httpClient, $yt_source, NULL, $yt_api_key); 
}


require_once("Zend/Gdata/ClientLogin.php");  
require_once("Zend/Gdata/HttpClient.php");  
require_once("Zend/Gdata/YouTube.php"); 
require_once("Zend/Gdata/App/MediaFileSource.php");  
require_once("Zend/Gdata/App/HttpException.php");  
require_once('Zend/Uri/Http.php');
require_once 'Zend/Loader.php'; 
Zend_Loader::loadClass('Zend_Gdata_YouTube'); 
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); 

echo "1<br>";  
$yt = anmelden_yt($name,$pass);
echo "2<br>";
$videoFeed = $yt->getUserUploads('Google');
sleep(0.5);
echo "3<br>";


    @ob_flush();
@flush();

?>

Problem is, 3 is never being printed, output is

1
2

So even though error_reporting(E_ERROR | E_WARNING | E_PARSE); I get no error message and nothing but the mentioned result. There is no premature break or die.

  • 写回答

1条回答 默认 最新

  • douju7765 2013-06-21 12:48
    关注

    Are you sure that it's a time limit error ? Try to do :

    ini_set('display_errors','1');
    

    at first to see if there's errors

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
  • ¥15 钢筋实图交点识别,机器视觉代码
  • ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
  • ¥50 400g qsfp 光模块iphy方案
  • ¥15 两块ADC0804用proteus仿真时,出现异常
  • ¥15 关于风控系统,如何去选择