登录在localhost中工作,但登录不能远程yii工作

时间:2015-12-24 07:30:15

标签: php yii

我可以登录localhost但是当我将文件移动到服务器时它无法正常工作我尝试登录服务器但它无法正常工作但是当我尝试在本地登录工作时,是否有任何解决方案?这是我的配置文件看看:

<?php

Yii::setPathOfAlias('chartjs', dirname(__FILE__) . '/../extensions/yii-chartjs');
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'HireRedson',
    'preload' => array('log', 'chartjs'),
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.components.fb.*',
        'application.components.twitteroauth.*',
        'application.components.linkedin.*',
        'application.components.linkedin-new.*',
        'application.components.plaxoauth.*',
        'application.components.gplus.*',
        'application.components.imageresize.*',
        'application.controllers.*',
        'application.components.yiinfinite.*',
        'application.modules.digitalinterviews.models.*',
    ),
    'modules' => array(
        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => '123456',
            'ipFilters' => array('192.168.2.*'),
        ),
        'digitalinterviews' => array(),
    ),
    'components' => array(
        'chartjs' => array('class' => 'chartjs.components.ChartJs',),
        'Smtpmail' => array(
            'class' => 'application.extensions.smtpmail.PHPMailer',
            'Host' => "smtp.gmail.com",
            'Username' => 'dasdadsadsa@gmail.com',
            'Password' => 'dasdasdsad',
            'Mailer' => 'smtp',
            'Port' => 465,
            'SMTPAuth' => true,
            'SMTPSecure' => 'ssl',
        ),
        'mailNew' => array(
            'class' => 'YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.sendgrid.net',
                'username' => 'test@nouvohire.com/jobsite/',
                'password' => '',
                'port' => 2525,
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),
        'mail' => array(
            'class' => 'YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.sendgrid.net',
                'username' => 'test@nouvohire.com/',
                'password' => '',
                'port' => 2525,
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),
        'campaignmail' => array(
            'class' => 'YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.sendgrid.net',
                'username' => 'test@dsfsdfdsfds.com',
                'password' => 'ssssssss',
                'port' => 2525,
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),
        'user' => array(
            'allowAutoLogin' => true,
        ),
        'session' => array(
            'autoStart' => true,
            'savePath' => 'sessions',
            'cookieMode' => 'allow',
            'cookieParams' => array(
                'path' => '/',
                'domain' => '.nouvohire.com/jobsite/',
                'httpOnly' => false,
            ),
        ),
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'caseSensitive' => false,
            'rules' => array(
                'test_url/<test_url:\w+>' => 'digitalinterviews/recruitment/globalinterviewstart/', //############for interview master
                'digitalinterviews/<controller:\w+>/<action:\w+>/<id:\d+>' => 'digitalinterviews/<controller>/<action>', //########for interview master
                'digitalinterviews/<controller:\w+>/<action:\w+>' => 'digitalinterviews/<controller>/<action>',
                '' => 'site/index',
                'r/<id:\d+>' => 'Jobs/Redirect',
                'j/<id:\d+>' => 'Jobpage/Redirect',
                'app/<id:\d+>' => 'App/Index',
                'site/feed/<site:\w+>' => 'Site/Feed',
                'maintenance.html' => 'site/UnderMaintenance',
                'digitalinterviews/Test/scriptcam.lic' => 'digitalinterviews/invitecandidates/getLicense/',
                'digitalinterviews/questions/Add_question/scriptcam.lic' => 'digitalinterviews/invitecandidates/getLicense/',
                'digitalinterviews/recruitment/testWebcam/scriptcam.lic' => 'digitalinterviews/invitecandidates/getLicense/',
                'digitalinterviews/Candidatetest/onlinetest/scriptcam.lic' => 'digitalinterviews/invitecandidates/getLicense/',
                'digitalinterviews/questions/editQuestion/scriptcam.lic' => 'digitalinterviews/invitecandidates/getLicense/',
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            ),
        ),
        'db' => array(
            'connectionString' => 'mysql:host=test.com;dbname=testdb',
            'emulatePrepare' => true,
            'username' => 'teeee',
            'password' => 'asdasdsadsadsadsa',
            'charset' => 'utf8',
        ),
        'authManager' => array(
            'class' => 'CDbAuthManager',
            'connectionID' => 'db',
        ),
        'errorHandler' => array(
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            ),
        ),
        'ePdf' => array(
            'class' => 'ext.yii-pdf.EYiiPdf',
            'params' => array(
                'mpdf' => array(
                    'librarySourcePath' => 'application.vendors.mpdf.*',
                    'constants' => array(
                        '_MPDF_TEMP_PATH' => Yii::getPathOfAlias('application.runtime'),
                    ),
                    'class' => 'mpdf',
                ),
                'HTML2PDF' => array(
                    'librarySourcePath' => 'application.vendors.html2pdf.*',
                    'classFile' => 'html2pdf.class.php',
                )
            ),
        ),
        's3' => array(
            'class' => 'application.extensions.s3.ES3',
            'aKey' => 'asdsdssf',
            'sKey' => 'djdssadjajsdjksadjsahdkksajdjask',
        ),
        'file' => array(
            'class' => 'application.extensions.file.CFile',
        ),
        'functions' => array(
            'class' => 'application.extensions.s3.Functions',
        ),
    ),
);

2 个答案:

答案 0 :(得分:0)

这可能是权限问题,请检查确定/资产,/ protected / runtime 是否具有用户的写入权限

答案 1 :(得分:-1)

也许检查一下:

  • 该数据库是否存在于远程服务器中?

  • 您尝试通过数据库配置连接的用户是否具有选择权限?

  • 您尝试登录的用户是否存在于远程数据库上?