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

  • Home
  • SEARCH
  • 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 3854132
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:34:36+00:00 2026-05-19T17:34:36+00:00

I have a ini file with db connection settings. I am creating an installer

  • 0

I have a ini file with db connection settings. I am creating an installer and need help to:

  1. test db connection settings in ini file with errors (wrong user/pass or cannot select db)
  2. insert db structure using .sql file.

Is this possible with ZF, I can’t find any info anywhere. Should I just do this using direct queries?

Thanks!

  • 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-19T17:34:36+00:00Added an answer on May 19, 2026 at 5:34 pm

    In your unit test, you could probably call $adapter->getConnect() within a try/catch that checks for a Zend_Db_Adapter_Exception, subclasses of which are thrown on a failed connection. In the catch, you can call $this->fail() to signal the failed test.

    But typically, you would have a different set of db connection params when APPLICATION_ENV = 'testing' than you would for the other APPLICATION_ENV‘s. So in this sense, I am with @jakenoble. It sounds less like a unit testing issue than a deployment issue. As such, some kind of command-line script – even one that uses the same bootstrap as the main app – might be more appropriate.

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

Sidebar

Related Questions

I have a .ini file with sensitive information in my php wab app. I
I have an INI file that I want to read the line DeviceName=PHJ01444-MC35 from
I have created an ini file that installs/creates a SQL Server instance. I am
I have a .ini file with contents of... [template] color1 = 000000 color2 =
I have uncomment the following from the php.ini file ;extension=php_bz2.dll extension=php_curl.dll ;extension=php_dba.dll Also ,I
I have a PHP application that for every request loads 1 ini file, and
I want to turn off PHP's magic quotes. I don't have access to php.ini.
How can I parse tags with no value in an ini file with python
i have a input tag which is non editable, but some times i need
In a project have been involved in I needed to render tables with columns

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.