2011-07-01 77 views
0

我已經創建了一個站點與Pyro在我的本地服務器上運行正常。PyroCMS錯誤 - 未定義的屬性

我把它放到臨時服務器上,它在Codeigniter系統中的model.php中引發錯誤。

Severity: Notice 

Message: Undefined property: Pages::$session 

Filename: core/Model.php 

Line Number: 50 

在第50行是

function __get($key) 
{ 
    $CI =& get_instance(); //50 
    return $CI->$key; 
} 

在雖然PHP錯誤日誌,它記錄

Call to a member function set_flashdata() on a non-object in /var/www/vhosts/site/httpdocs/system/pyrocms/modules/modules/models/module_m.php 

調試的完整輸出低於

DEBUG - 2011-07-01 11:19:00 --> Config Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Hooks Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Utf8 Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> UTF-8 Support Enabled 
DEBUG - 2011-07-01 11:19:00 --> URI Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Router Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> File loaded: system/pyrocms/modules/pages/config/routes.php 
DEBUG - 2011-07-01 11:19:00 --> No URI present. Default controller set. 
DEBUG - 2011-07-01 11:19:00 --> Output Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Input Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Global POST and COOKIE data sanitized 
DEBUG - 2011-07-01 11:19:00 --> Language Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Loader Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Config Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Loader Class Initialized 
DEBUG - 2011-07-01 11:19:00 --> Config for dev environment is not found. Trying global config. 
DEBUG - 2011-07-01 11:19:00 --> Config file loaded: system/pyrocms/config/asset.php 
DEBUG - 2011-07-01 11:19:00 --> Config for dev environment is not found. Trying global config. 
DEBUG - 2011-07-01 11:19:00 --> Config file loaded: system/pyrocms/config/language.php 
DEBUG - 2011-07-01 11:19:00 --> Config for dev environment is not found. Trying global config. 
DEBUG - 2011-07-01 11:19:00 --> Config file loaded: system/pyrocms/config/tags.php 
DEBUG - 2011-07-01 11:19:00 --> Helper loaded: debug_helper 
DEBUG - 2011-07-01 11:19:00 --> Helper loaded: url_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: form_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: text_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: string_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: language_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: asset_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: pagination_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: array_helper 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: gravatar_helper 
DEBUG - 2011-07-01 11:19:01 --> File loaded: system/pyrocms/modules/comments/helpers/comments_helper.php 
DEBUG - 2011-07-01 11:19:01 --> File loaded: system/pyrocms/modules/modules/helpers/module_helper.php 
DEBUG - 2011-07-01 11:19:01 --> File loaded: system/pyrocms/modules/users/helpers/user_helper.php 
DEBUG - 2011-07-01 11:19:01 --> Language file loaded: language/english/main_lang.php 
DEBUG - 2011-07-01 11:19:01 --> Language file loaded: language/english/errors_lang.php 
DEBUG - 2011-07-01 11:19:01 --> File loaded: system/pyrocms/modules/users/language/english/user_lang.php 
DEBUG - 2011-07-01 11:19:01 --> Database config for dev environment is not found. Trying global config. 
DEBUG - 2011-07-01 11:19:01 --> Database Driver Class Initialized 
DEBUG - 2011-07-01 11:19:01 --> Model Class Initialized 
DEBUG - 2011-07-01 11:19:01 --> Helper loaded: inflector_helper 
DEBUG - 2011-07-01 11:19:01 --> File loaded: system/pyrocms/modules/modules/models/module_m.php 
DEBUG - 2011-07-01 11:19:01 --> Model Class Initialized 
DEBUG - 2011-07-01 11:19:01 --> File loaded: system/pyrocms/modules/modules/helpers/module_helper.php 
ERROR - 2011-07-01 11:19:01 --> Severity: Notice --> unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 167 of 1315 bytes /var/www/vhosts/site_here/httpdocs/system/pyrocms/modules/modules/models/module_m.php 191 
ERROR - 2011-07-01 11:19:01 --> Severity: Notice --> Undefined property: Pages::$session /var/www/vhosts/site_here/httpdocs/system/codeigniter/core/Model.php 50 

我不知道這是否是服務器上的配置問題,但是這些是我沒有改變的核心文件。

任何想法?

Ta。

回答

0

看起來像一個PyroCMS bug在一些早期版本,應該已經被修復。升級也許?

編輯︰錯誤發生,因爲會話變量不知何故未被設置。我會尋找本地服務器和登臺服務器上的application/config/config.phpapplication/config/autoload.php文件之間的區別:它們必須以某種方式以不同方式處理會話設置。

+0

我在1.2(不是測試版):(謝謝 – Paul

+0

啊:這個bug被標記爲1.2.0,那裏有一些評論,有些人仍然看到它?有一個1.2.1發佈在https://github.com/pyrocms/pyrocms/tree/release%2Fv1.2.1:試試這個,也許吧。 – Femi

+0

謝謝。我試過升級到這個版本,但它並不可悲。 – Paul