php and MS-SQL and PostgreSQL (with Apache)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    php and MS-SQL and PostgreSQL (with Apache)

    Hi,
    I have an architectural type question that centers around php.
    We have a website that people hit that uses php to dynamically
    generate
    web pages. We use Apache and php (although we don't have php compiled
    in with apache). Our Unix like server (FreeBSD) that has php (and
    Apache) on it that today communicates with the postgresql database on
    another Unix like server (Linux). I configured the php set of
    libraries with postgresql support in them.

    (Unix server) (Unix server)
    [Apache + PHP ] -----> [ postgresql ]
    -
    -
    - (Win 2003)[color=blue]
    > [ MS SQL 200 ][/color]


    We are adding a Windows server into our system that contains MS-SQL
    2000 on
    it with another database to interact with. My question is to access
    both databases from the php server (freebsd), is it only a matter of
    compiling php with postgresql and mssql support in it or are there
    other things to consider? I know there are different function calls
    for each database type and even a PEAR interface that handles
    different databases with a common interface. I am just looking at my
    configurtion options/possibilities.





    Thanks in advance

    Mike
  • Jochen Daum

    #2
    Re: php and MS-SQL and PostgreSQL (with Apache)

    Hi Mike!

    On 11 Nov 2003 11:13:06 -0800, mikesta@hotmail .com (Mike) wrote:
    [color=blue]
    >Hi,
    >I have an architectural type question that centers around php.
    >We have a website that people hit that uses php to dynamically
    >generate
    >web pages. We use Apache and php (although we don't have php compiled
    >in with apache). Our Unix like server (FreeBSD) that has php (and
    >Apache) on it that today communicates with the postgresql database on
    >another Unix like server (Linux). I configured the php set of
    >libraries with postgresql support in them.
    >
    > (Unix server) (Unix server)
    > [Apache + PHP ] -----> [ postgresql ]
    > -
    > -
    > - (Win 2003)[color=green]
    > > [ MS SQL 200 ][/color]
    >
    >
    >We are adding a Windows server into our system that contains MS-SQL
    >2000 on
    >it with another database to interact with. My question is to access
    >both databases from the php server (freebsd), is it only a matter of
    >compiling php with postgresql and mssql support in it or are there
    >other things to consider? I know there are different function calls
    >for each database type and even a PEAR interface that handles
    >different databases with a common interface. I am just looking at my
    >configurtion options/possibilities.[/color]

    I don't think there is much of a problem other than smaller ones with
    each of the databases.

    I have Informix and MSSQL compiled as extensions here and it works
    fine. There is also a patch, which lets you write the microseconds
    into SQl server datetimes. I can send it to you on request. I think it
    has still not made it into PHP, I don't know why.

    Jochen


    [color=blue]
    >
    >
    >
    >
    >
    >Thanks in advance
    >
    >Mike[/color]

    --
    Jochen Daum - CANS Ltd.
    PHP DB Edit Toolkit -- PHP scripts for building
    database editing interfaces.
    Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

    Comment

    • Terence

      #3
      Re: php and MS-SQL and PostgreSQL (with Apache)

      Jochen Daum wrote:[color=blue]
      > fine. There is also a patch, which lets you write the microseconds
      > into SQl server datetimes. I can send it to you on request. I think it
      > has still not made it into PHP, I don't know why.
      >[/color]

      Hi Jochen, I wouldn't mind this patch. I use Oracle, PostegreSQL, MySQL,
      and MS-SQL at work and I wouldn't mind being able to keep everything in
      seconds/microseconds.

      Thanks!

      Comment

      • Terence

        #4
        Re: php and MS-SQL and PostgreSQL (with Apache)

        Doesn't sound like there are too many issues on the face of it. My
        advice is to just do it. I still recomend the use of PEAR (or some other
        similar abstraction thing for which there are a few). While there will
        still be implementation differences, you can still potentially save
        yourself lots of work.

        I'm not sure what the performance comparrisons are between MSSQL and
        PostgreSQL, but I know I prefer working with Postgres -- it's much more
        powerful allowing you to choose a range of languages to use for stored
        procedures including C and perl. I also prefer sequences to MS's
        "identities ". If it were up to me, I'd port the MS database to postgres
        :) But then you probably have other windows apps talking to it so you can't.

        My only real advice is to make sure you've tuned the postgres box, it
        makes a BIG difference to performance. I think this is simply a case of
        adjusting the buffer size it is allowed to use. By default, it is
        usually set too low. It all depends on how much that box can afford to
        give it without impacting on it's other processes. Of course then there
        are other issues like indexing and so forth.

        Comment

        Working...