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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:40:34+00:00 2026-05-25T01:40:34+00:00

I am trying to connect to a postgreSQL db with the following code. <?php

  • 0

I am trying to connect to a postgreSQL db with the following code.

<?php
    error_reporting(-1);
    $dbh = new PDO('pgsql:dbname=southpark;host=localhost', 'jaseem' , 'DBPassword');
    var_dump( $dbh );
?>

It quits with an error message object(PDO)#1 (0) { }

How do i solve this issue ? Where did i go wrong ? Apache ? postgreSQL ? or php ?

  • 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-25T01:40:35+00:00Added an answer on May 25, 2026 at 1:40 am

    That’s not an error – you’re getting a PDO object. If the PDO instantiation failed, it’d thrown an error and not do the var_dump. If there was some other error, you can check $dbh->errorCode() and $dbh->errorInfo() for details.

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

Sidebar

Related Questions

I'm trying to connect to the pop3-server with php. Here is my code: $pop3Server
I am trying to connect Hibernate(3.2.5) with PostgreSQL 8.2., but I am getting following
Im trying to connect from PHP(Zend Framework) code to an aspx Web Service. I
When trying to connect to a web service using the following $client = new
Trying to connect to sql server 2005 with delphi 2010 gives me the following
Trying to connect to a SQL Server 2005 instance remotely but getting the following
I'm trying to connect to a website (source code below) that requires login and
I'm trying to connect on my computer to a PostgreSQL database which is only
I am trying connect to MySQL database from ASP.net code. some my connection is
I'm using JDBC to connect to a PostgreSQL database. We are trying to block

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.