Results 1 to 3 of 3

Thread: PHP and ASE 12?

  1. #1
    Join Date
    Dec 2002
    Posts
    6

    Unanswered: PHP and ASE 12?

    Hi

    I need some help setting up php to retrieve data from an ASE 12 server, and I saw that some of the forum members had some experience in using sybase/php.

    The database in question is installed on a different server than our webserver (both servers are sun os, and the webserver uses apache and php). As I understand this shouldn't be to hard when php and ase is running on the same server, but I haven't been able to find any documentation on how to run php from a different server.

    Do I need any librarys/drivers on the webserver? In that case, where can I get them?

    When compiling php, I'm supposed to include support for sybase:

    --with-sybase-ct=[DIR]

    But what do I put as [DIR]? The db is after all on different server

    How do I adress the server when connecting from php?

    I'll be very grateful for any help here!

    audun

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    You have to install the Sybase CT libs on the web machine. On linux, there is a separate package called 'sybase-common' which is all you need to install on a linux web server. I suspect something like that exists for Solaris.

    Werever you unpack Sybase-Common to is where the with-sybase-ct path goes. Again on Linux it is /opt/sybase-12.5.

    It will place an empty interfaces file there, and in your sybase_connect (I recommend sybase_pconnect since connections take a noticeable amount of time) function you use the interfaces file server name.

    For example:
    Code:
    <interfaces>
    fanhome
      master tcp ether 192.168.1.7 5000
      query tcp ether 192.168.1.7 5000
    PHP Code:
    <somefile.php>
    <?php

    $con 
    sybase_connect'fanhome''webuser''webpassword' );
    ?>
    Thanks,

    Matt

  3. #3
    Join Date
    Dec 2002
    Posts
    6

    :)

    [SIZE=1]Originally posted by MattR
    You have to install the Sybase CT libs on the web machine. On linux, there is a separate package called 'sybase-common' which is all you need to install on a linux web server. I suspect something like that exists for Solaris.
    Have to wait for my sysadm to get back from his christmas holiday to locate this stuff..

    But apart from my sysadms absence, this seems to be all I need. Thanks a lot!

Posting Permissions

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