[問題] linux 下cgi問題(已自行解決\)
出現這種問題
1.檢查資料及檔案權限
2.http conf 是否指向可用cgi資料夾
3.檢查cgi檔案是否轉成UNIX格式(我就是卡在這關)
-----------------------------------------------
安裝好 httpd
檔案放入 /var/www/html/.
網頁看起來沒問題
把cgi放入/var/www/cgi-bin/.
執行 127.0.0.1/cgi-bin/.
會出現 500
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
是perl 的問題嗎? 還是什麼 請高手解!
入徑: /var/www/cgi-bin/read.cgi
使用 perl /var/www/cgi-bin/read.cgi 出的來
links http://127.0.0.1/cgi-bin/read.cgi 出現500
用IE開也是 500
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.1.136
※ 編輯: c224456k 來自: 59.120.1.136 (02/24 14:35)
→
02/24 16:51, , 1F
02/24 16:51, 1F
推
02/24 16:59, , 2F
02/24 16:59, 2F
[Fri Feb 24 17:17:10 2012] [error] [client 192.168.1.116] (8)Exec format error: exec of '/var/www/cgi-bin/read.cgi' failed
[Fri Feb 24 17:17:10 2012] [error] [client 192.168.1.116] Premature end of script headers: read.cgi
※ 編輯: c224456k 來自: 59.120.1.136 (02/24 17:19)
→
02/24 17:20, , 3F
02/24 17:20, 3F
→
02/24 22:18, , 4F
02/24 22:18, 4F
推
02/25 00:33, , 5F
02/25 00:33, 5F
※ 編輯: c224456k 來自: 59.120.1.136 (03/01 10:05)