Various errors and no site after server move

I copied a site’s web tree to a new server. I am not too familiar with Yii. Should it just work ? I get this in error log

[Sat Apr 09 20:25:20 2011] [error] [client 65.8.163.14] PHP Notice: Undefined property: UApp::$user in /home/domains/www.q.com/www/protected/modules/admin/filters/FAdminMain.php on line 44

[Sat Apr 09 20:25:20 2011] [error] [client 65.8.163.14] PHP Fatal error: Call to a member function checkAccess() on a non-object in /home/domains/www.q.com/www/protected/modules/admin/filters/FAdminMain.php on line 44

Sometimes this is on the screen

Error 500

YiiBase::include(PDO.php) [<a href=‘function.YiiBase-include’>function.YiiBase-include</a>]: failed to open stream: No such file or directory

I changed a few directories to 777

thanks for any insight!

tom friedel

tom@readyink.com

Looks like you don’t have PDO installed on a new server.

Thanks! The hosting company added php-pdo and said I could also move to php 5.3. The error with PDO is not there, but this one still is

[Sat Apr 09 20:25:20 2011] [error] [client 65.8.163.14] PHP Notice: Undefined property: UApp::$user in /home/domains/www.q.com/www/protected/modules/admin/filters/FAdminMain.php on line 44

[Sat Apr 09 20:25:20 2011] [error] [client 65.8.163.14] PHP Fatal error: Call to a member function checkAccess() on a non-object in /home/domains/www.q.com/www/protected/modules/admin/filters/FAdminMain.php on line 44

and the site is not coming up. I have

PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:46)

Copyright © 1997-2006 The PHP Group

Zend Engine v2.1.0, Copyright © 1998-2006 Zend Technologies

thanks again in advance,

tom

Try moving to 5.3. It’s absolutely safe to use it with Yii. Moreover, it’s significantly faster. Officially Yii requires PHP 5.1.0 or above but your specific application may require 5.2 and higher. If it will still not run after updating to 5.3, post FAdminMain.php here.

Also consider installing APC. It’s not related to your problem at all but will improve execution time a lot.

Thank you, it is working now,

tom

Hi Tom, I got the same checkAccess error too when I moved to a new server… can you please tell me how did you fix it? I really need to solve this problem!

Thanks in advance!

I upgraded to php 5.3

Tom