Skip to content
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

php5.6.40下两个BUG #3

Closed
ljycrystal opened this issue Jun 23, 2019 · 2 comments
Closed

php5.6.40下两个BUG #3

ljycrystal opened this issue Jun 23, 2019 · 2 comments

Comments

@ljycrystal
Copy link

ljycrystal commented Jun 23, 2019

  1. 日志报错

[Sun Jun 23 10:41:15.880997 2019] [:error] [pid 32465] [client 169.254.65.200:63206] PHP Fatal error: Call to undefined function curl_init() in /var/www/html/xxxx/yyyy/.antproxy.php on line 3

这一行是
$aAccess = curl_init();
我ubuntu18.04在

sudo apt install php5.6-curl
service apache2 restart

后可以了。但是这个不符合此前假设

目标机器无法主动外连,并且入站只有80端口可访问,目标机器上面不保证一定有python, 不一定有 perl。我们能肯定的是,应该是有php的,但美中不足的是PHP在5.4版本才引入了 -S 这个内置web服务器

的条件


  1. list($headerstr,$sResponse)=explode("\r\n\r\n",$sResponse, 2);
    报错,日志为:

[Sun Jun 23 11:41:45.137806 2019] [:error] [pid 681] [client 169.254.65.200:50174] PHP Notice: Undefined offset: 1 in /var/www/html/xxxx/yyyy/.antproxy.php on line 58

用is_bool看了下,$sResponse是个bool值

@Medicean
Copy link
Owner

这个 proxy 的脚本用的是 curl,你可以换成 fsocket 写

@Medicean
Copy link
Owner

已经支持 fsock 方式,优先采用 curl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants