Yes, there is that. I'm happy to report that, after studying a variety of solutions, we managed to resolve the problem by adapting that AJAX to the problem. curl is not used in the solution.
Thanks Jack
On Mon, Feb 22, 2010 at 7:06 AM, Christensen, Courtney ChristensenC@battelle.org wrote:
Oh, by the way, I forgot that there is some MediaWiki support for using AJAX with your wiki: http://www.mediawiki.org/wiki/Manual:Ajax
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jack Park Sent: Saturday, February 20, 2010 1:06 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Doing external AJAX from an extension
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 jackpark@gmail.com 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 ChristensenC@battelle.org 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 MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l