Fatal Error in Gdn_Session.start();

edited December 2017 in Vanilla 2.5 Help

After transferring to the server:

Fatal Error in Gdn_Session.start();
Call to a member function getPermissions() on null
The error occurred on or near: /home/site/web/site/public_html/library/core/class.session.php

477: }

478:

479: // Load guest permissions if necessary

480: if ($this->UserID == 0) {

481: $guestPermissions = $userModel->getPermissions(0);

482: $this->permissions->setPermissions($guestPermissions->getPermissions());

483: }

484: }

485:

Backtrace:

[/home/site/web/site/public_html/library/core/class.auth.php:59] Gdn_Session->start();

[/home/site/web/site/public_html/bootstrap.php:323] Gdn_Auth->startAuthenticator();

[/home/site/web/site/public_html/index.php:22] PHP::require_once();

Comments

  • I am facing this same issue - did you find a solution?

  • LincLinc Director of Development Detroit Vanilla Staff

    Are you using PHP 5.6 or higher?

    Did you validate the files all copied successfully?

    Did you try clearing the contents of /cache?

  • Yes, I am using PHP 7.0. Once I reset the file permissions, it all worked correctly. Thanks for the response.

        find ${DOCROOT}/public/community -type d -exec chmod 755 {} \;
        find ${DOCROOT}/public/community -type f -exec chmod 644 {} \;
        chmod -R 777 ${DOCROOT}/public/community/conf/
        chmod -R 777 ${DOCROOT}/public/community/uploads/
        chmod -R 777 ${DOCROOT}}/public/community/cache/
    
    Linc
  • Clearing /cache fixed this same error for me (on PHP 7.2).

    dgigprhR_J
  • Hello,

    I have the same error with an upgrade from 2.3.1 to 2.5.1

    Actually, I'd made a rollback with my backup to 2.3.1 because I tried all your propositions :

    • Tutorial to upgrade
    • Clearing Cache
    • Changing file permissions

    But nothing it does :(

    My PHP version is 7.0.28-0ubuntu0.16.04.1

    Could you help me ?
    Thanks

  • php version PHP 7.0.25

  • Am also getting this error: "PHP: syntax error, unexpected '"' in /etc/php.ini on line 1216". Is it a problem within our server?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Yes, the php.ini is the file that is used on the server to configure the php behaviour. You should check if you have access to that file by yourself or otherwise ask your provider for help.


    Bleistivt
Sign In or Register to comment.