I copied all files from my computer to the serwer "test server" and my "client server". On my "test serwer it working correctly" but on the client serwer o got error. (servers are not on the same hosing company)
I guess that something is wrong with client’s server configuration?
Where should I set chmod 777?
What may be the reason of the error?
Opis
Undefined variable: model
Plik źródłowy
/home/***/public_html/portal/cms/protected/controllers/NewsController.php(317)
00305: ));
00306: }
00307:
00308: /**
00309: * Returns the data model based on the primary key given in the GET variable.
00310: * If the data model is not found, an HTTP exception will be raised.
00311: * @param integer the ID of the model to be loaded
00312: */
00313: public function loadModel($id)
00314: {
00315: $session = new CHttpSession();
00316: $session->open();
00317: if ($model === null)
00318: {
00319: if (isset($id))
00320: $model = News::model()->with('cat', 'langText')->find(
00321: array('select' => '*',
00322: 'condition' => 'isActive=1 and t.pageID=:pageID and langText.languageID=:langID',
00323: 'params' => array(':pageID' => (int)$id,
00324: ':langID' => $session['language'])));
00325: if ($model === null)
00326: throw new CHttpException(404,
00327: 'The requested page does not exist.');
00328: }
00329:
Stack Trace
#0 /home/***/public_html/portal/cms/protected/controllers/NewsController.php(53): NewsController->loadModel()
#1 unknown(0): NewsController->actionView()
#2 /home/***/public_html/portal/framework/web/actions/CInlineAction.php(47): ReflectionMethod->invokeArgs()
#3 /home/***/public_html/portal/framework/web/CController.php(300): CInlineAction->run()
#4 /home/***/public_html/portal/framework/web/filters/CFilterChain.php(133): NewsController->runAction()
#5 /home/***/public_html/portal/framework/web/filters/CFilter.php(41): CFilterChain->run()
#6 /home/***/public_html/portal/framework/web/CController.php(1049): CAccessControlFilter->filter()
#7 /home/***/public_html/portal/framework/web/filters/CInlineFilter.php(59): NewsController->filterAccessControl()
#8 /home/***/public_html/portal/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()
#9 /home/***/public_html/portal/framework/web/CController.php(283): CFilterChain->run()
#10 /home/***/public_html/portal/framework/web/CController.php(257): NewsController->runActionWithFilters()
#11 /home/***/public_html/portal/framework/web/CWebApplication.php(324): NewsController->run()
#12 /home/***/public_html/portal/framework/web/CWebApplication.php(121): CWebApplication->runController()
#13 /home/***/public_html/portal/framework/base/CApplication.php(135): CWebApplication->processRequest()
#14 /home/***/public_html/portal/cms/index.php(15): CWebApplication->run()
Like that you will use the most restrective configuration possible on your development machine, so lot of notice or error you will catch during development.