0

At work im having a big issue getting a cURL piece of our application to work on our live environment, but it works alright on our QA servers. The server environments are "supposed" to be the same.

cURL is executing, but the data is not being posted back. What i want to know is... is there something on the server that i could check to verify that curl is installed, running properly, etc? is there some config files I should look to see if data is not being posted back because of a certain setting?

I dont know how and what to begin looking at... or how to tackle this issue. Can someone make some suggestions?

curl is executing, but the data is not being posted back. What i want to know is... is there something on the server that i could check to verify that curl is installed, running properly, etc? is there some config files I should look to see if data is not being posted back because of a certain setting?

5
  • 3
    Include code and error messages, please :) In what way does it fail to work? Commented Jan 21, 2010 at 2:04
  • 3
    You could specify what doesn't work about it... sounds like you've done no debugging whatsoever. We certainly can't read your mind and you're not even showing code... help us help you? Commented Jan 21, 2010 at 2:05
  • 5
    FEED ME CODE AND I WILL SPIT UP ANSWERS Commented Jan 21, 2010 at 2:09
  • sigh? is that a setting? hahah cmon... the code works in one of the servers... I just want suggestions at WHAT to look at server wise when it comes to curl issues Commented Jan 21, 2010 at 2:14
  • if you aren't willing to post code, you're on your own. Commented Jan 21, 2010 at 3:14

1 Answer 1

1

if your server is *nix based, and you have CLI access to the server, try typing

php -i

and see if it spits out a ton of data about your configuration. to automatically seach for cURL, do this:

php -i | grep cURL

and see if anything shows up. if your server isn't *nix, you don't have access, or the command isn't found (it's not on the $PATH), I'd recommend the next way.

second way - save the following text as a file (for example phpinfo.php):

<?php phpinfo(); ?>

and put it somewhere on your production environment that nobody's going to go to (for the minute you leave it there). otherwise, if you're a security freak, let me know and I'll put some more code.

anyways, hit that file in a web browser (i.e. http:// production.server / secure_or_obscure_dir / phpinfo.php ), then delete the source file (while leaving the page open).

again, view this page for cURL or press CTRL + f, then type "cURL" (omit quotes).

if cURL is there, then it's installed, otherwise you have to install it.

if it's installed, you're probably not getting good data back. check the curl_errno or curl_error on the cURL object (for the last error).

additionally, you get more info on the object by doing this:

print_r( curl_getinfo( $theNameOfYourCURLObject ) );

to see if you're getting error HTTP statuses ( > 400 ).

Sign up to request clarification or add additional context in comments.

2 Comments

thanks, Dan. Im still having the problem and no errors are being shown... but thanks for thinking outside the box
was cURL installed on the server you're having issues on?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.