473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MS SQL Server Connections

I have Red Hat 9. Anyone here have that too and can help me?

Without having to do a lot of major surgery, such as recompiling my
PHP (which I consider risky), I want to use either unixODBC or FreeTDS
to connect RH9 Linux to MS SQL Server 2000.

I noticed from phpinfo() that FreeTDS wasn't configured into the PHP
install, although I have installed FreeTDS just now. That's probably
why the mssql_connect() call won't connect -- says Call to undefined
function. I probably need to recompile PHP (again, risky) in order to
get this to work. However, I *DID* notice that unixODBC was enabled,
so I wanted to connect with that using this code:

$dsn = "Driver={SQL Server};Server=10.22.109.5;Database=pubs";
$user = 'sa';
$pass = 'password';
$link = odbc_cconnect($dsn, $user, $pass);
$sql = 'SELECT * FROM authors';
$q = odbc_exec($link, $sql);
$rec = odbc_fetch_array($q);
echo $rec['au_lname'];
odbc_free_result($q);

Well, again, it says Call to undefined function odbc_connect().

What's the catch? Is there a simple way out of this?
Jul 17 '05 #1
1 2800
Hi !

On 19 Nov 2003 13:50:45 -0800, go********@hotpop.com (Google Mike)
wrote:
I have Red Hat 9. Anyone here have that too and can help me?

Without having to do a lot of major surgery, such as recompiling my
PHP (which I consider risky), I want to use either unixODBC or FreeTDS
to connect RH9 Linux to MS SQL Server 2000.
AFAIK, you canuse only extension on Linux, which are compiled in. You
can have a look at dynamically loading them.
But compiling is not risky at all.

I noticed from phpinfo() that FreeTDS wasn't configured into the PHP
install, although I have installed FreeTDS just now. That's probably
why the mssql_connect() call won't connect -- says Call to undefined
function.
The mssql extension is not loaded.
I probably need to recompile PHP (again, risky) in order to
get this to work. However, I *DID* notice that unixODBC was enabled,
so I wanted to connect with that using this code:


never tried that, so cannot quite help.

HTH, Jochen
--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Fortepianissimo | last post by:
Here is the situation: I want my server started up upon connection. When the first connection comes in, the server is not running. The client realizes the fact, and then starts up the server and...
2
by: Patrick | last post by:
Hello I have 3 Servers, all running Windows 2000. On two (WEB-1 & WEB-2) machine I run a website with IIS 5.0 and on the other an MS SQL Database 2000 (SQL-01). So I connect from the Websites...
0
by: Michael Bourgon | last post by:
I've been having the same problem for 2 weeks now. If anyone has any ideas, I'd love to hear them. We are using both SQL and Windows Authentication. I was running a Profiler Trace at the time,...
4
by: STom | last post by:
We have the following settings in our web.config file to store session state on the SQL Server. <sessionState mode="SQLServer" sqlConnectionString="data source=h7sql;Integrated Security=SSPI"...
0
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
4
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
5
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.