2010-08-13 105 views
0

由於這是我的第一個PHP Web應用程序,所以不知道關於PHP配置的問題。在長時間運行的PHP腳本中獲取錯誤

這裏是我的情況:我開發了一個PHP/mysql應用程序,用戶可以在其中搜索他的真實追隨者。

現在的問題是,一個用戶說有多達2K的追隨者和500個真正的追隨者,在這種情況下,不會給出任何錯誤,但是當我移動到大用戶10k或更多時,他通常擁有超過1k個真實追隨者,如果我得到的錯誤,在354行提供的無效參數,意味着它沒有獲得休息數據。由於這個,它顯示不完整的結果。爲什麼這樣呢?

根據PHP配置:

max_input_time -30 
max_execution_time - 60 
memory_limit - 64M 

做我需要做改動這些?

或其他我需要做的事情?

你的幫助將不勝感激球員?

預先感謝您。

代碼:

while($cID != 0) 
{ 
    $followers = $t -> get_followers($unm, $cID); //get this array from twitter 
    $nxtcursor = $followers['next_cursor_str']; 
    // print_r($followers); 
    foreach($followers[users] as $followers)  //line no 354 
    { 
     //here i just get data into variables 

     //here i save data into database 
    } 

    $cID = $nxtcursor; 
    if($nxtcursor == 0) 
    { 
      echo "<b>Reached to last cursor!!</b>"; 
    } 


} 
+2

你的數據庫看起來像什麼?你如何從中檢索數據?請張貼一些代碼。 – tdammers 2010-08-13 07:26:00

+0

請重新格式化您的問題。 – 2010-08-13 07:26:35

+1

固定格式 – thomasrutter 2010-08-13 07:28:50

回答

1

我得到錯誤提供了在線無效參數354

這似乎無關的PHP配置。

你只需要看看線354上發生了什麼。

+0

現在爲什麼我沒有想到 – 2010-08-13 07:52:57

+0

嘿嘿 - 我想你應該早先評論你的答案。 – thomasrutter 2010-08-13 07:56:07

+0

我認爲你是對的:)下一次我不會害羞:P – 2010-08-13 07:56:56