Knowledge Tree and PHP 5.3.3   March 7th, 2011

We have got the latest PHP version on Hostsharing, and Knowledge Tree did not work anymore.

I got a long list of deprecated warnings, and the session would not even start, so not even a login screen is displayed.
Deprecated: Assigning the return value of new by reference is deprecated
Warning: The magic method __get() must have public visibility and cannot be static
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent
The solution is to edit config/dmsDefaults.php, find the lines containing
error_reporting(E_ALL & ~E_NOTICE);
ini_set(‘display_errors’, ‘1’);
ini_set(‘display_startup_errors’, ‘1’);
Below that, add the following line:


Now Knowledge Tree will work again, and hopefully the next version of Knowledge Tree will have fixed all the deprecated PHP things.
Tags: ,
This entry was posted on Monday, March 7th, 2011 at 9:28 pm and is filed under Software Development. You can follow any responses to this entry through the RSS 2.0 feed.Both comments and pings are currently closed.

7 Responses

March 14th, 2011 at 11:45 pm
Mario Says:

Thank you. Made my night a couple of hours longer.

How did you find out?



BTW: If the wizard doesn’t let you install KT on php 5.3 just change a line in /setup/wizard/steps/dependencies.php

change phpversion to 5.4 or something. 🙂

August 23rd, 2011 at 5:50 pm
Juank Says:

Many many thank you man

April 16th, 2012 at 1:31 pm
syamsul Says:

Hi I have followed your tip on my PHP 5.3.10 server but now on


I get a blank screen 🙁

Can you advise? Thanks!

April 16th, 2012 at 1:44 pm
Timotheus Pokorra Says:

a blank screen is usually a sign for a typo. Check your changes again. Otherwise modify your php.ini to show errors (display_errors = On), which might help you to find the line of your typo.

April 17th, 2012 at 4:19 pm
syamsul Says:

Hi I have double checked the edit. When I remove the line


I will get output on the page like this:

Deprecated: Assigning the return value of new by reference is deprecated in etc etc etc

I definitely don’t have a typo – when I put it back in, the whole screen shows a blank 🙁

I did a

tail -f /var/log/messages

and reloaded the page (and get a blank)
but it does not show any errors

April 17th, 2012 at 8:44 pm
Timotheus Pokorra Says:

You can also try to use error_reporting(E_ERROR);
see also for possible parameters.

On the other hand, I am quite disappointed with KnowledgeTree, since it seems they are not developing the community version anymore. See also this thread:

I am personally considering to try Alfresco, but I have not found an easy way yet to migrate my documents with versioning to Alfresco.

July 5th, 2012 at 8:56 am
daserzw Says:

On my server, Apache/2.2.9 PHP 5.3.3-7 Debian, I needed to fix the error_reporting in /etc/php5/apache2/php.ini too.
By the way, it is not needed to set the error_reporting to 0, “E_ALL & ~E_WARNING & ~E_NOTICE & ~E_DEPRECATEDE_ALL & ~E_WARNING & ~E_NOTICE & ~E_DEPRECATED” (in both dmsDefaults.php __and__ php.ini) will do the trick.