-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAC下点击php代理没有反应 #2219
Comments
PHP模块是否已经启动? |
@xxnet 已经启动,如果SwitchyOmega不设置PHP代理的话是可以打开PHP代理配置页面,PHP 服务器地址后面能显示我设置自己的地址,但日志页面打不开,所以看不到日志。 |
start.bat 启动会有个cmd窗口,你可以从里面看日志 |
错误日志: \n \n \n\n\n<script type="text/javascript">\n title('PHP\xe4\xbb\xa3\xe7\x90\x86\xe6\x97\xa5\xe5\xbf');\n</script>\n<script type="text/javascript">\n $(function() {\n resizeLogWindow();\n });\n\n $(window).resize(function() {\n resizeLogWindow();\n });\n</script>\n<script type="text/javascript">\n function resizeLogWindow() {\n var windowHeight = $(window).height(),\n preservedHeight = 220;\n\n $('#log').css('height', windowHeight - preservedHeight);\n }\n</script>\n<script type="text/javascript">\n $(function() {\n window.previousOffset = 0;\n window.offset = 1;\n window.isAutoScrollLog = true;\n\n var timer = $.timer(function() {\n getLog();\n });\n timer.set({\n time: 2500,\n autostart: true\n });\n });\n</script>\n<script type="text/javascript">\n $(function() {\n getLog();\n });\n</script>\n<script type="text/javascript">\n $('#log').scroll(function() {\n var preservedHeight = $('#log').height() + 10,\n scrollHeight = $('#log')[0].scrollHeight,\n scrollTop = $('#log').scrollTop();\n\n if ( scrollTop + preservedHeight == scrollHeight ) {\n window.isAutoScrollLog = true;\n } else {\n window.isAutoScrollLog = false;\n }\n });\n</script>\n<script type="text/javascript">\n function scrollLog() {\n if ( window.isAutoScrollLog ) {\n $('#log').scrollTop($('#log')[0].scrollHeight);\n }\n }\n</script>\n<script type="text/javascript">\n function getLog() {\n var pageRequests = {\n 'cmd': 'get_new',\n 'last_no': offset\n };\n\n $.ajax({\n type: 'GET',\n url: 'http://127.0.0.1:8083/log\',\n data: pageRequests,\n dataType: 'JSON',\n success: function(result) {\n $.each(result, function(lineNumber, log) {\n window.offset = lineNumber;\n\n var logTemplate = '%s ';\n if ( window.previousOffset != window.offset ) {\n $('#log').append(logTemplate.format(getLogColor(getLogLevel(log)), log.replace(/\n/g, '')));\n scrollLog();\n }\n });\n window.previousOffset = window.offset;\n }\n });\n }\n</script>\n<script type="text/javascript">\n function getLogLevel(log) {\n if ( log.indexOf('[DEBUG]') != -1 ) {\n return 'DEBUG';\n } else if ( log.indexOf('[INFO]') != -1 ) {\n return 'INFO';\n } else if ( log.indexOf('[WARNING]') != -1 ) {\n return 'WARNING';\n } else if ( log.indexOf('[ERROR]') != -1 ) {\n return 'ERROR';\n } else if ( log.indexOf('[CRITICAL]') != -1 ) {\n return 'CRITICAL';\n }\n return 'DUMMY';\n }\n</script>\n<script type="text/javascript">\n function getLogColor(logLevel) {\n var colors = {\n 'DUMMY': '#000',\n 'DEBUG': '#21610b',\n 'INFO': '#000',\n 'WARNING': '#ff8000',\n 'ERROR': '#fe2e2e',\n 'CRITICAL': '#d7df01'\n };\n\n return colors[logLevel];\n }\n</script>', 204, 206, 'invalid continuation byte') cmd:GET path:/?module=php_proxy&menu=logging from:127.0.0.1:51198 Mar 08 17:42:22.944 - [ERROR] Except stack:Traceback (most recent call last): File "/Applications/XX-net/python27/1.0/lib/noarch/simple_http_server.py", line 129, in handle_one_request self.do_GET() File "/Applications/XX-net/launcher/web_control.py", line 105, in do_GET return self.req_index_handler() File "/Applications/XX-net/launcher/web_control.py", line 217, in req_index_handler data = (index_content.decode('utf-8') % (current_version, current_version, menu_content, right_content.decode('utf-8') )).encode('utf-8') File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 204-205: invalid continuation byte Mar 08 17:42:36.097 - [ERROR] handler:UnicodeDecodeError('utf8', ' \n \n \n\n\n<script type="text/javascript">\n title('PHP\xe4\xbb\xa3\xe7\x90\x86\xe6\x97\xa5\xe5\xbf');\n</script>\n<script type="text/javascript">\n $(function() {\n resizeLogWindow();\n });\n\n $(window).resize(function() {\n resizeLogWindow();\n });\n</script>\n<script type="text/javascript">\n function resizeLogWindow() {\n var windowHeight = $(window).height(),\n preservedHeight = 220;\n\n $('#log').css('height', windowHeight - preservedHeight);\n }\n</script>\n<script type="text/javascript">\n $(function() {\n window.previousOffset = 0;\n window.offset = 1;\n window.isAutoScrollLog = true;\n\n var timer = $.timer(function() {\n getLog();\n });\n timer.set({\n time: 2500,\n autostart: true\n });\n });\n</script>\n<script type="text/javascript">\n $(function() {\n getLog();\n });\n</script>\n<script type="text/javascript">\n $('#log').scroll(function() {\n var preservedHeight = $('#log').height() + 10,\n scrollHeight = $('#log')[0].scrollHeight,\n scrollTop = $('#log').scrollTop();\n\n if ( scrollTop + preservedHeight == scrollHeight ) {\n window.isAutoScrollLog = true;\n } else {\n window.isAutoScrollLog = false;\n }\n });\n</script>\n<script type="text/javascript">\n function scrollLog() {\n if ( window.isAutoScrollLog ) {\n $('#log').scrollTop($('#log')[0].scrollHeight);\n }\n }\n</script>\n<script type="text/javascript">\n function getLog() {\n var pageRequests = {\n 'cmd': 'get_new',\n 'last_no': offset\n };\n\n $.ajax({\n type: 'GET',\n url: 'http://127.0.0.1:8083/log\',\n data: pageRequests,\n dataType: 'JSON',\n success: function(result) {\n $.each(result, function(lineNumber, log) {\n window.offset = lineNumber;\n\n var logTemplate = '%s ';\n if ( window.previousOffset != window.offset ) {\n $('#log').append(logTemplate.format(getLogColor(getLogLevel(log)), log.replace(/\n/g, '')));\n scrollLog();\n }\n });\n window.previousOffset = window.offset;\n }\n });\n }\n</script>\n<script type="text/javascript">\n function getLogLevel(log) {\n if ( log.indexOf('[DEBUG]') != -1 ) {\n return 'DEBUG';\n } else if ( log.indexOf('[INFO]') != -1 ) {\n return 'INFO';\n } else if ( log.indexOf('[WARNING]') != -1 ) {\n return 'WARNING';\n } else if ( log.indexOf('[ERROR]') != -1 ) {\n return 'ERROR';\n } else if ( log.indexOf('[CRITICAL]') != -1 ) {\n return 'CRITICAL';\n }\n return 'DUMMY';\n }\n</script>\n<script type="text/javascript">\n function getLogColor(logLevel) {\n var colors = {\n 'DUMMY': '#000',\n 'DEBUG': '#21610b',\n 'INFO': '#000',\n 'WARNING': '#ff8000',\n 'ERROR': '#fe2e2e',\n 'CRITICAL': '#d7df01'\n };\n\n return colors[logLevel];\n }\n</script>', 204, 206, 'invalid continuation byte') cmd:GET path:/?module=php_proxy&menu=logging from:127.0.0.1:51414 Mar 08 17:42:36.098 - [ERROR] Except stack:Traceback (most recent call last): File "/Applications/XX-net/python27/1.0/lib/noarch/simple_http_server.py", line 129, in handle_one_request self.do_GET() File "/Applications/XX-net/launcher/web_control.py", line 105, in do_GET return self.req_index_handler() File "/Applications/XX-net/launcher/web_control.py", line 217, in req_index_handler data = (index_content.decode('utf-8') % (current_version, current_version, menu_content, right_content.decode('utf-8') )).encode('utf-8') File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 204-205: invalid continuation byte Mar 08 17:42:52.935 - [INFO] GAE CONNECT mtalk.google.com:5228 |
好像是编码问题 |
@xxnet @jzp820927 请问这个问题如何解决呢?谢谢 |
你是不是用记事本改过配置文件? |
没有改过,我用的是sourcetree客户端 |
不知道是不是自动升级造成的,建议重新下载最新版覆盖。 |
Mar 11 01:09:04.654 - [ERROR] handler:UnicodeDecodeError('utf8', ' \n \n \n\n\n<script type="text/javascript">\n title('PHP\xe4\xbb\xa3\xe7\x90\x86\xe6\x97\xa5\xe5\xbf');\n</script>\n<script type="text/javascript">\n $(function() {\n resizeLogWindow();\n });\n\n $(window).resize(function() {\n resizeLogWindow();\n });\n</script>\n<script type="text/javascript">\n function resizeLogWindow() {\n var windowHeight = $(window).height(),\n preservedHeight = 220;\n\n $('#log').css('height', windowHeight - preservedHeight);\n }\n</script>\n<script type="text/javascript">\n $(function() {\n window.previousOffset = 0;\n window.offset = 1;\n window.isAutoScrollLog = true;\n\n var timer = $.timer(function() {\n getLog();\n });\n timer.set({\n time: 2500,\n autostart: true\n });\n });\n</script>\n<script type="text/javascript">\n $(function() {\n getLog();\n });\n</script>\n<script type="text/javascript">\n $('#log').scroll(function() {\n var preservedHeight = $('#log').height() + 10,\n scrollHeight = $('#log')[0].scrollHeight,\n scrollTop = $('#log').scrollTop();\n\n if ( scrollTop + preservedHeight == scrollHeight ) {\n window.isAutoScrollLog = true;\n } else {\n window.isAutoScrollLog = false;\n }\n });\n</script>\n<script type="text/javascript">\n function scrollLog() {\n if ( window.isAutoScrollLog ) {\n $('#log').scrollTop($('#log')[0].scrollHeight);\n }\n }\n</script>\n<script type="text/javascript">\n function getLog() {\n var pageRequests = {\n 'cmd': 'get_new',\n 'last_no': offset\n };\n\n $.ajax({\n type: 'GET',\n url: 'http://127.0.0.1:8083/log\',\n data: pageRequests,\n dataType: 'JSON',\n success: function(result) {\n $.each(result, function(lineNumber, log) {\n window.offset = lineNumber;\n\n var logTemplate = '%s ';\n if ( window.previousOffset != window.offset ) {\n $('#log').append(logTemplate.format(getLogColor(getLogLevel(log)), log.replace(/\n/g, '')));\n scrollLog();\n }\n });\n window.previousOffset = window.offset;\n }\n });\n }\n</script>\n<script type="text/javascript">\n function getLogLevel(log) {\n if ( log.indexOf('[DEBUG]') != -1 ) {\n return 'DEBUG';\n } else if ( log.indexOf('[INFO]') != -1 ) {\n return 'INFO';\n } else if ( log.indexOf('[WARNING]') != -1 ) {\n return 'WARNING';\n } else if ( log.indexOf('[ERROR]') != -1 ) {\n return 'ERROR';\n } else if ( log.indexOf('[CRITICAL]') != -1 ) {\n return 'CRITICAL';\n }\n return 'DUMMY';\n }\n</script>\n<script type="text/javascript">\n function getLogColor(logLevel) {\n var colors = {\n 'DUMMY': '#000',\n 'DEBUG': '#21610b',\n 'INFO': '#000',\n 'WARNING': '#ff8000',\n 'ERROR': '#fe2e2e',\n 'CRITICAL': '#d7df01'\n };\n\n return colors[logLevel];\n }\n</script>', 204, 206, 'invalid continuation byte') cmd:GET path:/?module=php_proxy&menu=logging from:127.0.0.1:50382 Mar 11 01:09:04.654 - [ERROR] Except stack:Traceback (most recent call last): File "/Applications/XX-Net/python27/1.0/lib/noarch/simple_http_server.py", line 129, in handle_one_request self.do_GET() File "/Applications/XX-Net/launcher/web_control.py", line 105, in do_GET return self.req_index_handler() File "/Applications/XX-Net/launcher/web_control.py", line 217, in req_index_handler data = (index_content.decode('utf-8') % (current_version, current_version, menu_content, right_content.decode('utf-8') )).encode('utf-8') File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 204-205: invalid continuation byte 这是重新安装的结果,一样的错误,使用sourcetree更新有文件被修改会有提示的。 |
另外状态页面出问题了,XX-Net get_version_fail,一切正常,你可以访问真正的互联网了。 |
那我也不知道了,等XX老大来看看吧 |
已找到问题,可以试试开发分支版本: |
谢谢,可以用了。 |
xx-net设置:
[php]
enable = 1
password = 123456
fetchserver = http://causlayer.0fees.us/index.php
SwitchyOmega设置:
代理协议:http
代理服务器:127.0.0.1
代理端口:8088
/Applications/XX-net/php_proxy/local/proxy.ini设置:
[php]
enable = 1
password = 123456
crlf = 0
validate = 0
listen = 127.0.0.1:8088
fetchserver = http://causlayer.0fees.us/
服务器设置就按照教程弄的,可点击web配置页面http://127.0.0.1:8085/?module=php_proxy&menu=config
并没有反应,日志就更看不到了,原来我记得可以用的啊,有段时间没用就变成这样了。
The text was updated successfully, but these errors were encountered: