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!

Post a comment


Type the characters you see in the picture above.