Sponsors



« Drilling for magma | Main

PHP, MediaWiki, Biblio, and NuSOAP: getting it all to work on Mac OS X 10.6

I spent the better part of this afternoon rigging up my personal electronic notebook using MediaWiki 1.16 on my MacBook. I downloaded the alpha version of MediaWiki (1.16alpha) because I wanted SQLite search support, although I'm not even totally clear on whether or not I need that.

The only reason I'm writing this post is because getting the Biblio extension on MediaWiki was pretty troublesome. Actually, for the most part, everything went smoothly, per the instructions. But I was hung up on an error that the Biblio extension gave me. It uses NuSOAP, which is apparently deprecated or something, and doesn't work well with PHP 5.3. I was getting the following warning:

Warning: attempt to modify property of non-object at [path/to/nusoap.php] line 4151.

I addressed this warning by commenting out line 4151, which on my file is this:

$this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true;

And I replaced it with the following:

$list2[$ii]['loaded'] = true;

At the very least, it removed the warning messages and the script still executes fine. So I've almost convinced myself that my correction is fine. Please let me know if you believe otherwise. I just wanted to put this out there for anybody else who may run across this and need a quick fix. Please let me know if you think this patch of mine is not the best way to fix it!



Comments

Thank you; was having the same issue with a different use of nuSOAP.

Hopefully the bug is fixed, and not simply hidden.

However giving it some thought the original line would change the property for the class variable, the change would only change the copy of that variable created at the time of the foreach. If there are any adverse effects, maybe changing the foreach to reference values might help.

Andrew, thanks for your suggestion.

So far, I haven't had any problems, but, in fact, I have been worried about this exact issue. My PHP skills have atrophied over the years, so although I have a sense of how the foreach might be altered, I wasn't able to make that work during my original edits.

If you have any suggestions on how to accomplish this, they would be much appreciated!

Hi Courtney, I see this comment is several months late, but thought I'd chime in anyway. We looked at Biblio when we first set up our wikis and I just don't like the way the markup works with multiple page sections (this was a couple of years ago so maybe its changed). What we ended up doing is starting with Cite, and writing our own extensions to make the syntax more concise. On EcoliWiki you can just put a pubmed id as <ref name='PMID:xxxxxxx'/> and the extension will fetch the citation from NCBI EUtils. We also auto-create a separate page for each paper in the wiki. Our extensions are all open source if you want to try them.

I also recommend our TableEdit extension.

Hi Jim, thanks for the advice!

EcoliWiki looks great; I'd love to check out the MediaWiki plugins/extensions. Are they accessible from the website (I couldn't figure out where to find them)?

Thanks; hope life is going well there in B/CS.

Thanks for documenting your efforts to make Biblio and NuSoap work on your system. NuSoap is relevant to a few problems that I've recently found with Biblio. While I'm fixing those problems, I'll load up your configuration and try to reproduce your error and also to see what the change you made does. It seems that a recent change in the data delivered from the web service requests to display Pubmed references on wiki pages broke the extension. I'm working with the Nusoap developers to get the library fixed. Contact me in the interim if you want to try out the changes I made that fix the problem.

Thanks

Bill Flanagan
OpenWetWare.org

Post a comment


Type the characters you see in the picture above.