RE: [PHP] MSSQL_CONNECT problem



-----Original Message-----
From: parasane@xxxxxxxxx [mailto:parasane@xxxxxxxxx] On Behalf Of Daniel
Brown
Sent: Tuesday, December 09, 2008 3:49 PM
To: David Stoltz
Cc: Bastien Koert; Dan Shirah; php-general@xxxxxxxxxxxxx
Subject: Re: [PHP] MSSQL_CONNECT problem

On Tue, Dec 9, 2008 at 3:41 PM, David Stoltz <Dstoltz@xxxxxxx> wrote:

Do you have any other thoughts?

When posting to the list, please don't top-post.

Dave, are you seeing that error from both the CLI and the web?
Have you properly configured your DSN? What's the output from the
following?

<?php
mssql_connect('INTRA_SQL,1433', 'uname', 'password') or die('MSSQL
Error on Line '.__LINE__.': '.mssql_error());
mssql_select_db('database') or die('MSSQL Error on Line
'.__LINE__.': '.mssql_error());
?>

--
</Daniel P. Brown>
http://www.parasane.net/
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
50% Off Hosting! http://www.pilotpig.net/specials.php



Sorry for "top posting", that's how my email client sets up the reply...

Anyway, I don't know what CLI is....? I see the error on the web. As for
a DSN, I didn't think I need one connecting this way. That is why the
uname, password, database is supplied, no? This should be a "dsn-less"
connection....

Either way - I tried adding a DNS on the web server, that points to the
SQL database, and that connection works...but the code I'm using from
the web page still does not....

If I use the code you gave me, this is what I get:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: INTRA_SQL,1433 in D:\Inetpub\wwwroot\cratos\test.php on line 2

Fatal error: Call to undefined function mssql_error() in
D:\Inetpub\wwwroot\cratos\test.php on line 2

Please advise....
.



Relevant Pages

  • Re: How to remove blanks at runtime??
    ... [Top posting to annoy dimwits who can't cope with posting wherever is most appropriate.] ... PHP sends it to the web server; the web server may send it immediately ... or buffer it further, but eventually it will send it to the client. ...
    (comp.lang.php)
  • [Full-disclosure] PHP "multipart/form-data" denial of service
    ... PHP version 5.3.1 was just released. ... the temporary files will be deleted. ... When you send these requests to the web server, ... In a few seconds, the web server is not responding anymore, 65535 ...
    (Full-Disclosure)
  • PHP "multipart/form-data" denial of service
    ... PHP version 5.3.1 was just released. ... the temporary files will be deleted. ... When you send these requests to the web server, ... In a few seconds, the web server is not responding anymore, 65535 ...
    (Bugtraq)
  • Re: Ruby performance woes
    ... Now here's my take on all this: PHP and JSP and what I inquired ... S-expressions used as a directly alternate expression of SGML or XML. ... By the way, I've never had access to a Web server that can run ASP, ...
    (comp.lang.lisp)
  • Re: PHP-Yes, HTML-No --- Why?
    ... Because the files, when downloaded, are called .php and have absolutely no php in them:) ... But the extension doesn't match the contents of the file. ... Surely a dynamic web server should appear exactly the same as a static one - all files that contain HTML when viewed should be called .html. ...
    (comp.lang.php)