0

我正在尝试将 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 设置中似乎存在文件权限问题,我该如何开始解决这个问题?

4

1 回答 1

0

SELinux 阻止了 http_post 的发生。

于 2013-08-27T19:51:33.533 回答