Page not found error


Tried to find a topic about it, but no luck!!

Can anyone tell me, why my installation doesn’t work? I nives it from one server to another, but it says page not found. I changed the db connection in the config/main file, but with no luck.

The site:

Can anyone help me, very important I Can get my site working again…!

Kind regards


By the way, it is the to Call the yii framework… As you Can see, the error works, but not the normal page…

How can anybody help you when you did not give any information about your setup… says file not found… so first thing would be to check if there is an index.php in the web root directory for that site… works because there is an index.html page in that directory

Hey Mdomba,

Thanks for replying so quickly… Very appreciated!!

Well the answer is: I don’t want to spam the forum with loads of code, and I am a try-it-self-person, who gives up after trying now… I only use the html file, for keeping our users from beeing confused…

Yep, the index.php file is there, and I don’t think the yii framework error would work, if it wasn’t.

And here’s the setup:


// uncomment the following to define a path alias

// Yii::setPathOfAlias('local','/home/www/');

// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(




	// preloading 'log' component


	// autoloading model and component classes





	// application-level parameters that can be accessed

	// using Yii::app()->params['paramName']


	// application components







					'levels'=>'error, warning',





			// enable cookie-based authentication


			// force 403 HTTP error if authentication needed












			'showScriptName' => false,




				'sportsklub/tilmeld' => 'sportsClub/create',




				'sportsfacilitet/tilmeld' => 'sportsFacility/create',






it worked on the other server… Can a wrong database connection make the error? (eventhough I am 99,99% sure it’s right…)

What is the content of index.php?


If you have disabled YII_DEBUG… try to enable it so to get a more descriptive error

The content I have tried to change with / and it gives me the php error, that it can’t find the files… So it must be correct as it is. Also tried to change the base_path in the config file, by removing …, but this gives an Yii error… Argh, hate when it is impossible to find the problem!

It looks like the debugger is active…

// change the following paths if necessary



// remove the following line when in production mode

defined('YII_DEBUG') or define('YII_DEBUG',true);



The main/first site is: protected/views/layouts/main.php is it possible, it can’t find or read this file?

I have read, that one of the problems with moving frameworks is the different PHP settings on the server, but what should be changed? The requirements/index.php only makes a problem about the Memcache, but couldn’t imagine that this could be the problem…?

Try with



Yeah, that’s what I tried, but it makes the php error (you can see the result now)… It seems like it can’t find the first page… But why not?!

How about some session code or so, that is saved in a text og htaccess. file?

In worst case, I have to install a new version an try to integrete the old

Check the documentation for require_once() -

In one of the comments says to check open_basedir for this error…

Here is one similar problem -

He solved it by using getcwd()

Well I get the same problem, it just finds the yii and config file via another path.

But I understand that you are certain about the problem must be found in one of these links/path relations…?

Have you checked the open_basedir value?

Hey again…

I have tried all of it. Also thought I had found the solution, but still not working. I uploaded a new version of yii, and everything works fine. Considering integration the old one into a new, but also a looot of work.

I put in a part of the original Error file and got this message:

I googled it, and told me, that it might have something to do with the URL manager. Can you see anything wrong in the above code?

Otherwise I have to give up, and tried to use the new version, and look forward to days of coding…

Hope you (or anyone else) have the time to look at it.

Only thing with “site” in the above code is ‘defaultController’=>‘site’ (That means that the default controller is SiteController.php)… why do you think the error is in the above code…

You wrote that everything works fine - what works fine?

And that you put part of the original Error file… what part?




  1. I uploaded and installed the 1.1.4 version of Yii in the root of the website: and it all works fine. I moved the older version with the problems to /1.3/ (…

  2. I have implemented to old stuff to the newer version, and am almost there I think… The only problem lies in: that when I use “‘showScriptName’=>false,”, it goes wrong. - true works - false doesn’t

(The most important thing for me is to get my “list” and “show” to work, cause a lot of roots are in Google. And an amateur yii programmer like me, didn’t think it was a problem switching server…)

  1. This brings me to the conlusion that the server can’t find the right files via the URLmanager. But whyyyy… :blink:

  2. I took the error script from the views/system/error.php file:

<?php echo nl2br(CHtml::encode($data['message'])); ?>

For the


you need appropriate .htaccess -

Mdomba, that’s great!! We did not resolve the original problem, but it works again, and I got a newer version as a bonus…

Can I give you some points or so?

At least something is working…

so what is the original problem? there is no more "page not found" as I see…