[英]File permissions error with http_post in my php setup
I am trying to send an http_post_fields to a server: 我正在尝试将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);
I am getting the following error in my http error_logs when I try to run this page in a browser: 尝试在浏览器中运行此页面时,我的http error_logs中出现以下错误:
PHP Warning: http_post_fields(): Couldn't connect to server;
Failed to connect to 1.2.3.4:Permission denied
If I try to run this script from command line, it works fine. 如果我尝试从命令行运行此脚本,则可以正常运行。 It seems to be there is a file permissions problem somewhere within my php setup, how do I begin to solve this? 看来我的php设置中某处存在文件许可权问题,我该如何解决呢?
SELinux阻止了http_post的发生。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.