curl: no return value (is it a setup problem)?

curl: no return value (is it a setup problem)?

Post by Marian Heddesheim » Sun, 13 Jan 2002 19:46:29



Hi,

I'm not sure if this problem really belongs to PHP or if it might be a
setup problem with the curl application.

I am using this statement in PHP:

exec($url, $return_string);

works fine some times, but sometimes i just don't get anything back.
No error message just an empty array. I have also used passthru() or
system() instead of exec() but that didn't help (even no error
message).

The build-in curl functions from PHP don't work (PHP says: curl_init()
is an unknown function - using PHP 4.0.6)

I had this workaround: if the $return_string is empty, I display a
message that the user should reload the page. This worked after the
second or third try. But since this morning nothing worked and I
suspect it's a server problem.

I asked the owner of the server to look into the logfiles and he found
this:

============
[Thu Jan 10 14:49:27 2002] [error] [client 203.204.50.97] Client sent
malformed Host header

sh: /nonexec/curl: No such file or directory
sh: /nonexec/curl: No such file or directory
sh: /nonexec/curl: No such file or directory
==========

not sure where the /nonexec/curl/ comes from. The code is still the
same and I use the correct path to curl (found out with "which curl")
so this is really confusing.

Can anybody give me a hint?

Marian
--
http://www.heddesheimer.de
http://www.rent-a-tutor.com - Software on the Web

 
 
 

1. curl: no return value

Hi,

I am using this statement in PHP:

exec($url, $return_string);

works fine some times, but sometimes i just don't get anything back.
No error message just an empty array. I have also used passthru() or
system() instead of exec() but that didn't help (even no error
message).

The build-in curl functions from PHP don't work (PHP says: curl_init()
is an unknown function - using PHP 4.0.6)

I had this workaround: if the $return_string is empty, I display a
message that the user should reload the page. This worked after the
second or third try. But since this morning nothing worked and I
suspect it's a server problem.

I asked the owner of the server to look into the logfiles and he found
this:

============
[Thu Jan 10 14:49:27 2002] [error] [client 203.204.50.97] Client sent
malformed Host header

sh: /nonexec/curl: No such file or directory
sh: /nonexec/curl: No such file or directory
sh: /nonexec/curl: No such file or directory
==========

not sure where the /nonexec/curl/ comes from. The code is still the
same and I use the correct path to curl (found out with "which curl")
so this is really confusing.

Can anybody give me a hint?

Marian
--
http://www.heddesheimer.de
http://www.rent-a-tutor.com - Software on the Web

2. Need help for opening a character special file....

3. The `who am i` does not return a value

4. Which the right command to shutdown my sparc ?

5. CURL & NetSaint (Return Code Out of Bounds)

6. Dual OS INSTALLATION QUESTION

7. Default return value for when return() is not explicitly used on SC5.0

8. 2.2.1 -> 2.2.2

9. Problem about return value

10. Problem with status value returned by waitpid

11. problems with return value evaluation when redirecting to named pipe

12. Q: am-util-6.0 setup problems

13. problem with curl