Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6738421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:22:00+00:00 2026-05-26T11:22:00+00:00

I am getting the below error below when I run my custom yiic command

  • 0

I am getting the below error below when I run my custom yiic command in the terminal.

I can’t seem to track down the cause of this error, can anyone point me in the right direction. I know the DB is working fine as other parts of the app work.

<?php

    class RbacCommand extends CConsoleCommand
    {
        private $_authManager;

        public function getHelp()
        {
            return "<<<EOD

            USAGE
                rbac

            DESCRIPTION
                This command generates an initial RBAC authorization hierarchy.

            EOD";
        }

        public function run($args)
        {
            if(($this->_authManager=Yii::app()->authManager)===null)
            {
                echo "Error: an authorization manager, named 'authManager' must be configured to use this command.\n";
                echo "If you already added 'authManager' component in applicaton configuration,\n";
                echo "please quit and re-enter the yiic shell.\n";
                return;
            }

            echo "This command will create three roles: Owner, Member, and Reader and the following permissions:\n";
            echo "create, read, update and delete user\n";
            echo "create, read, update and delete project\n";
            echo "create, read, update and delete issue\n";
            echo "Would you like to continue? [Yes|No]";

            if(!strncasecmp(trim(fgets(STDIN)),'y',1))
            {
                $this->_authManager->clearAll();

                $this->_authManager->createOperation("createUser","create a new user");
                $this->_authManager->createOperation("readUser","read user profile information");
                $this->_authManager->createOperation("updateUser","update a users information");
                $this->_authManager->createOperation("deleteUser","remove a user from a project");

                $this->_authManager->createOperation("createProject","create a new project");
                $this->_authManager->createOperation("readProject","read project information");
                $this->_authManager->createOperation("updateProject","update project information");
                $this->_authManager->createOperation("deleteProject","delete a project");

                $this->_authManager->createOperation("createIssue","create a new issue");
                $this->_authManager->createOperation("readIssue","read issue information");
                $this->_authManager->createOperation("updateIssue","update issue information");
                $this->_authManager->createOperation("deleteIssue","delete a issue");

                $role=$this->_authManager->createRole("member");
                $role->addChild("reader");
                $role->addChild("createIssue");
                $role->addChild("updateIssue");
                $role->addChild("deleteIssue");

                $role=$this->_authManager->createRole("owner");
                $role->addChild("reader");
                $role->addChild("member");
                $role->addChild("createUser");
                $role->addChild("updateUser");
                $role->addChild("deleteUser");
                $role->addChild("createProject");
                $role->addChild("updateProject");
                $role->addChild("deleteProject");
            }
        }
    }

?>



users-MacBook-Air:protected user$ ./yiic shell ../index.php
Yii Interactive Tool v1.1 (based on Yii v1.1.2)
Please type 'help' for help. Type 'exit' to quit.
>> rbac

Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Users/user/Dropbox/localhost/yii/framework/db/CDbConnection.php on line 302
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or directory' in /Users/user/Dropbox/localhost/yii/framework/db/CDbConnection.php:267
Stack trace:
#0 /Users/user/Dropbox/localhost/yii/framework/db/CDbConnection.php(242): CDbConnection->open()
#1 /Users/user/Dropbox/localhost/yii/framework/db/CDbConnection.php(221): CDbConnection->setActive(true)
#2 /Users/user/Dropbox/localhost/yii/framework/base/CModule.php(363): CDbConnection->init()
#3 /Users/user/Dropbox/localhost/yii/framework/web/auth/CDbAuthManager.php(570): CModule->getComponent('db')
#4 /Users/user/Dropbox/localhost/yii/framework/web/auth/CDbAuthManager.php(69): CDbAuthManager->getDbConnection()
#5 /Users/user/Dropbox/localhost/yii/framework/base/CModule.php(363): CDbAuthManager->init()
#6 /Users/user/Dropbox/localhost/yii/framework/base/CModule.php(86): CModule->getComponent('authManager')
#7 /Users/user/Dropbox/localhost/trackstar/protected/commands/shell/RbacCommand.php(22): CModule->__get('authManager')
#8 /Users/user/Dropbox/localhost/yii/framework/cli/commands/ShellCommand.php(144): RbacCommand->run(Array)
#9 /Users/user/Dropbox/localhost/yii/framework/cli/commands/ShellCommand.php(99): ShellCommand->runShell()
#10 /Users/user/Dropbox/localhost/yii/framework/console/CConsoleCommandRunner.php(62): ShellCommand->run(Array)
#11 /Users/user/Dropbox/localhost/yii/framework/console/CConsoleApplication.php(88): CConsoleCommandRunner->run(Array)
#12 /Users/user/Dropbox/localhost/yii/framework/base/CApplication.php(135): CConsoleApplication->processRequest()
#13 /Users/user/Dropbox/localhost/yii/framework/yiic.php(33): CApplication->run()
#14 /Users/user/Dropbox/localhost/trackstar/protected/yiic.php(7): require_once('/Users/user/Dro...')
#15 /Users/user/Dropbox/localhost/trackstar/protected/yiic(4): require_once('/Users/user/Dro...')
#16 {main}
>> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:22:01+00:00Added an answer on May 26, 2026 at 11:22 am

    Try:

    Change localhost to 127.0.0.1 in your connection string.

    OR:

    Add unix_socket=/path/to/socket in your connection string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the error below everytime I run a mysql or mysqladmin command -
I'm getting the error below for this SQL statement in VB.Net 'Fill in the
I was changing the vc++ include directory with new paths suddenly getting below error
I am getting the below error when executing my application on a Windows XP
i'm getting the below error, When compiling the Asp.Net web deploy project Could not
I am getting the error below when I call my WCF service. What am
We are getting the error below calling c:\windows\syswow64\regsvr32.exe on Windows Server 2008 R2 x64.
I'm trying to build a java application with gcj but getting the error below.
I'm getting the following error on the line of code below: Syntax error (missing
i'm getting exception on Transformer transformer = tFactory.newTransformer(StreamXSL); but the error below is not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.