Mailing List Archive

Calls to curl_init() fail with silent 500's when module is not loaded
Hi,

Please add either a debian dependency or likely better for other
platforms too a check in setup.php for the existence of the curl_init()
and related functions, this as when one does not have php5-curl
installed on a box, you will get a 500 but no clue to why that happens,
while it simply is as one is missing curl ;)

Greets,
Jeroen
_______________________________________________
DAViCal-dev mailing list
DAViCal-dev@lists.davical.org
http://lists.davical.org/listinfo/davical-dev
Re: Calls to curl_init() fail with silent 500's when module is not loaded [ In reply to ]
On Thu, 2012-01-05 at 12:11 +0100, Jeroen Massar wrote:
> Hi,
>
> Please add either a debian dependency or likely better for other
> platforms too a check in setup.php for the existence of the curl_init()
> and related functions, this as when one does not have php5-curl
> installed on a box, you will get a 500 but no clue to why that happens,
> while it simply is as one is missing curl ;)

As far as I can see this could only possibly have an effect on the use
of external binds, is that correct?

I wasn't aware of the curl dependency introduced there, but I think we
can probably do some more verbose kind of failure case. I'm loathe to
suggest curl as a dependency for such a minor piece of functionality.

Adding a setup.php test for it would be good though.

Cheers,
Andrew.

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
I have not seen high-discipline processes succeed in commercial
settings. - Alistair Cockburn

------------------------------------------------------------------------
Re: Calls to curl_init() fail with silent 500's when module is not loaded [ In reply to ]
On 2012-01-05 12:25 , Andrew McMillan wrote:
> On Thu, 2012-01-05 at 12:11 +0100, Jeroen Massar wrote:
>> Hi,
>>
>> Please add either a debian dependency or likely better for other
>> platforms too a check in setup.php for the existence of the curl_init()
>> and related functions, this as when one does not have php5-curl
>> installed on a box, you will get a 500 but no clue to why that happens,
>> while it simply is as one is missing curl ;)
>
> As far as I can see this could only possibly have an effect on the use
> of external binds, is that correct?

That is where I found it, and with the little curl command I just put in
the wiki adding them is easy as pi(e).

[..]
> Adding a setup.php test for it would be good though.

That, and maybe a if (function_exists("curl_init")) just before when
that is called. Or put that in a curl_exists() so it can be called from
other locations, and then abort nicely and log the message.

Currently it will just fail, strangely enough _without_ an error message
about an undefined function in the error log which made this a bit
though to find, but putting error_log() statements all over the place
tracked it down quite nicely ;)

Greets,
Jeroen
_______________________________________________
DAViCal-dev mailing list
DAViCal-dev@lists.davical.org
http://lists.davical.org/listinfo/davical-dev