swampone
(Shawnsonnier04)
December 30, 2011, 5:09pm
1
I have multiple domains on a shared host. Each domain is pointed to its own directory. I have the Yii framework in its own directory. I want to be able to use one Yii framework for all the domains, instead of uploading the whole framework for every website. I have uploaded the framework in the Yii directory and the protected etc. for each website to there own directory.
I thought by setting as follows, it would work,but i get: No such file or directory in /home/content/63/59820/html/gradehouse/index.php on line 12
$yii=dirname(__FILE__).'/yii/framework/yii.php';
$config=dirname(__FILE__).'/gradehouse/protected/config/main.php';
Directory Structure
-Yii
-gradehouse
-website2
-website3
–assets
–protected
–css
Hi,
change paths as follows and it should work.
$yii = dirname(__FILE__).'/../Yii/framework/yii.php';
$config = dirname(__FILE__).'/protected/config/main.php';
regards robert
swampone
(Shawnsonnier04)
December 30, 2011, 6:21pm
3
It works thanks!
You would happen to know why im getting 500 internal server error? I have set the permissions in the assets and runtime folders to writable. The only page that is working is the home page. The host clams mod rewrite is enabled, so i believe the problem lies with the .htaccess file or something. If i change the url format in the url manager to ‘get’ most things seem to work but some things require it be set to path.
Do you have any error log files for me?
Sure, htaccess could be possible.
Regards
Robert
swampone
(Shawnsonnier04)
December 30, 2011, 7:49pm
5
Are you talking bout this log?
Stack trace:
#0 /home/content/63/5982063/html/yii/framework/base/CComponent.php(568): CHttpRequest->validateCsrfToken(Object(CEvent))
#1 /home/content/63/5982063/html/yii/framework/base/CApplication.php(182): CComponent->raiseEvent('onBeginRequest', Object(CEvent))
#2 /home/content/63/5982063/html/yii/framework/base/CApplication.php(154): CApplication->onBeginRequest(Object(CEvent))
#3 /home/content/63/5982063/html/gradehouse/index.php(13): CApplication->run()
#4 {main} REQUEST_URI=/
2011/12/30 10:17:15 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'The CSRF token could not be verified.' in /home/content/63/5982063/html/yii/framework/web/CHttpRequest.php:816
Stack trace:
#0 /home/content/63/5982063/html/yii/framework/base/CComponent.php(568): CHttpRequest->validateCsrfToken(Object(CEvent))
#1 /home/content/63/5982063/html/yii/framework/base/CApplication.php(182): CComponent->raiseEvent('onBeginRequest', Object(CEvent))
#2 /home/content/63/5982063/html/yii/framework/base/CApplication.php(154): CApplication->onBeginRequest(Object(CEvent))
#3 /home/content/63/5982063/html/gradehouse/index.php(13): CApplication->run()
#4 {main} REQUEST_URI=/
2011/12/30 10:23:18 [error] [exception.CException] exception 'CException' with message 'CUrlManager.UrlFormat must be either "path" or "get".' in /home/content/63/5982063/html/yii/framework/web/CUrlManager.php:459
Stack trace:
#0 /home/content/63/5982063/html/yii/framework/base/CComponent.php(152): CUrlManager->setUrlFormat('')
#1 /home/content/63/5982063/html/yii/framework/YiiBase.php(214): CComponent->__set('urlFormat', '')
#2 /home/content/63/5982063/html/yii/framework/base/CModule.php(371): YiiBase::createComponent(Array)
#3 /home/content/63/5982063/html/yii/framework/base/CApplication.php(498): CModule->getComponent('urlManager')
#4 /home/content/63/5982063/html/yii/framework/web/CWebApplication.php(120): CApplication->getUrlManager()
#5 /home/content/63/5982063/html/yii/framework/base/CApplication.php(155): CWebApplication->processRequest()
#6 /home/content/63/5982063/html/gradehouse/index.php(13): CApplication->run()
#7 {main} REQUEST_URI=/
2011/12/30 10:26:21 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "imManager".' in /home/content/63/5982063/html/yii/framework/web/CWebApplication.php:332
Stack trace:
#0 /home/content/63/5982063/html/yii/framework/web/CWebApplication.php(121): CWebApplication->runController('imManager')
#1 /home/content/63/5982063/html/yii/framework/base/CApplication.php(155): CWebApplication->processRequest()
#2 /home/content/63/5982063/html/gradehouse/index.php(13): CApplication->run()
#3 {main} REQUEST_URI=/?r=imManager
No your application log is not of interest jet. I need your Apache error log (Linux: tail -f /val/log/apache2/error.log)
Regards Robert