More PHP errors after upgrade to trunk



  • Update: On Tom’s recommendation I blew away /var/www/fog and /var/www/html and reran the installer and all is well.

    Going from Github 7254 to 8140.

    Previously while upgrading to 7254 I had issues which Tom helped me resolve.

    Currently, when I run the installfog script, I get to the part where I need to do the database update. Apache returns 500, and tailing the error log file shows an unending stream of errors:

    [Thu Jun 16 13:59:56.565405 2016] [:error] [pid 4925] [client 172.16.0.215:57046] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.586163 2016] [:error] [pid 5158] [client 172.16.0.117:56988] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.589868 2016] [:error] [pid 5095] [client 172.16.0.215:57047] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/management/index.php(2): require('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.593972 2016] [:error] [pid 5055] [client 172.16.0.246:63319] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.613829 2016] [:error] [pid 5081] [client 172.16.0.246:63320] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/management/index.php(2): require('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.638648 2016] [:error] [pid 5158] [client 172.16.0.95:59207] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.639778 2016] [:error] [pid 5118] [client 172.16.0.117:56989] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.668276 2016] [:error] [pid 5081] [client 172.16.0.95:59208] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.693870 2016] [:error] [pid 5096] [client 172.16.0.117:56990] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    [Thu Jun 16 13:59:56.700321 2016] [:error] [pid 5055] [client 172.16.0.95:59209] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/service/servicemodule-active.php(2): require_once('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    

    This entry is specifically from me accessing the page http://fog.domain.com/fog/management for the update:

    [Thu Jun 16 14:00:37.408236 2016] [:error] [pid 5118] [client 172.16.7.34:65250] PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/html/fog/lib/fog/fogcore.class.php:87\nStack trace:\n#0 /var/www/fog/commons/init.php(132): FOGCore::setSessionEnv()\n#1 /var/www/fog/commons/base.inc.php(9): require_once('/var/www/fog/co...')\n#2 /var/www/fog/management/index.php(2): require('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/html/fog/lib/fog/fogcore.class.php on line 87
    

    I did run updates on by Ubuntu server before trying to upgrade FOG, however in the past month I attempted this without doing an update to Ubuntu beforehand and encountered the same issues, however I rolled back my VM snapshot because I didn’t have time to troubleshoot then.



  • @Tom-Elliott Man, it’s always just that easy.

    Muchas gracias.


  • Senior Developer

    @apathetic_admin do me (and yourself) a favor.

    If you have any special files in your fog web folder, make a backup somewhere else.

    Delete /var/www/fog and /var/www/html/fog

    Rerun the installer. Your error should go away.



  •        $_SESSION['PluginsInstalled'] = (array)$this->getActivePlugins();
    

  • Senior Developer

    What do you see in the file on line 87?

    Specifically: /var/www/html/fog/lib/fog/fogcore.class.php on line number 87


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.