I\'m getting a permission denied error when trying to make a cURL request with the php cURL library to localhost on port 4321. This will hopefully be really easy or obvious
I found the answer to the problem at: Getting permission denied while Posting xml using Curl?
The problem is SELinux and the solution is to run:
sudo setsebool httpd_can_network_connect 1
It doesn't make sense to me that I could use the php cURL library to access every other website in the world, but not localhost on a different port, while I was able to access the localhost from command line cURL.