2013-02-05 42 views
0

我有一個用php編寫的示例圖片上傳代碼。一個ios開發者調用Web服務。文件上傳適用於One服務器,但無法在另一臺服務器上傳。如何編輯htacess文件以支持文件上傳

檢查權限,目錄列表等在上述所有嘗試上傳圖像時,Server會引發500內部錯誤。

我覺得可能是用的.htaccess

一個問題,任何人都可以指導我,所以它支持圖片上傳編輯htaccess的。

謝謝。 通過瀏覽器上傳時,文件上傳工作正常。它沒有返回任何錯誤

這裏是錯誤日誌 PHP警告:fopen(xml /)[function.fopen]:未能打開流:沒有這樣的文件或目錄在/ home/appsimon/public_html/api/271行import.php

實際上它在這臺服務器上工作到上週。突然文件上傳htaccess的失敗

代碼

#old php Handler 
#deny from all 
#allow from ip address 

只有這3個註釋行 錯誤從應用程序控制臺

<Warning>: aResponse:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
<html><head> 
<title>500 Internal Server Error</title> 
</head><body> 
<h1>Internal Server Error</h1> 
<p>The server encountered an internal error or 
misconfiguration and was unable to complete 
your request.</p> 
<p>Please contact the server administrator, 
    [email protected] and inform them of the time the error occurred, 
and anything you might have done that may have 
caused the error.</p> 
<p>More information about this error may be available 
in the server error log.</p> 
<p>Additionally, a 500 Internal Server Error 
error was encountered while trying to use an ErrorDocument to handle the request.</p> 
</body></html> 
Feb 6 00:30:48 Varmas-iPhone SNMC[1944] <Warning>: -JSONValue failed. Error trace is: (
    "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x541a40 {NSLocalizedDescription=Unrecognised leading character}" 
) 
Feb 6 00:30:49 Varmas-iPhone SNMC[1944] <Warning>: fail 
+0

什麼在您的錯誤日誌? –

+0

顯示你的htaccess,因爲錯誤500可能意味着你的htaccess有錯誤。 –

+0

在htaccess文件中沒有任何東西被評論。它的一個Linux服務器 –

回答

0

在你的htaccess嘗試添加這些值,看看會發生什麼

php_value upload_max_filesize 100M 
php_value post_max_size 100M 
php_value max_execution_time 180 
php_value max_input_time 180 

根據需要調整值

+0

請檢查我編輯的問題的答覆。它與之前相同 –

+0

我發送的文件是50kb –