I am trying to send an http_post_fields to a server:
$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:
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?
SELinux was preventing the http_post from occuring.