We have got the latest PHP version on Hostsharing, and Knowledge Tree 3.7.0.2 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:

error_reporting(0);

Now Knowledge Tree 3.7.0.2 will work again, and hopefully the next version of Knowledge Tree will have fixed all the deprecated PHP things.
Knowledge Tree and PHP 5.3.3
Tagged on:     

7 thoughts on “Knowledge Tree and PHP 5.3.3

  • March 14, 2011 at 11:45 pm
    Permalink

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

    How did you find out?

    Saludos

    Mario

    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. 🙂

  • April 16, 2012 at 1:31 pm
    Permalink

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

    myknowledgetreesite/control.php

    I get a blank screen 🙁

    Can you advise? Thanks!

  • April 16, 2012 at 1:44 pm
    Permalink

    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 17, 2012 at 4:19 pm
    Permalink

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

    error_reporting(0);

    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 17, 2012 at 8:44 pm
    Permalink

    You can also try to use error_reporting(E_ERROR);
    see also http://php.net/manual/en/function.error-reporting.php 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: http://forums.knowledgetree.org/viewtopic.php?f=3&t=20951

    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 5, 2012 at 8:56 am
    Permalink

    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.

    davide

Comments are closed.