我正在尝试将http_post_fields发送到服务器:
$emailAddress = "email@email.com";
$emailPassword = "password";
$post = array ('cmd' => 'cmd_user_login',
'lcmd' => 'user_delete',
'show' => 'simple_msg.xml',
'username' => 'uName',
'password' => 'uPassword',
'lusername' => $emailAddress,
'lpassword' => $emailPassword,
'uid' => $emailAddress);
$result = http_post_fields('https://1.2.3.4:7443/cgi/user.cgi',$post);
当我尝试在浏览器中运行此页面时,我在http error_logs中收到以下错误:
PHP Warning: http_post_fields(): Couldn't connect to server;
Failed to connect to 1.2.3.4:Permission denied
如果我尝试从命令行运行此脚本,它可以正常工作。 似乎在我的php设置中的某个地方存在文件权限问题,我该如何开始解决这个问题?
答案 0 :(得分:0)
SELinux阻止了http_post的发生。