freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Samuel Luxford-Watts <slwatts AT winckworths.co.uk>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: [freetds] Suse 8.2 install
- Date: Fri, 12 Sep 2003 11:06:55 +0100
Ok I have finally cracked it and got my suse 8.2 linux machine running the
standard apache, mod_php and MySQL rpm's shipped buy Suse to also be able to
query a MS SQL 7.0 database using php and freeTDS without having to download
and recompile the complete source of either apache or php and so keeping it
as 'standard' as possible.
I have to say most of the credit goes to aissam AT yahoo.com
<mailto:aissam AT yahoo.com> who posted a comment on the php documentation
site on how he got his Mandrake 9.1 install to work with freeTDS without
re-comiling the whole of php. (the link is at the end).
I dont suppose this can be added to the guide? Its taken me the best part of
week to get this beast to work.....
Given a fresh install of apache (1.3.27-41.i586), mod_php4 (4.3.1-52.i586)
and mod_php4-core (4.3.1-52) also install mod_php4-devel package and from
the src folder of the installation cd's manually install
mod_php4-4.3.1-52.src.rpm.
You are now ready to begin.....
1. # download the latest copy of freeTDS (I am using a devel snapshot
of 0.62 but 0.61 also worked)
2. # follow the instructions for installing freeTDS but add the
following two directives when you run ./configure --enable-msdblib
--sysconfdir=/etc/freetds
3. # make
4. # make install
5. # vi /etc/freetds/freetds.conf and add a section for your server
I had huge problems with the locales settings as my servers are all
configured to use uk/british english hence I had to add the following
/etc/freetds/locales.conf:
[en_GB]
date format = %d %m %y %I:%M%p
language = British
char set = iso_8859-1
do the usual checks using tsql to ensure all is working fine with freeTDS
before continuing.
1. # cd to where the php src package was installed - by default mine
installed in /usr/src/packages/SOURCES/php-4.3.1/
2. # cd ./ext/mssql
3. # phpize if this works with no errors/warnings about include/headers
(.h) skip the next three steps.
4. # mkdir /usr/share/include
5. # ln -s /usr/include/php /usr/share/include/php
6. # phpize again and you should now get build dates after each
'configuring for...'
7. # ./configure --with-mssql=/usr/local (or wherever you installed
freeTDS to in the section above)
8. # make
9. # ./libtool --mode=link gcc -L/usr/local/lib -lsybdb -I.
-I/usr/src/packages/SOURCE/php-4.3.1 -DEAPI -g -O2 -o php_mssql.la
-avoid-aversion -module -rpath
/usr/src/packages/SOURCES/php-4.3.1/ext/mssql/modules php_mssql.lo
10. check where your php extensions are held by looking at /etc/php.ini
and looking for the extension_dir setting. substitute the detination path
below with your one if its different
11. # cp .libs/php_mssql.so
/usr/share/extensions/no-debug-non-zts-20020429/
12. now edit your php.ini (/etc/php.ini) and add the following line
within the extensions section:
extension=php_mssql.so
13. stop apache if its already running:
# /etc/init.d/apache stop
14. and start it again:
# /etc/init.d/apache start
et voila - you should now be in business!
Check out http://uk.php.net/manual/en/printwn/function.mssql-connect.php
<http://uk.php.net/manual/en/printwn/function.mssql-connect.php> as this
has other helpful comments added to it.
Hope this helps someone!!
Sam
--------------
Winckworth Sherwood Solicitors and Parliamentary Agents
DX 148400 WESTMINSTER 5 : 35 Great Peter Street, London SW1P 3LR
Telephone 020 7593 5000 Fax 020 7593 5099
Do something amazing!
The firm is supporting a charitable bike ride through Vietnam and needs your
help. For further information please visit http://www.vietnambikeride.org
-Confidentiality-
This email message and any attachments are confidential; they may be subject
to legal professional privilege and are intended for the named recipient
only. If you are not the named recipient, please return the message and
enclosures immediately and delete them from your system.
-Caution-
Before advice received only by email (whether by attachment or otherwise) may
be relied on, the authenticity of the communication must be verified by means
independent of email.
-Regulation-
The firm is regulated by the Law Society.
-Partners-
A list of partners is available for inspection at each office of the firm and
on the firm's website at http://www.winckworths.co.uk
- [freetds] Suse 8.2 install, Samuel Luxford-Watts, 09/12/2003
Archive powered by MHonArc 2.6.24.