472,988 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 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 2789
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.