System generated 404

I am watching the application.log and see a lot of 404 exceptions like this:


[error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "assets/50f795ab/jquery.js".' in /home/kmgadmin/public_html/sites/yii/framework/web/CWebApplication.php:281

I’ve flushed and rebuilt the assets directory and am still getting this.

Make Sure that assets and runtime directories are with the permissions 0777.Since assets directory is created on the runtime.And also do not try to remove or rename the files in assets directory.might be this will resolve your this error.

I have same problem and dont know why?

This never happened to me in other projects, but now, every asset needed to be published is failing, it creates dynamically the subfolders at /assets/, example /assets/91cf4bf1/, but leaves directory empty. Assets and subfolders result with correct 0777 permission, but nothing else occurs.

This is my config file:







return array(

    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',

    'name' => 'Admin Area',

    'preload' => array('log'),

    'import' => array(

        'application.models.*',

        'application.components.*',

        'application.helpers.*',

    ),    

    'modules' => array(

        'admin' => array(

            'modules' => array(

                'ads',                

            )

        ),  

        'gii' => array(

            'class' => 'system.gii.GiiModule',

            'password' => 'XXX',

            'ipFilters' => array('127.0.0.1', '::1'),

        ),

    ),   

   

    'defaultController' => 'admin',

    'homeUrl' => 'admin/default/index',

    

    'onBeginRequest'=>create_function('$event', 'return ob_start("ob_gzhandler");'),

    'onEndRequest'=>create_function('$event', 'return ob_end_flush();'),

   	

    'components' => array(  

        'cache' => array(

            'class' => 'CApcCache'            

        ), 	

        'filecache' => array(

            'class' => 'CFileCache'

        ),                  

        'image' => array(

            'class' => 'application.extensions.image.CImageComponent',            

            'driver' => 'GD',            

            'params' => array('directory' => '/opt/local/bin'),

        ),

        'user' => array(

            'allowAutoLogin' => true,

        ),   

        'db' => array(

            'connectionString' => 'mysql:host=localhost;dbname=XX',

            'username' => 'XX',

            'password' => 'XX',

            'charset' => 'utf8',

            'enableProfiling' => true,

        ),

        'errorHandler' => array(

            'errorAction' => 'admin/default/error',

        ),

        'log' => array(

            'class' => 'CLogRouter',

            'routes' => array(

                array(

                    'class' => 'CFileLogRoute',

                    'levels' => 'error, warning, info, trace',

                ), 

                array(

                    'class'=>'CProfileLogRoute',

                    'levels'=>'profile',

                    'enabled'=>false,

                ),

            ),

        ),

    ),

);



Ii looks like if the server cant copy those files into assets subfolders.

Any hints? Thanks

can you comment below given section in your config file and check…




   'components' => array(  

        'cache' => array(

            'class' => 'CApcCache'            

        ),      

        'filecache' => array(

            'class' => 'CFileCache'

        ), 



Hi, i have already fix my problem, it was caused because of using copy function within CFileHelper having php safe mode active, so main directory can be created but not the rest of files, because i uploaded files directly and UID didn’t match at copy operation.

Trenchard make sure you have php safe mode off, this could be a reason files aren’t being copied.

Good luck