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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:46:46+00:00 2026-05-12T05:46:46+00:00

My app is working from the web side of things. I’d like to get

  • 0

My app is working from the web side of things.

I’d like to get the CLI working so that I can run unit tests and the such

Here’s what I have for a test script:

$pthRoot = dirname(__FILE__);
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/..'));
define('APPLICATION_ENV', 'development');
define('SERVER_ROLE', 'development');

set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library') . PATH_SEPARATOR . realpath($pthRoot . '/../controllers')  
     . PATH_SEPARATOR . get_include_path()  
)));
date_default_timezone_set('America/Toronto'); 

require_once('Zend/Loader/Autoloader.php');  
$autoloader = Zend_Loader_Autoloader::getInstance();

require '../bootstrap.php';

require_once 'Zend/Application.php';
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$_SERVER['SERVER_ROLE'] = 'development';
$bootstrap = $application->getBootstrap();
$bootstrap->runScript();

$db = Zend_Registry::get('db');
$sql = "select * from settings";
print_r($db->fetchAll($sql));

Unfortunately, I get an error at the get(‘db’) line.

PHP Fatal error: Uncaught exception ‘Zend_Db_Adapter_Exception’ with message ‘The mysql driver is not currently installed’

According to phpinfo from the command line, the mysql driver is running. What am I missing?

Thanks in advance.

  • 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-12T05:46:46+00:00Added an answer on May 12, 2026 at 5:46 am

    If you are using a MySQL Adapter with Zend Framework, you have two possibilities (I quote the doc) :

    • MySQL, using the pdo_mysql PHP extension
    • MySQL, using the mysqli PHP extension

    Which one of those are you trying to use ?

    If it’s the first one, is the extension pdo_mysql activated for CLI ?
    (you can use “php -m” to get the list of extensions that are loaded)

    If it’s the second one, is the extension mysqli activated for CLI ?

    It seems none of the two adapter are using the extension mysql (which is quite old) ; so, if this one appears, it’s probably not really relevant.

    With a bit of luck, it’ll just be that “the right extension” is loaded in the php.ini file used for Web, and not in the one used for CLI…

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

Sidebar

Related Questions

I'm working on an app that will provide data from a web server to
I'm working on a GWT app where I'm retrieving a file from a web
I am working on an app that reads the contact names from the mobile
I'm working on an app that downloads meta tags from websites and saves then.
I'm working on an app that needs to accept a RegEx from the user,
I am working on releasing an app that will greatly benefit from using the
I'm working on an app that needs to retrieve some data from a server.
I'm integrating Gigya with a web app running Acegi. I have it working that
I'm working with a Classic ASP web app that typically runs well considering the
I have created an App that gets data from Web Services on an In

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.