Jump to content

rklockner

Members
  • Posts

    48
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

rklockner's Achievements

Member

Member (2/5)

0

Reputation

  1. A friend of mine was able to clue me in, so I'd like to update with reason cURL wasn't working. SELinux. Once I disabled it, cURL worked fine. I hope this helps someone! EDIT: In the interest of the server being as secure as possible, a little research found that you can leave SELinux on, but run the following command to allow cURL traffic to pass through: setsebool -P httpd_can_network_connect on setsebool -P httpd_can_network_connect on
  2. I just tried running the following in the command line on the new server and received the expected result, so it would seem that the version of curl is working, but there is an error with php? $ curl google.com <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"><TITLE>301 Moved</TITLE></HEAD><BODY><H1>301 Moved</H1>The document has moved<A HREF="http://www.google.com/">here</A>.</BODY></HTML>
  3. Thanks for the quick reply. Doing a little research: Locally (working): 7.53.1 Centos 7 (woking): 7.29.0 Centos 8 (not working): 7.61.1 Since the new server is running a more recent version, I feel like upgrading won't do the trick...
  4. I have an integration with a third party that utilizes a SOAP API. On my current server AND my local environment, this works fine. I recently deployed a new server and it seems that cURL isn't doing anything. *The code is identical on all three installations. The "error" that I am seeing is no response at all (no response and no error, however, I can see that it is a "Resource"). After much trial and error, I tried creating a simple cURL example to test try to rule out other issues as the code itself is quite complex. My simple example, that also fails, is as follows: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "google.com"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); $err = curl_error($ch); print_r($err); echo $output; curl_close($ch); This does the same thing. On local, I get a "301 Moved" notice, on the new server, it is just a white screen. I have confirmed that php has curl installed in via command line (php -m) and using phpinfo(); in my code. It is definitely enabled. What would cause cURL to not have a response AND not have an error? My thought is a server setting, but I can't seem to find what might be causing this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.