Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Unanswered: PSQL, PHP, Windows Server Setup Question

    Hello, I am trying to do some preliminary legwork for a possible upcoming project that would include me connecting to a PSQL DB (Windows version (possibly on another physical server)) from a webserver (again Windows Server) that is running Apache and PHP.

    Is this setup even possible?

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    It's possible. You'll need to use ODBC from PHP to access PSQL. It'll work locally or remotely.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Jan 2009
    Posts
    2
    Thank you for the reply. So, I am thinking that I would install PSQL client on the webserver then reference the pervasive driver using odbc_connect in PHP.

    I started looking for the exact syntax to use to accomplish this and I found this thread: [PHP] odbc_connect always returns error IM002 - Pervasive Community Site

    However, I cannot see the entire post. It seems to chop off the end of the string:

    "$conn=odbc_connect("Driver={Pervasive ODBC Client Interface};ServerName"

    What is the rest of the connection string?

  4. #4
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    The line in one of my posts was:
    Code:
    $connect = odbc_connect('Driver={Pervasive ODBC Client Interface};ServerName=server_name;ServerDSN=Server_Engine_DSN_name;', 'username', 'password')
    I was able to copy it even though it wasn't displayed.


    You can always just create a Client DSN on the webserver and use that instead of the connection string.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •