Moved Site Now It Doesn't Work

I moved my site from one hosting company to another - Godaddy to justhost - a long time ago and could swear I just copied the site over and did some minor permissions stuff and reattached the DB.

Now I want to move it to my local home server running CentOS.

When I go to the url http: mylocalserverIP/site/ or something that should work it says

The requested URL /house/index was not found on this server.

which is strange because I can go to http: mylocalserverip and get some of the main page (mainly the css and soe of the body of the page) but with a message in the middle that says: Error 500 Trying to get property of non-object

Ideas where to look? I really know nothing about Yii, someone built this site for me.

The first problem may be related to your .htaccess file (assuming you’re using Apache). Feel free to post the content of that here.

The 500 error could be because PHPs error reporting level is different on your local machine that it was on the previous server. You may be seeing errors that were previously silently swallowed.

To test that, you could add the following near the top of your www/index.php file:


Adding error_reporting(0); worked to clean up that error on the main page. I just need to get the rest going- thanks for that tip.

I was thinking .htaccess too - I deleted it :) Still the same situation. I don’t know enough about .htaccess files to know if I even need one in there, so I took it out.

You’ll need the .htaccess file to hide index.php from the URLs.

See if you can access one of the pages using this format:


Judging by your error, try this one:


Man - that did the trick. What should be in the .htaccess file? The one I restored from the hosted site looks like this:

DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.plx index.ppl index.cgi index.jsp index.js index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html

For security reasons, Option followsymlinks cannot be overridden.

#Options +FollowSymLinks All

For security reasons, Option all cannot be overridden.

#Options +SymLinksIfOwnerMatch All

Options SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC Indexes

IndexIgnore /

RewriteEngine on

if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

otherwise forward it to index.php

RewriteRule . index.php

Firstly, make sure mod_rewrite is enabled. This command assumes that your system works the same as Ubuntu:

sudo a2enmod rewrite

You may or may not need to restart Apache after that. Again, on Ubuntu:

sudo service apache2 restart

Once you’ve done that, try to use the original .htaccess file again.

DONE! Thanks. I had to edit the httpd.conf file.

I really wish I was starting out programming or in some way in need of this forum on a regular basis. This is by far the best forum I have ever posted in. I’ve been on the systems side of IT for nearly 20 years. Most of the support forums are somewhat of a joke. By that I mean you can wait days for help from someone.

One other thing that is superior too is how easy to navigate the forum is too! Many of the forums I belong to it is very hard to find the posts you have created so you can go back and find them again. The VMWare forum is one if these, it was so bad I stopped using it in favor of just calling support :) Maybe it has gotten better…

Anyway - thanks again to all who make this forum so good! Maybe a career change is in my future just so I can use this forum more often


Glad to help :)