PHP Protected Variable Problem with Coolstack 1.1?

I'm not sure if this issue is related to Coolstack or not, so please forgive me if I have ended up posting to the wrong forum....

I am trying to deploy MediaWiki 1.9 on our Solaris 10 box. I have installed the CoolStack 1.1 packages for Apache,/PHP and also the 64bit MySQL and have completed all necessary configuration steps for the setting up MediaWiki.

When I try to access MediaWiki from the browser I get this error:

Cannot access protected property DatabaseMysql::$mOut

There are quite a few postings on the web where other uses have run into this issue but the problems were not related to Mediawiki. Sometimes this was due to a bug in the PHP optimizer eAccelerator, however, Coolstack does not appear to use this product.

I do not believe this is a problem with MediaWiki because the same version is running successfully on other AMP distributions. I have also been running it successfully on a Windows AMP stack.

Basically, it appears that the behavior of PHP protected variables is not working correctly. If I change the offending line in the PHP source file to make the variable public, it fixes it but immediately fails on another protected variable.

I am not a PHP programmer so I cannot investigate this further. I am going to try and find a PHP developer to see if they can reproduce and isolate the exact nature of the problem.

I am also going to try and use another AMP stack on our Solaris box to see if I get the same error. However, I wanted to post this now to see if anyone else has experienced this same problem.

Thanks,

-m

[1616 byte] By [mhwftla] at [2007-11-26 20:24:19]
# 1

Update:

I removed Coolstack 1.1. and replaced it with Coolstack 1.0.2. The PHP error disappeared.

So it looks like there may be a problem with the latest build of Coolstack.

It would be useful for someone to confirm this problem by creating a simple PHP test. The test would be a class that contains a protected variable, then a child class that tries to access the inherited protected variable.

mhwftla at 2007-7-10 0:50:26 > top of Java-index,Open Source Technologies,OpenSPARC...
# 2

I tried the following sample script and it works. So, I'm not sure that simply accessing the variable is a problem.

<?php

class ClassWithProtected

{

protected $someVar = "parent protected";

}

class SubClassWithProtected extends ClassWithProtected

{

public function someFunc()

{

print "accessing parent variable gives '" . $this->someVar . "'\n";

}

}

$someObj = new SubClassWithProtected();

$someObj->someFunc();

?>

shantiSa at 2007-7-10 0:50:27 > top of Java-index,Open Source Technologies,OpenSPARC...
# 3

It is tricky to comment without looking at thte failing line - but it looks like it is triggered as

a result of PHP version difference? We have upped the PHP version to PHP 5.2.0 in

Coolstack 1.1 - and if the code was chaining a __set() of a private var on the back

of __get() - then this could fail. pl. see :http://bugs.php.net/bug.php?id=34893

Having said this - there is indeed a bug in PHP (reported in 5.2.1)- please see .

http://pecl.php.net/bugs/bug.php?id=10129 .

-regards

parametera at 2007-7-10 0:50:27 > top of Java-index,Open Source Technologies,OpenSPARC...
# 4
It turns out that the culprit is APC. Please disable APC in your php.ini (Cool Stack ships with apc enabled by default). MediaWiki should now work. We'll track when this issue gets fixed.Shanti
shantiSa at 2007-7-10 0:50:27 > top of Java-index,Open Source Technologies,OpenSPARC...
# 5
I have exactly the same problem. Since a few days my website which uses mediawiki does not work any more. The company that hosts my website ( http://www.servage.net) does not allow me to change the php.ini, and is also not very cooperative. Are there other ways to solve the problem
Ruuta at 2007-7-10 0:50:27 > top of Java-index,Open Source Technologies,OpenSPARC...
# 6
My hosting company solved the problem by diasbling eaccelerator, they did this by putting the following line in .htaccess:php_flag eaccelerator.enable offNow everything works fine again.
Ruuta at 2007-7-10 0:50:27 > top of Java-index,Open Source Technologies,OpenSPARC...