I have instrumented the server to look at the header. This is what I
am inferring from what appears: curl does not deal with cookies.  The
simplest test involves booting from a browser get, observing a cookie,
and also observing that the "referer" is the server. Absent a cookie,
the referer is wrong. So, it appears to me that cookies are the issue;
I find nothing useful in the PHP curl manual that suggests a way
around this. I'm interested in alternatives to curl.  I forced the
wiki page to behave well by embedding the URL in an iframe. That works
well, but is not the approach necessary.  May I ask for suggestions to
either alternatives to curl or for tricks that make curl behave nicely
with cookies?

Many thanks
Jack

On Fri, Feb 19, 2010 at 1:42 PM, Jack Park <[email protected]> wrote:
> Firstly, memory says I turned it on.
> Secondly, would the extension even access the server if it wasn't? I
> ask that because, in fact, it does access the server one time, and
> then seems to enjoy using a cache (which doesn't seem to exist
> anywhere that I can find). I know that because I can watch the server
> react when I refresh the MW page; I do not see the console activity I
> see when the system is freshly booted.
>
> Thanks
> Jack
>
> On Fri, Feb 19, 2010 at 1:36 PM, Christensen, Courtney
> <[email protected]> wrote:
>>
>> Jack Park said:
>>> I thought this would be easy. Write an extension with a CURL get
>>>function that fetches some HTML from a server elsewhere that would
>>>allow me to do AJAX fetches from that server using javascript supplied
>>>from that server.
>>>
>>>It's not happening. I get back status = 0 as if MediaWiki appears to
>>>that server like a file:// or something.
>>>
>>>I can call the same URL the CURL uses in a plain browser bar. I get
>>>the HTML and then am able to get JSON strings back from the server,
>>>but not when using the same html in MW.
>>>
>>>Does any of that ring any bells?
>>>
>>>Many thanks in advance.
>>>Jack
>> _______________________________________________
>>
>>
>>
>> Hi Jack,
>>
>> Any chance your PHP is not configured to allow the use of CURL?
>>
>> -Courtney
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>

_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to