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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:23:53+00:00 2026-05-12T08:23:53+00:00

How can I get PDO to work on my mac (os x 10.5)? I’m

  • 0

How can I get PDO to work on my mac (os x 10.5)? I’m using the built in php and php in Zend/Eclipse. Can’t seem to find useful drivers for it at all.

  • 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-12T08:23:53+00:00Added an answer on May 12, 2026 at 8:23 am

    I had to install the PDO_PGSQL driver recently on Leopard, and I ran across a multitude of problems. In my search for answers, I stumbled across this question. Now I have it successfully installed, and so, even though this question is quite old, I hope that what I’ve found can help others (like myself) who will undoubtedly run into similar problems.

    The first thing you’ll need to do is install PEAR, if you haven’t done so already, since it doesn’t come installed on Leopard by default.

    Once you do that, use the PECL installer to download the PDO_PGSQL package:

    $ pecl download pdo_pgsql
    $ tar xzf PDO_PGSQL-1.0.2.tgz
    

    (Note: you may have to run pecl as the superuser, i.e. sudo pecl.)

    After that, since the PECL installer can’t install the extension directly, you’ll need to build and install it yourself:

    $ cd PDO_PGSQL-1.0.2
    $ phpize
    $ ./configure --with-pdo-pgsql=/path/to/your/PostgreSQL/installation
    $ make && sudo make install
    

    If all goes well, you should have a file called “pdo_pgsql.so” sitting in a directory that should look something like “/usr/lib/php/extensions/no-debug-non-zts-20060613/” (the PECL installation should have outputted the directory it installed the extension to).

    To finalize the installation, you’ll need to edit your php.ini file. Find the section labeled “Dynamic Extensions”, and underneath the list of (probably commented out) extensions, add this line:

    extension=pdo_pgsql.so
    

    Now, assuming this is the first time you’ve installed PHP extensions, there are two additional steps you need to take in order to get this working. First, in php.ini, find the extension_dir directive (under “Paths and Directories”), and change it to the directory that the pdo_pgsql.so file was installed in. For example, my extension_dir directive looks like:

    extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613"
    

    The second step, if you’re on a 64-bit Intel Mac, involves making Apache run in 32-bit mode. (If there’s a better strategy, I’d like to know, but for now, this is the best I could find.) In order to do this, edit the property list file located at /System/Library/LaunchDaemons/org.apache.httpd.plist. Find these two lines:

    <key>ProgramArguments</key>
    <array>
    

    Under them, add these three lines:

    <string>arch</string>
    <string>-arch</string>
    <string>i386</string>
    

    Now, just restart Apache, and PDO_PGSQL will be up and running.

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

Sidebar

Related Questions

How come I can't get mysql_real_escape_string to work when using PDO? I keep getting
I'm already using http://php.net/pdo so I can get whatever I want from the user
I am trying to add the PDO drivers so I can work with MSSQL
I can't seem to get this code to work. Can you run another query
I can't seem to get this query to work. Here is the contents of
How do I get PDO to work on WAMP with PHP 5.4? I have
I can get this to work: [<DllImport(user32.dll)>] extern bool GetClientRect(nativeint, RECT*) let getClientRect hwnd
You can get a list of databases using PRAGMA database_list or a list of
I have a web application using PHP and PDO with SQLSRV prepared statements to
I have a problem in a php script where I am using PDO to

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.