Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ถามเรื่องการ AddHandler fcgid-script ในไฟล์ .htaccess ครับ



 

ถามเรื่องการ AddHandler fcgid-script ในไฟล์ .htaccess ครับ

 



Topic : 105433

Guest




ผมใช้ hosting ของ GoDaddy cPanel

มีปัญหาเรื่องเวลาที่เราอัพไฟล์ .php ขึ้นโฮสต์แล้วลองพรีวิวดู ก็แจ้ง error ว่า
---------------------------------------------------------------------------------------------
500 Internal Server Error
The request was not completed. The server met an unexpected condition.

192.186.201.200/~alicectrl/test-script.php (port 80)
Please forward this error screen to 192.186.201.200's WebMaster.

-------------------------------------------------------------------------------------------------

แต่ถ้าเป็นไฟล์ .html ก็พรีวิวได้ปกติ ไม่มี error

ผมเลยลองลบสคริปต์ทั้งหมดในไฟล์ index.php แล้วอัพขึ้นไปใหม่ ลองพรีวิวดู ก็ยัง error
เลยแจ้งไปทางฝ่าย support ของ GoDaddy ก็มีข้อความตอบกลับมาว่า

---------------------------------------------------------------------------------------------------------
I reviewed the preview versions on the site and both of these sites are resolving blank pages. I have tested your xxx.com/test-script.php script in the preview mode and it resolves just fine. I tested yyy.com/contact-us.php and this resolves fine as well. The issue resides in your index.php files and possibly other files that will need to be reviewed. If you are trying to parse HTML as PHP, you will need to add the following AddHandler to your .htaccess file.

AddHandler fcgid-script .html
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html

The type of error you are experiencing is most likely caused by coding or scripting. Because we do not provide coding support, we are unable to determine what specifically in your code may be causing the error. You may wish to review your code to determine if there are any issues, because it appears that is the most likely cause of the error. If you determine there is no issue with the code itself and believe the issue is server related, please reply with specific evidence of this and we will investigate the matter further.

---------------------------------------------------------------------------------------------------------

สรุปว่า เค้าน่าจะบอกว่า ให้ AddHandler fcgid-script ไว้ในไฟล์ .htaccess ซึ่งผมลองเอาบรรทัด สองบรรทัดนี้

AddHandler fcgid-script .html
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html

ไปใส่ในไฟล์ .htaccess แล้วลองพรีวิวดู คราวนี้แม้แต่ไฟล์ .html เองก็ error ไปด้วย ส่วน .php ก็พรีวิวดูไม่ได้เหมือนเดิม

ปัญหานี้ต้องแก้ยังไงครับ รบกวนขอคำชี้แนะด้วยครับ



Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-02-04 11:50:09 By : tis620 View : 964 Reply : 7
 

 

No. 1

Guest


เงียบเหงา เปล่าเปลี่ยว เดียวดาย ...






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-04 18:13:41 By : tis620
 


 

No. 2

Guest


เอ้าดันกันไป เผื่อมีใครพอจะช่วยผมได้บ้าง
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-06 10:51:37 By : tis620
 

 

No. 3



โพสกระทู้ ( 1,569 )
บทความ ( 2 )



สถานะออฟไลน์
Twitter Facebook Blogger

เข้าดู error log ของ Apache หรือ PHP ได้มั้ยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-06 10:55:20 By : itpcc
 


 

No. 4

Guest


มันเป็นโฮสต์ของ GoDaddy ผมก็เข้าไปดูใน cPanel ก็ไม่เห็นมี error อะไรเลยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-06 11:01:34 By : tis620
 


 

No. 5

Guest


หาสคริปตัวไหนมาใส่ก็ใช้ไม่ได้สักตัว ช่วยผมด้วยคร้าบ ท่านเซียนทั้งหลาย
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-07 14:07:55 By : tis620
 


 

No. 6

Guest


T_T
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-10 10:56:02 By : tis620
 


 

No. 7

Guest


อีกสักทีครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-02-17 13:19:30 By : tis620
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ถามเรื่องการ AddHandler fcgid-script ในไฟล์ .htaccess ครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่