php3-list | 200003

RE: [PHP3] RE: Linux / MS Sql Server From: Andrew Hill (ahill <email protected>)
Date: 03/10/00

FYI,

Openlink's drivers support SQLServer7 - our Sql Server 6 database agent
functions against SS7 with no difficulties.
And, while you do have to install components on the server, you are not
using the native layer, so there is no additional resource overhead.

Best regards,
Andrew
----------------------------------------------------
Andrew Hill
Technical Support Consultant
OpenLink Software
http://www.openlinksw.com
Universal Database Connectivity Technology Providers

-----Original Message-----
From: Nicholas Irving [mailto:nick <email protected>]
Sent: Friday, March 10, 2000 5:55 AM
To: frederik.claeys <email protected>
Cc: php3 <email protected>
Subject: [PHP3] RE: Linux / MS Sql Server

We used the following.
        debian Linux 2.2
        apache 1.3.x (latest version)
        freetds (latest version)
        php3 (latest version)

@ first it was a pain to get configured as I followed the instruction that
came with the package. This caused the server to crash everytime I
connected. I did the following

1. Download latest apache.
2. Download the latest php3.
3. Download the latest freetds.
4. a. Compiled TDS as described in the README. ie.
./configure --with-tdsver=7.0
   b. Set up the SYBASE and LD_LIBRARY_PATH as described.
   c. Edited 'PWD' to contain the correct connection information.
        i.e
        UID=<username>
        PWD=<password>
        SRV=<name of server as described in the interface file>
        DB=<name of database to test connection>
   d. Edited the 'interfaces' file to contain the correct information
related to the SQL Server
        <name of server>
        query tcp ether <ip address of SQL Server> <port listening on>
        master tcp ether <ip address of SQL Server> <port listening on>

      You can find this information by using the 'Client Network Utility'
included with the MSQL Server 7 app.
   e. run a make test and you should see that all the test pass except one,
this is fine.
        If it fails more than one you have a problem. I cannot confirm if the
application will still work if all fail.
5. a. Go to your apache source directory and type
        ./configure --prefix=<some directory path where you want apache to live>
   b. Go to your PHP source and type
        ./configure --with-sybase=<path to installed freetds
binaries> --with-apache=<path to apache source>
        make
        make install

        Thats PHP configured to use SQL Server.
6. a. Go back to your Apache source directory
        ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
        make
   b. You will know have a version of apache that is preconfigured to access
MSQL Server 7.
   c. Copy the file 'httpd' to your apache bin directory.
7. a. Go back to your PHP source directory
        cp php3.ini-dist /usr/local/lib/php3.ini
   b. You can edit /usr/local/lib/php3.ini file to set PHP options.
   c. Edit your httpd.conf or srm.conf file and add:
          AddType application/x-httpd-php3 .php3

Thats PHP set up to use MSQL Server 7.

You will have to use the Sybase Database calls in your application, but that
is no problem. I have been using it quite happily for a week now, with some
minor problems, but I think that they are network related rather than the
install.

The reason as to why we didnot use the ODBC Module with MSQL Server 7 is
that none of the free or paying software support MSQL Server 7 yet. There is
one the odbc to odbc bridge, but that requires client and server software to
be installed on the Linux and MSQL Server and this is something that I think
is a bit of an over head.

If anybody has any problems or thinks that they have a better solution to
getting MSQL Server 7 working with PHP and Linux then can they email the
list.

Thanks
Nicholas Irving
Web Architect
Fortune Cookie UK Ltd
The Year of the Cookie

-----Original Message-----
From: Frederik Claeys [mailto:frederik.claeys <email protected>]
Sent: Friday, March 10, 2000 10:17 AM
To: nick <email protected>
Subject: Linux / MS Sql Server

Hi,

I'm currently working in an enterprise in Belgium and my task is to develop
an intranet-site. We decided to use Linux/Apache/PHP and this combination
has to interact with MS SQL Server 7.

How did you connected the MS SQL SERVER? Trough ODBC?? Why not using the
Sybase, Ct-lib or FreeTDS? Isn't ODBC slower?

Thanks in advance,
Frederik

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>