cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: Curl seg fault...i think..

From: Justin Seitz <justin.seitz_at_shaw.ca>
Date: Sun, 24 Oct 2004 07:35:50 -0600

Hi There,

You can still use curl_error() and curl_errno() within a command line
script. If you are running it in cron and it's dying, then do something
like this:

Curl_exec($ch) or die (system("cat ".curl_error($ch)." >> error.txt"));

When your cron job hits that curl_exec it will kick the error into
error.txt, depending on your system you may have to run:

Sh$ touch error.txt

To ensure you have a usable text file.

Hope this helps, let me know.

Justin S.

-----Original Message-----
From: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of John Wards
Sent: Sunday, October 24, 2004 7:29 AM
To: curl-and-php_at_cool.haxx.se
Subject: Curl seg fault...i think..

I am running Curl using the command line and php and doing it thru a
cron job.

For some reason its dieing at random points and i have no idea how to
log these errors to a file.

I have seen it do it ages ago when running the file by hand but I have
tried and failed to replicate it.

Any ideas at how to log errors from curl?

I fork the scripts like this->

Parent.php ->
    ->Child.php
        ->grandchild1.php
        ->grandchild2.php
        ->grandchild3.php
        ->grandchild4.php

The parent file has no curl code in it and neither does the child, they
both just are just controlers.

But when things dies they all die...

My version of curl is: 7.12.1

John

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Received on 2004-10-24