Install problem with base path?

Hi,

I have a problem with yii after install,

The installation completed successfully and the default page loads.

But when I click on contact or login tabs I get the error below.

I have root access and this is a dev server with CentOS 5.3.

The Directory /assets is there and is writeable.

Any ideas?

Regards,

Keyvan




CException


Description


CAssetManager.basePath "/assets" is invalid. Please make sure the directory exists and is writable by the Web server process.


Source File


/home/2hs/public_html/yii-1.1b.r1504/framework/web/CAssetManager.php(82)


00070:     }

00071: 

00072:     /**

00073:      * Sets the root directory storing published asset files.

00074:      * @param string the root directory storing published asset files

00075:      * @throws CException if the base path is invalid

00076:      */

00077:     public function setBasePath($value)

00078:     {

00079:         if(($basePath=realpath($value))!==false && is_dir($basePath) && is_writable($basePath))

00080:             $this->_basePath=$basePath;

00081:         else

00082:             throw new CException(Yii::t('yii','CAssetManager.basePath "{path}" is invalid. Please make sure the directory exists and is writable by the Web server process.',

00083:                 array('{path}'=>$value)));

00084:     }

00085: 

00086:     /**

00087:      * @return string the base url that the published asset files can be accessed.

00088:      * Note, the ending slashes are stripped off.

00089:      */

00090:     public function getBaseUrl()

00091:     {

00092:         return $this->_baseUrl;

00093:     }

00094: 

Stack Trace


#0 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CAssetManager.php(59): CAssetManager->setBasePath('/assets')

#1 /home/2hs/public_html/yii-1.1b.r1504/framework/base/CModule.php(357): CAssetManager->init()

#2 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CWebApplication.php(169): CModule->getComponent('assetManager')

#3 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CClientScript.php(331): CWebApplication->getAssetManager()

#4 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CClientScript.php(182): CClientScript->getCoreScriptUrl()

#5 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CClientScript.php(112): CClientScript->renderCoreScripts()

#6 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CController.php(318): CClientScript->render('<!DOCTYPE html ...')

#7 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CController.php(649): CController->processOutput('<!DOCTYPE html ...')

#8 /home/2hs/public_html/protected/controllers/SiteController.php(48): CController->render('contact', Array)

#9 /home/2hs/public_html/yii-1.1b.r1504/framework/web/actions/CInlineAction.php(32): SiteController->actionContact()

#10 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CController.php(300): CInlineAction->run()

#11 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CController.php(278): CController->runAction(Object(CInlineAction))

#12 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array)

#13 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CWebApplication.php(320): CController->run('contact')

#14 /home/2hs/public_html/yii-1.1b.r1504/framework/web/CWebApplication.php(120): CWebApplication->runController('site/contact')

#15 /home/2hs/public_html/yii-1.1b.r1504/framework/base/CApplication.php(135): CWebApplication->processRequest()

#16 /home/2hs/public_html/index.php(11): CApplication->run()

#17 {main}

i think your problem is the directory name~

basePath."/assets"

change to

basePath.DIRECTORY_SEPARATOR."assets"

and try it again~

its same my problem,any one can help me?