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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:32:23+00:00 2026-06-05T02:32:23+00:00

my zend application uses multiple database connections, so i used the multidb resource to

  • 0

my zend application uses multiple database connections, so i used the multidb resource to configure several connections in the application.ini file.

now i want to store the application sessions into the database, using Zend_Session_SaveHandler_DbTable, but i can’t find a way to specify which of those connections to use in order to access the database.

every examples i found on the net uses the db resource and relies on the default database adapter. unfortunately, the sessions have to be stored in a database which is not the default one…

how do i specify which db to use for storing session ?

  • 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-05T02:32:25+00:00Added an answer on June 5, 2026 at 2:32 am

    although it is not specified in the Zend documentation, the constructor for the Zend_Session_SaveHandler_DbTable class accepts a parameter named db which specifies the database connection to use.

    $db = $this->getPluginResource('multidb')->getDb('zend');
    $config = array(
        'db'             => $db,
        'name'           => 'session',
        'primary'        => 'id',
        'modifiedColumn' => 'modified',
        'dataColumn'     => 'data',
        'lifetimeColumn' => 'lifetime'
    );
    Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));
    Zend_Session::start();
    

    i was not able to specfy those settings in the application.iniconfiguration file, though…

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

Sidebar

Related Questions

I'd like to comment some lines in my Zend application.ini file. Is it possible
I'm trying to add a css file in my zend application layout.php the problem
I set up a Zend Framework application using Zend_Tool, but I wanted multiple modules
I want to write a php application using Zend Framework 2 (just the beta
I am testing a Zend application using PHPUnit. From time to time, I want
I am developping a Zend application. The data in my database is encoded in
I have build a web application in Zend Framework and now desperately need a
The SQL query in my web application(PHP/MySQL + Zend) uses a number of parameters
I have a PHP application that has grown in size. The database used to
I have an Zend–based application that uses long polling. Basically it makes a HTTP

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.