IIS gives 502 error using elfinder, how to debug it?
I'm using elfinder (http://elrte.org/elfinder) on a webserver using IIS (I don't have access to it, and the sysadmins are dumb, don't even know what a mysql user/pass is).
I got access to the server logs, and it just show:
2011-04-04 10:05:14 W3SVC12004 PMCCESXWINPLN X.X.X.X GET /finder/connectors/php/connector_files.php _=1301911527471&cmd=open&target=&init=true&tree=true 80 - 91.200.116.88 HTTP/1.1 Mozilla/5.0+(Macintosh;+U;+开发者_C百科PPC+Mac+OS+X+10_5_8;+es-es)+AppleWebKit/533.19.4+(KHTML,+like+Gecko)+Version/5.0.3+Safari/533.19.4 ewaadm=5fc88e7310f5133a72f675848eaa09dec833ffaf http://www.domain.ltd/finder/singlefile.php?field=test www.domain.ltd 502 2 259 1639 625 756
I used to apache log files, who tell me something. This log line don't tell me anything, and don't know what to do or modify the code because the site only shows "502 - Bad gateway".
Did someone had the same problem or have any idea how to know what the error is?
The rest of the site works well.
This is probably solved. But I wanted to add what I found. IIS can run PHP files either as CGI or Fast CGI application. IIS seems to be checking strictly all the headers returned by elFinder and when it found headers missing, it flagged the response as invalid and returned 502 HTTP error. I changed this to FastCGI method of invocation for PHP files by IIS and it fixed the problem.
I think you need exactly error_log instead of access_log, you can also try to set error_reporting(E_ALL); ini_set('display_errors', 1);
in your connector.php maybe this will give you some output to the browser.
As a member of elFinder development team, I can say that we haven't tried to run elFinder under IIS, but we have reports that it works well.
精彩评论