Sabbir456
asked on
How to connect Linux-PHP to MS-SQL Server?
Hi,
I have a Fedora 9 box where apache, php, mysql .. are running okay. I need to connect from this machine using php to a MS-SQL Server that is in same network. To do this we were trying to install free tds as per article - http://www.linuxjournal.com/article/6636
but while configuring:
[root@localhost]# tar xvfz freetds-0.60.tgz
[root@localhost]# cd freetds-0.60
[root@localhost]# ./configure --with-tdsver=7.0 --with-unixodbc
but this will show a error message -
"configure: sql.h file not found"
I have googeled a lot still dont know how to resolve this sql.h issue or how to get the file.
Will highly appreciate any help on this .. or if any alternative way to connect to MS-SQL server is available .
Thanks and regards,
Sabbir
I have a Fedora 9 box where apache, php, mysql .. are running okay. I need to connect from this machine using php to a MS-SQL Server that is in same network. To do this we were trying to install free tds as per article - http://www.linuxjournal.com/article/6636
but while configuring:
[root@localhost]# tar xvfz freetds-0.60.tgz
[root@localhost]# cd freetds-0.60
[root@localhost]# ./configure --with-tdsver=7.0 --with-unixodbc
but this will show a error message -
"configure: sql.h file not found"
I have googeled a lot still dont know how to resolve this sql.h issue or how to get the file.
Will highly appreciate any help on this .. or if any alternative way to connect to MS-SQL server is available .
Thanks and regards,
Sabbir
ASKER
To udayakumarlm:
1) Yes I have downloaded the Freetds .. and while try to configure it on my fedora 9
2) The other link you provided only refer to connecting form windows-php to MSSQL but I need to connect to Linux-php tp MSSQL
1) Yes I have downloaded the Freetds .. and while try to configure it on my fedora 9
[root@localhost]# ./configure --with-tdsver=7.0 --with-unixodbcbut this will show a error message - "configure: sql.h file not found"
please refer to my problem details posted earlier.
please refer to my problem details posted earlier.
2) The other link you provided only refer to connecting form windows-php to MSSQL but I need to connect to Linux-php tp MSSQL
you can try:
HOWTO: Connect RubyOnRails on Fedora Linux to SQL2005
http://www.not404.com/Howto_SQL2005_From_RailsOnFedora
Accessing Microsoft SQL Server (mssql) from PHP under Apache on Unix or Linux
http://www.easysoft.com/de veloper/la nguages/ph p/sql_serv er_unix_tu torial.htm l
---
also see
"configure: sql.h file not found"
http://lists.ibiblio.org/p ipermail/f reetds/200 8q3/023734 .html
http://archives.devshed.com/forums/development-94/tdsodbc-h-26-sql-h-no-such-file-or-directory-982422.html
HOWTO: Connect RubyOnRails on Fedora Linux to SQL2005
http://www.not404.com/Howto_SQL2005_From_RailsOnFedora
Accessing Microsoft SQL Server (mssql) from PHP under Apache on Unix or Linux
http://www.easysoft.com/de
---
also see
"configure: sql.h file not found"
http://lists.ibiblio.org/p
http://archives.devshed.com/forums/development-94/tdsodbc-h-26-sql-h-no-such-file-or-directory-982422.html
Since your running Fedora 9, have you tried 'yum install freetds'?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I am trying your suggested solutions .. will get back with results. Thanks a lot.
regards,
Sabbir
I am trying your suggested solutions .. will get back with results. Thanks a lot.
regards,
Sabbir
ASKER
hi mwecomputers,
both yum install freetds and yum install php-mssql worked fine.
was able to connect to SQL Server 2005 using mssql_connect
Thanks ...... a lot.
Sabbir
both yum install freetds and yum install php-mssql worked fine.
was able to connect to SQL Server 2005 using mssql_connect
Thanks ...... a lot.
Sabbir
Glad I could help.
-- Michael
-- Michael
you can find the follwoing link contains a step by step of setting up and useing MSSQL in PHP
read the requirements session and more details at http://in.php.net/manual/en/book.mssql.php