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 7876229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:08:08+00:00 2026-06-03T03:08:08+00:00

I baked an application using console and from URL everything seems ok. But when

  • 0

I baked an application using console and from URL everything seems ok. But when i want to bake a model inside the application folder, I get an error:

        Error: Database connection "Mysql" is missing, or could not be created.
        #0 /opt/lampp/cake/lib/Cake/Model/ConnectionManager.php(98): DboSource->__construct(Array)
        #1 /opt/lampp/cake/lib/Cake/Console/Command/Task/ModelTask.php(837): ConnectionManager::getDataSource('default')
        #2 /opt/lampp/cake/lib/Cake/Console/Command/Task/ModelTask.php(782): ModelTask->getAllTables(NULL)
        #3 /opt/lampp/cake/lib/Cake/Console/Command/Task/ModelTask.php(863): ModelTask->listAll(NULL)
        #4 /opt/lampp/cake/lib/Cake/Console/Command/Task/ModelTask.php(186): ModelTask->getName()
        #5 /opt/lampp/cake/lib/Cake/Console/Command/Task/ModelTask.php(84): ModelTask->_interactive()
        #6 /opt/lampp/cake/lib/Cake/Console/Command/BakeShell.php(102): ModelTask->execute()
        #7 /opt/lampp/cake/lib/Cake/Console/Shell.php(375): BakeShell->main()
        #8 /opt/lampp/cake/lib/Cake/Console/ShellDispatcher.php(177): Shell->runCommand(NULL, Array)
        #9 /opt/lampp/cake/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
        #10 /opt/lampp/cake/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
        #11 {main}

This is what I have in my opt/lampp/htdocs/cakapp/Confg/database.php

 <?php
    class DATABASE_CONFIG {

        public $default = array(
            'datasource' => 'Database/Mysql',
            'persistent' => false,
            'host' => '127.0.0.1',
            'login' => 'root',
            'password' => 'alpha',
            'database' => 'cakedb',
        );
    }

my php –ini return:

        Configuration File (php.ini) Path: /etc/php5/cli
        Loaded Configuration File:         /etc/php5/cli/php.ini
        Scan for additional .ini files in: /etc/php5/cli/conf.d
       Additional .ini files parsed:      /etc/php5/cli/conf.d/pdo.ini

while phpinfo() give me this path:

        Configuration File (php.ini) Path: /opt/lampp/etc
        Loaded Configuration File :/opt/lampp/etc/php.ini 

Isnt there a contradiction in the above two outputs? I mean php –ini is supposed to outputting the php.ini of the xampp not the other one, how can i make it point at the xampp’s php.ini? I tried to change it by changing .bashrc with this line, no help ofcourse

 export PATH=/opt/lampp/bin:$PATH

I tried to add this line to the database.configuration file:
‘port’ => ‘/opt/lampp/var/mysql/mysql.sock’
But it didnt help.

I did find some similar problems but they are either for windows for mac osx nothing for ubuntu.

  • 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-06-03T03:08:10+00:00Added an answer on June 3, 2026 at 3:08 am

    You need to enable the pdo_mysql extension, it might be already enabled for your web environment, but ubuntu separates the php.ini configuration for cli and web.

    So, you just need to enable the extension for cli

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

Sidebar

Related Questions

I am planning to write a Swing-based application (using Netbeans 6.8). It seems that
I want to code a VC++ 9 based console application which downloads an image
I have simple console application project for live video streaming using cross-platform libs on
We're building a commandline application that needs some data from the IIS server using
If we are writing about power-wise option - is using a console-based application in
I have a long-running console-based application Sender that sends simple text to STDOUT using
I have a long-running console-based application Sender that sends simple text to STDOUT using
I'm implementing a web - based application using silverlight with an SQL Server DB
I have a Java based web-application using Java Server Faces and Facelets. I am
I am working on an Location Based Application. In this application I am using

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.