We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Error on local site but not live (Functions.php line 77)

Development and Programming

Angie Herrera's avatar
Angie Herrera
357 posts
8 years ago
Angie Herrera's avatar Angie Herrera

This is really strange but on my local setup, I’m getting the following error on the home page (whereas on the live site, that error isn’t seen at all):

Fatal error: Call to undefined method stdClass::session_id() in /my/path/to/system/expressionengine/libraries/Functions.php on line 77

Here’s what’s on line 77 of Function.php:

$url .= (ee()->session->session_id('user')) ? "/S=".ee()->session->session_id('user')."/" : '';

I’ve tried pulling from the live site to see if that makes a difference (including using the live site’s DB) but nothing changes. I’ve also tried using both PHP 5.5.x and 5.6.x - same issue.

Not sure how to fix. :/

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Hey Angie, do you have any extensions installed that might only be enabled or operating based on the environment? That error looks like some code might be referencing that function prior to the application running, and faking the session object in the process.

       
Angie Herrera's avatar
Angie Herrera
357 posts
8 years ago
Angie Herrera's avatar Angie Herrera

So I’m a dumba$$ - I had the wrong DB in my local environment. <doh!> But your thought definitely lead me down the right path. Thanks!

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

lol no worries, Angie. I’ve never done that before, nope, never! 😉

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.