daveyfaherty
daveyfaherty

Reputation: 4613

set_flashdata() triggers a fatal error in PyroCMS

I moved a Pyrocms site to another server. Go to index: blank page.

Turn on errors: get this

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Pages::$session

Filename: core/Model.php

Line Number: 50
Fatal error: Call to a member function set_flashdata() on a non-object in /var/www/vhosts/brokentalkers.com/httpdocs/system/pyrocms/modules/modules/models/module_m.php on line 193

If it sheds any light, I made a tar.gz of the contents of the old httpdocs folder, and extracted it in the new httpdocs folder.

I made a duplicate of the database with an identical user, so config/database.php shouldn't need changing.

Any ideas? Thanks in advance.

Upvotes: 0

Views: 2609

Answers (1)

tpae
tpae

Reputation: 6346

It seems like $session class is not initializing correctly.

  1. Check for default_ci_sessions table, if you are using sessions for database.
  2. Check if the constructor is loading sessions library.
  3. Check if session is in autoload.php config

Upvotes: 2

Related Questions