MS SQL error...I"ve come a long way to get this far
MS SQL error...I"ve come a long way to get this far
am 08.12.2008 20:13:54 von Fred Silsbee
many changes to php.ini to get this far..whew!
PHP 5.2.7 just got jerked out from underneathe me (I have't replaced it since this is a simple script)
phpinfo works!
// Server in the this format: \ or
// , when using a non default port number
$server = 'LANDON\SQLEXPRESS';
$link = mssql_connect($server, 'sa', 'PW'); <<<<< line 6
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
?>
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: LANDON\SQLEXPRESS in C:\Inetpub\wwwroot\trymssql.php on line 6
Something went wrong while connecting to MSSQL
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: MS SQL error...I"ve come a long way to get this far
am 08.12.2008 21:30:26 von Fred Silsbee
I was just thinking about something I've never understood completely!
mssql_connect($server, 'sa', 'PW'); presumes the server doesn't have all the permissions in spite of the fact that it has the password.
The password I gave is the XP Prof login PW.
Maybe some other PW.
--- On Mon, 12/8/08, Fred Silsbee wrote:
> From: Fred Silsbee
> Subject: MS SQL error...I've come a long way to get this far
> To: php-db@lists.php.net
> Date: Monday, December 8, 2008, 7:13 PM
> many changes to php.ini to get this far..whew!
>
> PHP 5.2.7 just got jerked out from underneathe me (I
> have't replaced it since this is a simple script)
>
> phpinfo works!
>
>
> // Server in the this format:
> \ or
> // , when using a non default
> port number
> $server = 'LANDON\SQLEXPRESS';
>
> $link = mssql_connect($server, 'sa', 'PW');
> <<<<< line 6
>
> if(!$link)
> {
> die('Something went wrong while connecting to
> MSSQL');
> }
> ?>
>
>
> Warning: mssql_connect() [function.mssql-connect]: Unable
> to connect to server: LANDON\SQLEXPRESS in
> C:\Inetpub\wwwroot\trymssql.php on line 6
> Something went wrong while connecting to MSSQL
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: MS SQL error...I"ve come a long way to get this far
am 08.12.2008 22:26:17 von Adam.Fortuno
Fred,
If you're using integrated security (e.g., a domain account such as
"domain\bob"), you won't supply a password. However, the "sa" account is
a SQL login (v.s. a domain login). In that case, it would make sense
that you supply a password. See the following page for some code to
connect using integrated security:
http://msdn.microsoft.com/en-us/library/cc296205(SQL.90).asp x
See the following page for some code to connect using a SQL login:
http://msdn.microsoft.com/en-us/library/cc296182(SQL.90).asp x
If you're curious if this is even an authentication/permissions issue,
try to login using a domain login. The login event will be recorded in
the `Event Viewer`. If you're attempt isn't recorded, you've got a
communication problem with the server instance. If it is recorded,
you'll be able to tell what the problem is authenticating.
Good luck, and let us know how it turns out.
A-
-----Original Message-----
From: Fred Silsbee [mailto:fredsilsbee@yahoo.com]=20
Sent: Monday, December 08, 2008 3:30 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Re: MS SQL error...I've come a long way to get this
far
I was just thinking about something I've never understood completely!
mssql_connect($server, 'sa', 'PW'); presumes the server doesn't have all
the permissions in spite of the fact that it has the password.
The password I gave is the XP Prof login PW.
Maybe some other PW.=20
--- On Mon, 12/8/08, Fred Silsbee wrote:
> From: Fred Silsbee
> Subject: MS SQL error...I've come a long way to get this far
> To: php-db@lists.php.net
> Date: Monday, December 8, 2008, 7:13 PM
> many changes to php.ini to get this far..whew!
>=20
> PHP 5.2.7 just got jerked out from underneathe me (I
> have't replaced it since this is a simple script)
>=20
> phpinfo works!
>=20
>
> // Server in the this format:
> \ or=20
> // , when using a non default
> port number
> $server =3D 'LANDON\SQLEXPRESS';
>=20
> $link =3D mssql_connect($server, 'sa', 'PW');
> <<<<< line 6
>=20
> if(!$link)
> {
> die('Something went wrong while connecting to
> MSSQL');
> }
> ?>
>=20
>=20
> Warning: mssql_connect() [function.mssql-connect]: Unable
> to connect to server: LANDON\SQLEXPRESS in
> C:\Inetpub\wwwroot\trymssql.php on line 6
> Something went wrong while connecting to MSSQL
=20
--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: MS SQL error...I"ve come a long way to get this far
am 09.12.2008 00:16:17 von Fred Silsbee
--- On Mon, 12/8/08, Fortuno, Adam wrote:
> From: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a long way to get this far
> To: fredsilsbee@yahoo.com
> Date: Monday, December 8, 2008, 10:56 PM
> Fred,
>
> Hmm, that makes me think the extension didn't load.
> When you fire up a
> page with do you see the
> module's information?
>
> If it makes you feel any better, I'm working thru
> integration with
> Oracle, and I'm not fairing too much better.
>
> A-
>
> -----Original Message-----
> From: Fred Silsbee [mailto:fredsilsbee@yahoo.com]
> Sent: Monday, December 08, 2008 5:53 PM
> To: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a
> long way to get
> this far
>
>
>
>
> --- On Mon, 12/8/08, Fortuno, Adam
> wrote:
>
> > From: Fortuno, Adam
> > Subject: RE: [PHP-DB] Re: MS SQL error...I've come
> a long way to get
> this far
> > To: fredsilsbee@yahoo.com, php-db@lists.php.net
> > Date: Monday, December 8, 2008, 9:26 PM
> > Fred,
> >
> > If you're using integrated security (e.g., a
> domain
> > account such as
> > "domain\bob"), you won't supply a
> > password. However, the "sa" account is
> > a SQL login (v.s. a domain login). In that case, it
> would
> > make sense
> > that you supply a password. See the following page for
> some
> > code to
> > connect using integrated security:
> >
> >
> http://msdn.microsoft.com/en-us/library/cc296205(SQL.90).asp x
> >
> > See the following page for some code to connect using
> a SQL
> > login:
> >
> >
> http://msdn.microsoft.com/en-us/library/cc296182(SQL.90).asp x
> >
> > If you're curious if this is even an
> > authentication/permissions issue,
> > try to login using a domain login. The login event
> will be
> > recorded in
> > the `Event Viewer`. If you're attempt isn't
> > recorded, you've got a
> > communication problem with the server instance. If it
> is
> > recorded,
> > you'll be able to tell what the problem is
> > authenticating.
> >
> > Good luck, and let us know how it turns out.
> >
> > A-
> >
> >
> > -----Original Message-----
> > From: Fred Silsbee [mailto:fredsilsbee@yahoo.com]
> > Sent: Monday, December 08, 2008 3:30 PM
> > To: php-db@lists.php.net
> > Subject: [PHP-DB] Re: MS SQL error...I've come a
> long
> > way to get this
> > far
> >
> > I was just thinking about something I've never
> > understood completely!
> >
> > mssql_connect($server, 'sa', 'PW');
> > presumes the server doesn't have all
> > the permissions in spite of the fact that it has the
> > password.
> >
> > The password I gave is the XP Prof login PW.
> >
> > Maybe some other PW.
> >
> >
> > --- On Mon, 12/8/08, Fred Silsbee
> > wrote:
> >
> > > From: Fred Silsbee
> > > Subject: MS SQL error...I've come a long way
> to
> > get this far
> > > To: php-db@lists.php.net
> > > Date: Monday, December 8, 2008, 7:13 PM
> > > many changes to php.ini to get this far..whew!
> > >
> > > PHP 5.2.7 just got jerked out from underneathe me
> (I
> > > have't replaced it since this is a simple
> script)
> > >
> > > phpinfo works!
> > >
> > >
> > > // Server in the this format:
> > > \ or
> > > // , when using a non
> > default
> > > port number
> > > $server = 'LANDON\SQLEXPRESS';
> > >
> > > $link = mssql_connect($server, 'sa',
> > 'PW');
> > > <<<<< line 6
> > >
> > > if(!$link)
> > > {
> > > die('Something went wrong while
> connecting to
> > > MSSQL');
> > > }
> > > ?>
> > >
> > >
> > > Warning: mssql_connect()
> [function.mssql-connect]:
> > Unable
> > > to connect to server: LANDON\SQLEXPRESS in
> > > C:\Inetpub\wwwroot\trymssql.php on
> line 6
> > > Something went wrong while connecting to MSSQL
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> thanks!
>
> using the integrated server login code (first link you
> included, I get:
>
> Fatal error: Call to undefined function sqlsrv_connect() in
> C:\Inetpub\wwwroot\trymssql_1.php on line 7
>
> still banging away
integration with Oracle...Linux or Windows?
I've got the Linux Oracle 11g1/PHP 5.2.6/ and MySQL connection down...I can email working code.
When I run :
// Server in the this format: \ or
// , when using a non default port number
$server = 'LANDON\SQLEXPRESS';
$link = mssql_connect($server, 'sa', 'K^a_t^e_a_u_x_3141');
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
?>
I get
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: LANDON\SQLEXPRESS in C:\Inetpub\wwwroot\trymssql.php on line 6
Something went wrong while connecting to MSSQL
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: MS SQL error...I"ve come a long way to get this far
am 09.12.2008 17:39:12 von Fred Silsbee
--- On Mon, 12/8/08, Fortuno, Adam wrote:
> From: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a long way to get this far
> To: fredsilsbee@yahoo.com
> Date: Monday, December 8, 2008, 10:56 PM
> Fred,
>
> Hmm, that makes me think the extension didn't load.
> When you fire up a
> page with do you see the
> module's information?
>
> If it makes you feel any better, I'm working thru
> integration with
> Oracle, and I'm not fairing too much better.
>
> A-
>
> -----Original Message-----
> From: Fred Silsbee [mailto:fredsilsbee@yahoo.com]
> Sent: Monday, December 08, 2008 5:53 PM
> To: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a
> long way to get
> this far
>
>
>
>
> --- On Mon, 12/8/08, Fortuno, Adam
> wrote:
>
> > From: Fortuno, Adam
> > Subject: RE: [PHP-DB] Re: MS SQL error...I've come
> a long way to get
> this far
> > To: fredsilsbee@yahoo.com, php-db@lists.php.net
> > Date: Monday, December 8, 2008, 9:26 PM
> > Fred,
> >
> > If you're using integrated security (e.g., a
> domain
> > account such as
> > "domain\bob"), you won't supply a
> > password. However, the "sa" account is
> > a SQL login (v.s. a domain login). In that case, it
> would
> > make sense
> > that you supply a password. See the following page for
> some
> > code to
> > connect using integrated security:
> >
> >
> http://msdn.microsoft.com/en-us/library/cc296205(SQL.90).asp x
> >
> > See the following page for some code to connect using
> a SQL
> > login:
> >
> >
> http://msdn.microsoft.com/en-us/library/cc296182(SQL.90).asp x
> >
> > If you're curious if this is even an
> > authentication/permissions issue,
> > try to login using a domain login. The login event
> will be
> > recorded in
> > the `Event Viewer`. If you're attempt isn't
> > recorded, you've got a
> > communication problem with the server instance. If it
> is
> > recorded,
> > you'll be able to tell what the problem is
> > authenticating.
> >
> > Good luck, and let us know how it turns out.
> >
> > A-
> >
> >
> > -----Original Message-----
> > From: Fred Silsbee [mailto:fredsilsbee@yahoo.com]
> > Sent: Monday, December 08, 2008 3:30 PM
> > To: php-db@lists.php.net
> > Subject: [PHP-DB] Re: MS SQL error...I've come a
> long
> > way to get this
> > far
> >
> > I was just thinking about something I've never
> > understood completely!
> >
> > mssql_connect($server, 'sa', 'PW');
> > presumes the server doesn't have all
> > the permissions in spite of the fact that it has the
> > password.
> >
> > The password I gave is the XP Prof login PW.
> >
> > Maybe some other PW.
> >
> >
> > --- On Mon, 12/8/08, Fred Silsbee
> > wrote:
> >
> > > From: Fred Silsbee
> > > Subject: MS SQL error...I've come a long way
> to
> > get this far
> > > To: php-db@lists.php.net
> > > Date: Monday, December 8, 2008, 7:13 PM
> > > many changes to php.ini to get this far..whew!
> > >
> > > PHP 5.2.7 just got jerked out from underneathe me
> (I
> > > have't replaced it since this is a simple
> script)
> > >
> > > phpinfo works!
> > >
> > >
> > > // Server in the this format:
> > > \ or
> > > // , when using a non
> > default
> > > port number
> > > $server = 'LANDON\SQLEXPRESS';
> > >
> > > $link = mssql_connect($server, 'sa',
> > 'PW');
> > > <<<<< line 6
> > >
> > > if(!$link)
> > > {
> > > die('Something went wrong while
> connecting to
> > > MSSQL');
> > > }
> > > ?>
> > >
> > >
> > > Warning: mssql_connect()
> [function.mssql-connect]:
> > Unable
> > > to connect to server: LANDON\SQLEXPRESS in
> > > C:\Inetpub\wwwroot\trymssql.php on
> line 6
> > > Something went wrong while connecting to MSSQL
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> thanks!
>
> using the integrated server login code (first link you
> included, I get:
>
> Fatal error: Call to undefined function sqlsrv_connect() in
> C:\Inetpub\wwwroot\trymssql_1.php on line 7
>
> still banging away
meticulously loaded the "new" MS PHP upgrade update and still no luck
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: MS SQL error...I"ve come a long way to get this far
am 09.12.2008 19:30:28 von Fred Silsbee
--- On Tue, 12/9/08, Fortuno, Adam wrote:
> From: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a long way to get this far
> To: fredsilsbee@yahoo.com
> Date: Tuesday, December 9, 2008, 5:14 PM
> Sorry! I've been swamped today, and I needed to install
> the PHP module
> for SQL Server before I could respond.
>
> Fred> integration with Oracle...Linux or Windows?
> Fred> I've got the Linux Oracle 11g1/PHP 5.2.6/ and
> MySQL
> Fred> connection down...I can email working code.
>
> Windows. I'm running PHP (in ISAPI mode) on IIS
> integrating with a 9i
> instance on a RedHat box.
>
> Fred> When I run :
> Fred>
> Fred> // Server in the this format:
> \ or
> Fred> // , when using a non
> default port number
> Fred> $server = 'LANDON\SQLEXPRESS';
> Fred>
> Fred> $link = mssql_connect($server, 'sa',
> 'K^a_t^e_a_u_x_3141');
> Fred>
> Fred> if(!$link)
> Fred> {
> Fred> die('Something went wrong while connecting
> to MSSQL');
> Fred> }
> Fred>?>
> Fred>
> Fred> I get
> Fred>
> Fred> Warning: mssql_connect() [function.mssql-connect]:
> Unable to
> connect
> Fred> to server: LANDON\SQLEXPRESS in
> C:\Inetpub\wwwroot\trymssql.php on
>
> Fred> line 6 Something went wrong while connecting to
> MSSQL
>
> I installed the PHP module for SQL Server 2005 this
> morning, and I
> updated my php.ini file then restarted IIS. I dumped the
> following into
> a page, and I ran it.
>
> $server = 'Babylon';
> $uid = 'UserName';
> $pwd = 'FooB@r';
>
> $connectionInfo = array("UID" => $uid,
> "PWD" => $pwd);
> $link = sqlsrv_connect($server, $connectionInfo);
>
> if(!$link)
> {
> die('Something went wrong while connecting to
> MSSQL');
> }
>
> It worked without a problem. I downloaded whatever B.S.
> module Microsoft
> had on their site, and here is what I added to my ini:
>
> My php.ini file includes:
>
> [SQL_Server_2005]
> extension=php_sqlsrv_ts.dll
>
> I'm trying a different function than you did. Give my
> script a try.
>
> A-
THANKS!!!! I'll try it
I downloaded the adventure works .msi file and successfully installed it but found no new tables in my SQL SERVER 2005.
This is from Microsoft:
/* Specify the server and connection string attributes. */
$serverName = "(local)";
$connectionInfo = array( "Database"=>"AdventureWorks");
/* Connect using Windows Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.";
die( print_r( sqlsrv_errors(), true));
}
/* Query SQL Server for the login of the user accessing the
database. */
$tsql = "SELECT CONVERT(varchar(32), SUSER_SNAME())";
$stmt = sqlsrv_query( $conn, $tsql);
if( $stmt === false )
{
echo "Error in executing query.";
die( print_r( sqlsrv_errors(), true));
}
/* Retrieve and display the results of the query. */
$row = sqlsrv_fetch_array($stmt);
echo "User login: ".$row[0]."";
/* Free statement and connection resources. */
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
?>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: MS SQL error...I"ve come a long way to get this far
am 09.12.2008 19:39:20 von Fred Silsbee
--- On Tue, 12/9/08, Fortuno, Adam wrote:
> From: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a long way to get this far
> To: fredsilsbee@yahoo.com
> Date: Tuesday, December 9, 2008, 5:14 PM
> Sorry! I've been swamped today, and I needed to install
> the PHP module
> for SQL Server before I could respond.
>
> Fred> integration with Oracle...Linux or Windows?
> Fred> I've got the Linux Oracle 11g1/PHP 5.2.6/ and
> MySQL
> Fred> connection down...I can email working code.
>
> Windows. I'm running PHP (in ISAPI mode) on IIS
> integrating with a 9i
> instance on a RedHat box.
>
> Fred> When I run :
> Fred>
> Fred> // Server in the this format:
> \ or
> Fred> // , when using a non
> default port number
> Fred> $server = 'LANDON\SQLEXPRESS';
> Fred>
> Fred> $link = mssql_connect($server, 'sa',
> 'K^a_t^e_a_u_x_3141');
> Fred>
> Fred> if(!$link)
> Fred> {
> Fred> die('Something went wrong while connecting
> to MSSQL');
> Fred> }
> Fred>?>
> Fred>
> Fred> I get
> Fred>
> Fred> Warning: mssql_connect() [function.mssql-connect]:
> Unable to
> connect
> Fred> to server: LANDON\SQLEXPRESS in
> C:\Inetpub\wwwroot\trymssql.php on
>
> Fred> line 6 Something went wrong while connecting to
> MSSQL
>
> I installed the PHP module for SQL Server 2005 this
> morning, and I
> updated my php.ini file then restarted IIS. I dumped the
> following into
> a page, and I ran it.
>
> $server = 'Babylon';
> $uid = 'UserName';
> $pwd = 'FooB@r';
>
> $connectionInfo = array("UID" => $uid,
> "PWD" => $pwd);
> $link = sqlsrv_connect($server, $connectionInfo);
>
> if(!$link)
> {
> die('Something went wrong while connecting to
> MSSQL');
> }
>
> It worked without a problem. I downloaded whatever B.S.
> module Microsoft
> had on their site, and here is what I added to my ini:
>
> My php.ini file includes:
>
> [SQL_Server_2005]
> extension=php_sqlsrv_ts.dll
>
> I'm trying a different function than you did. Give my
> script a try.
>
> A-
I've truly gotten lots of help from this "forum/list"
I tried the following and got:Something went wrong while connecting to MSSQL
// Server in the this format: \ or
// , when using a non default port number
$server = 'LANDON\SQLEXPRESS';
//$server = '(local)\sqlexpress';
// $server = 'Babylon';
$uid = 'sa';
$pwd = 'xyxyxyxyx';
$connectionInfo = array("UID" => $uid, "PWD" => $pwd);
$link = sqlsrv_connect($server, $connectionInfo);
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
?>
I only have the 2nd statement of your:
[SQL_Server_2005]
extension=php_sqlsrv_ts.dll
I'll try anything at this point! thanks again!
I have added to my path both directories where I downloaded PHP files
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: MS SQL error...I"ve come a long way to get this far
am 10.12.2008 02:27:56 von Fred Silsbee
--- On Tue, 12/9/08, Fortuno, Adam wrote:
> From: Fortuno, Adam
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a long way to get this far
> To: fredsilsbee@yahoo.com
> Date: Tuesday, December 9, 2008, 8:20 PM
> Fred,
>
> Have you checked the permissions on the extensions to make
> sure that the
> process running your site has access? Since you're able
> to call the
> function, I don't think this is the problem, but
> I'm running out of
> ideas. Also, are you seeing anything in SQL Server's
> error log or the
> event log, which might be helpful? You have SQL Server
> Native Client
> installed? I assume you've quadruple-checked the
> credentials?
>
> A-
>
> -----Original Message-----
> From: Fred Silsbee [mailto:fredsilsbee@yahoo.com]
> Sent: Tuesday, December 09, 2008 1:39 PM
> To: Fortuno, Adam
> Cc: php-db@lists.php.net
> Subject: RE: [PHP-DB] Re: MS SQL error...I've come a
> long way to get
> this far
>
> --- On Tue, 12/9/08, Fortuno, Adam
> wrote:
>
> > From: Fortuno, Adam
> > Subject: RE: [PHP-DB] Re: MS SQL error...I've come
> a long way to get
> this far
> > To: fredsilsbee@yahoo.com
> > Date: Tuesday, December 9, 2008, 5:14 PM
> > Sorry! I've been swamped today, and I needed to
> install
> > the PHP module
> > for SQL Server before I could respond.
> >
> > Fred> integration with Oracle...Linux or Windows?
> > Fred> I've got the Linux Oracle 11g1/PHP 5.2.6/
> and
> > MySQL
> > Fred> connection down...I can email working code.
> >
> > Windows. I'm running PHP (in ISAPI mode) on IIS
> > integrating with a 9i
> > instance on a RedHat box.
> >
> > Fred> When I run :
> > Fred>
> > Fred> // Server in the this format:
> > \ or
> > Fred> // , when using a
> non
> > default port number
> > Fred> $server = 'LANDON\SQLEXPRESS';
> > Fred>
> > Fred> $link = mssql_connect($server, 'sa',
> > 'K^a_t^e_a_u_x_3141');
> > Fred>
> > Fred> if(!$link)
> > Fred> {
> > Fred> die('Something went wrong while
> connecting
> > to MSSQL');
> > Fred> }
> > Fred>?>
> > Fred>
> > Fred> I get
> > Fred>
> > Fred> Warning: mssql_connect()
> [function.mssql-connect]:
> > Unable to
> > connect
> > Fred> to server: LANDON\SQLEXPRESS in
> > C:\Inetpub\wwwroot\trymssql.php on
> >
> > Fred> line 6 Something went wrong while connecting
> to
> > MSSQL
> >
> > I installed the PHP module for SQL Server 2005 this
> > morning, and I
> > updated my php.ini file then restarted IIS. I dumped
> the
> > following into
> > a page, and I ran it.
> >
> > $server = 'Babylon';
> > $uid = 'UserName';
> > $pwd = 'FooB@r';
> >
> > $connectionInfo = array("UID" => $uid,
> > "PWD" => $pwd);
> > $link = sqlsrv_connect($server, $connectionInfo);
> >
> > if(!$link)
> > {
> > die('Something went wrong while connecting to
> > MSSQL');
> > }
> >
> > It worked without a problem. I downloaded whatever
> B.S.
> > module Microsoft
> > had on their site, and here is what I added to my ini:
> >
> > My php.ini file includes:
> >
> > [SQL_Server_2005]
> > extension=php_sqlsrv_ts.dll
> >
> > I'm trying a different function than you did. Give
> my
> > script a try.
> >
> > A-
>
>
> I've truly gotten lots of help from this
> "forum/list"
>
> I tried the following and got:Something went wrong while
> connecting to
> MSSQL
>
>
>
> // Server in the this format:
> \ or
> // , when using a non default
> port number
> $server = 'LANDON\SQLEXPRESS';
>
> //$server = '(local)\sqlexpress';
> // $server = 'Babylon';
> $uid = 'sa';
> $pwd = 'xyxyxyxyx';
>
> $connectionInfo = array("UID" => $uid,
> "PWD" => $pwd);
> $link = sqlsrv_connect($server, $connectionInfo);
>
> if(!$link)
> {
> die('Something went wrong while connecting to
> MSSQL');
> }
>
> ?>
>
>
> I only have the 2nd statement of your:
>
> [SQL_Server_2005]
> extension=php_sqlsrv_ts.dll
>
> I'll try anything at this point! thanks again!
>
> I have added to my path both directories where I downloaded
> PHP files
permissions sound viable...problem is that the only way I see permissions can be set is on directories
Problem put on MSDN forum if you are interested:
http://forums.microsoft.com/forums/ShowPost.aspx?PostID=4227 666&SiteID=1
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php