PHP connecting to MSSQL

PHP connecting to MSSQL

am 29.03.2009 13:31:28 von Alf C Stockton

I vave also tried using
echo "Error in DBConnect() = " . mssql_get_last_message();
& now all I get is "Error in DBConnect() = "
--
Regards,
Alf Stockton www.stockton.co.za

Q: What's the difference between a duck and an elephant?
A: You can't get down off an elephant.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 29.03.2009 15:27:28 von John Mertic

Which version of mssql are you connecting to?

John

Sent from my iPod

On Mar 29, 2009, at 7:31 AM, Alf Stockton wrote:

> I vave also tried using
> echo "Error in DBConnect() = " . mssql_get_last_message();
> & now all I get is "Error in DBConnect() = "
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> Q: What's the difference between a duck and an elephant?
> A: You can't get down off an elephant.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 30.03.2009 11:34:58 von Alf C Stockton

John Mertic wrote:
> Which version of mssql are you connecting to?
>
My version number is 8.00.194 RTM Developer Edition


--
Regards,
Alf Stockton www.stockton.co.za

You have many friends and very few living enemies.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 30.03.2009 12:44:20 von harlequin2

Hi Alf,

have you checked the comments on the php.net page (http://us.php.net/mssql_connect)? These are really helpful when it comes to troubleshooting.

One setting I remember to have changed in my environment was the following php.ini entry:

[CODE]
mssql.secure_connection=off
[/CODE]

Could you try to connect to another machine to see if your server is able to connect to any MSSQL Servers? If not, have you set your error_reporting to E_ALL and display_errors to 1? Have you checked that your mssql extension in php.ini has been enabled?

If all fails, try using PDO with PDO_MSSQL (http://us.php.net/manual/de/ref.pdo-dblib.php).

Good luck and please give us an update of your progress!

Regards,

Sascha
--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 30.03.2009 14:15:41 von Alf C Stockton

Sascha Meyer wrote:
> Hi Alf,
>
> have you checked the comments on the php.net page (http://us.php.net/mssql_connect)? These are really helpful when it comes to troubleshooting.
>
Yes I have. In fact that was where I got the original code.
>
> One setting I remember to have changed in my environment was the following php.ini entry:
>
> [CODE]
> mssql.secure_connection=off
> [/CODE]
>
I had previously altered this setting.
>
> Could you try to connect to another machine to see if your server is able to connect to any MSSQL Servers? If not, have you set your error_reporting to E_ALL and display_errors to 1? Have you checked that your mssql extension in php.ini has been enabled?
>
Yes I can successfully connect to my desktop but just cannot get to my laptop
from my laptop.
>
> If all fails, try using PDO with PDO_MSSQL (http://us.php.net/manual/de/ref.pdo-dblib.php).
>
I will try this a bit later today


--
Regards,
Alf Stockton www.stockton.co.za

You will gain money by an illegal action.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 30.03.2009 15:38:42 von harlequin2

Hi Alf,

just a guess, are you using any kind of firewall (application or port based) on your computer? Could you try a "telnet localhost 1433" to check if this works?

Regarding php.ini changes: have you restarted the web server's services after changing?

Another source for an alternative way to access MSSQL (with FreeTDS):

http://docs.moodle.org/en/Installing_MSSQL_for_PHP

Regards, Sascha

P.S. I guess you probably checked all of the above, but I just think about all possible causes for this problem.

-------- Original-Nachricht --------
> Datum: Mon, 30 Mar 2009 14:15:41 +0200
> Von: Alf Stockton
> An: Sascha Meyer
> CC: jmertic@gmail.com, php-windows@lists.php.net
> Betreff: Re: [PHP-WIN] PHP connecting to MSSQL

> Sascha Meyer wrote:
> > Hi Alf,
> >
> > have you checked the comments on the php.net page
> (http://us.php.net/mssql_connect)? These are really helpful when it comes to troubleshooting.
> >
> Yes I have. In fact that was where I got the original code.
> >
> > One setting I remember to have changed in my environment was the
> following php.ini entry:
> >
> > [CODE]
> > mssql.secure_connection=off
> > [/CODE]
> >
> I had previously altered this setting.
> >
> > Could you try to connect to another machine to see if your server is
> able to connect to any MSSQL Servers? If not, have you set your
> error_reporting to E_ALL and display_errors to 1? Have you checked that your mssql
> extension in php.ini has been enabled?
> >
> Yes I can successfully connect to my desktop but just cannot get to my
> laptop
> from my laptop.
> >
> > If all fails, try using PDO with PDO_MSSQL
> (http://us.php.net/manual/de/ref.pdo-dblib.php).
> >
> I will try this a bit later today
>
>
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> You will gain money by an illegal action.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 30.03.2009 17:16:37 von Alf C Stockton

Baboucarr Sanneh wrote:
> okay try including the port number for the mssql server (I.e 1433) in
> the connection string..that also can be the problem somethimes
> and Sasha Meyer said:
> just a guess, are you using any kind of firewall (application or port
based) > on your computer? Could you try a "telnet localhost 1433" to check if
this > > works?
>
> Regarding php.ini changes: have you restarted the web server's services > >
> after changing?

Yes I have restarted the needed processes.

I have now attempted testing with firewall on, with firewall turned off, with
firewall on but exception made for port 1433 and a number of others but in all
cases it failed with the following results.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Alf Stockton>telnet localhost 1433
Connecting To localhost...Could not open connection to the host, on port 1433:
C onnect failed

C:\Documents and Settings\Alf Stockton>telnet localhost 1433
Connecting To localhost...Could not open connection to the host, on port 1433:
Connect failed

C:\Documents and Settings\Alf Stockton>telnet localhost 1433
Connecting To localhost...Could not open connection to the host, on port 1433:
Connect failed

C:\Documents and Settings\Alf Stockton>telnet localhost 1433
Connecting To localhost...Could not open connection to the host, on port 1433:
Connect failed

C:\Documents and Settings\Alf Stockton>telnet localhost 1433
Connecting To localhost...Could not open connection to the host, on port 1433:
Connect failed

BTW How can I reinstall MSSQL without loosing existing databases?

--
Regards,
Alf Stockton www.stockton.co.za

Your boss is a few sandwiches short of a picnic.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 30.03.2009 19:16:54 von harlequin2

Hi Alf,

your local SQL Server is probably listening on another port ... perhaps you could try the following in a DOS prompt:

netstat

and

netstat -n

The first should give you all open local ports with descriptions to the port if a default port was used. The second will give you all open ports with port numbers instead of protocol names. This could help you check if your server is listening on another port.

Alf wrote:
> BTW How can I reinstall MSSQL without loosing existing databases?

You can export your local databases on various ways before reinstalling, i.e.:
a) use the osql (located in MSDE's binn folder) command tool from MSDE (or MSSQL Server Editions)
http://www.rs-freeware.org/osql/#dumping
b) Copy your data Dir (could be "C:\Program Files\Microsoft SQL Server\MSSQL\Data") and attach the database to a full MS SQL Server
c) Install MS SQL Server Client Connectivity and connect to your database

Good luck!

Regards, Sascha
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 10:07:21 von Baboucarr Sanneh

Alf you can also check the Server network utility from the From the sql
server installed and check the properties of the TCP/IP to see the port
number for the mssql server.
Well the default is 1433 ...


-----------------------------------------------
Aynt perfect but cloze 2 it..
-----------------------------------------------

--------------------------------------------------
From: "Alf Stockton"
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" ; "Sascha Meyer"
;
Subject: Re: [PHP-WIN] PHP connecting to MSSQL

> Baboucarr Sanneh wrote:
>> okay try including the port number for the mssql server (I.e 1433) in the
>> connection string..that also can be the problem somethimes
>> and Sasha Meyer said:
> > just a guess, are you using any kind of firewall (application or port
> based) > on your computer? Could you try a "telnet localhost 1433" to
> check if this > > works?
> >
> > Regarding php.ini changes: have you restarted the web server's services
> > > > after changing?
>
> Yes I have restarted the needed processes.
>
> I have now attempted testing with firewall on, with firewall turned off,
> with firewall on but exception made for port 1433 and a number of others
> but in all cases it failed with the following results.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: C onnect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> BTW How can I reinstall MSSQL without loosing existing databases?
>
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> Your boss is a few sandwiches short of a picnic.
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 10:08:32 von Baboucarr Sanneh

In your mssql_connect statement put the port number of the server to (I.e
1433 if it is left to default)
-----------------------------------------------
Aynt perfect but cloze 2 it..
-----------------------------------------------

--------------------------------------------------
From: "Alf Stockton"
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" ; "Sascha Meyer"
;
Subject: Re: [PHP-WIN] PHP connecting to MSSQL

> Baboucarr Sanneh wrote:
>> okay try including the port number for the mssql server (I.e 1433) in the
>> connection string..that also can be the problem somethimes
>> and Sasha Meyer said:
> > just a guess, are you using any kind of firewall (application or port
> based) > on your computer? Could you try a "telnet localhost 1433" to
> check if this > > works?
> >
> > Regarding php.ini changes: have you restarted the web server's services
> > > > after changing?
>
> Yes I have restarted the needed processes.
>
> I have now attempted testing with firewall on, with firewall turned off,
> with firewall on but exception made for port 1433 and a number of others
> but in all cases it failed with the following results.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: C onnect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> BTW How can I reinstall MSSQL without loosing existing databases?
>
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> Your boss is a few sandwiches short of a picnic.
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 10:08:32 von Baboucarr Sanneh

In your mssql_connect statement put the port number of the server to (I.e
1433 if it is left to default)
-----------------------------------------------
Aynt perfect but cloze 2 it..
-----------------------------------------------

--------------------------------------------------
From: "Alf Stockton"
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" ; "Sascha Meyer"
;
Subject: Re: [PHP-WIN] PHP connecting to MSSQL

> Baboucarr Sanneh wrote:
>> okay try including the port number for the mssql server (I.e 1433) in the
>> connection string..that also can be the problem somethimes
>> and Sasha Meyer said:
> > just a guess, are you using any kind of firewall (application or port
> based) > on your computer? Could you try a "telnet localhost 1433" to
> check if this > > works?
> >
> > Regarding php.ini changes: have you restarted the web server's services
> > > > after changing?
>
> Yes I have restarted the needed processes.
>
> I have now attempted testing with firewall on, with firewall turned off,
> with firewall on but exception made for port 1433 and a number of others
> but in all cases it failed with the following results.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: C onnect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> BTW How can I reinstall MSSQL without loosing existing databases?
>
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> Your boss is a few sandwiches short of a picnic.
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 10:10:37 von Baboucarr Sanneh

In your mssql_connect statement try putting the port number of the sql
server in there
-----------------------------------------------
Aynt perfect but cloze 2 it..
-----------------------------------------------

--------------------------------------------------
From: "Alf Stockton"
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" ; "Sascha Meyer"
;
Subject: Re: [PHP-WIN] PHP connecting to MSSQL

> Baboucarr Sanneh wrote:
>> okay try including the port number for the mssql server (I.e 1433) in the
>> connection string..that also can be the problem somethimes
>> and Sasha Meyer said:
> > just a guess, are you using any kind of firewall (application or port
> based) > on your computer? Could you try a "telnet localhost 1433" to
> check if this > > works?
> >
> > Regarding php.ini changes: have you restarted the web server's services
> > > > after changing?
>
> Yes I have restarted the needed processes.
>
> I have now attempted testing with firewall on, with firewall turned off,
> with firewall on but exception made for port 1433 and a number of others
> but in all cases it failed with the following results.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: C onnect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> BTW How can I reinstall MSSQL without loosing existing databases?
>
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> Your boss is a few sandwiches short of a picnic.
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 10:10:37 von Baboucarr Sanneh

In your mssql_connect statement try putting the port number of the sql
server in there
-----------------------------------------------
Aynt perfect but cloze 2 it..
-----------------------------------------------

--------------------------------------------------
From: "Alf Stockton"
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" ; "Sascha Meyer"
;
Subject: Re: [PHP-WIN] PHP connecting to MSSQL

> Baboucarr Sanneh wrote:
>> okay try including the port number for the mssql server (I.e 1433) in the
>> connection string..that also can be the problem somethimes
>> and Sasha Meyer said:
> > just a guess, are you using any kind of firewall (application or port
> based) > on your computer? Could you try a "telnet localhost 1433" to
> check if this > > works?
> >
> > Regarding php.ini changes: have you restarted the web server's services
> > > > after changing?
>
> Yes I have restarted the needed processes.
>
> I have now attempted testing with firewall on, with firewall turned off,
> with firewall on but exception made for port 1433 and a number of others
> but in all cases it failed with the following results.
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: C onnect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> C:\Documents and Settings\Alf Stockton>telnet localhost 1433
> Connecting To localhost...Could not open connection to the host, on port
> 1433: Connect failed
>
> BTW How can I reinstall MSSQL without loosing existing databases?
>
> --
> Regards,
> Alf Stockton www.stockton.co.za
>
> Your boss is a few sandwiches short of a picnic.
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 11:24:04 von Alf C Stockton

Sascha Meyer wrote:
> Hi Alf,
>
> your local SQL Server is probably listening on another port ... perhaps you could try the following in a DOS prompt:
>
> netstat
>
> and
>
> netstat -n
>
> The first should give you all open local ports with descriptions to the port if a default port was used. The second will give you all open ports with port numbers instead of protocol names. This could help you check if your server is listening on another port.
>
The results of your above was/is:-

C:\Documents and Settings\alf>netstat

Active Connections

Proto Local Address Foreign Address State
TCP k9pad:1032 k9pad:1522 ESTABLISHED
TCP k9pad:1522 k9pad:1032 ESTABLISHED
TCP k9pad:1045 localhost:27015 ESTABLISHED
TCP k9pad:27015 localhost:1045 ESTABLISHED

C:\Documents and Settings\alf>netstat -n

Active Connections

Proto Local Address Foreign Address State
TCP 10.0.0.3:1032 10.0.0.3:1522 ESTABLISHED
TCP 10.0.0.3:1522 10.0.0.3:1032 ESTABLISHED
TCP 127.0.0.1:1045 127.0.0.1:27015 ESTABLISHED
TCP 127.0.0.1:27015 127.0.0.1:1045 ESTABLISHED

but I do not see mssql in either of those results?

--
Regards,
Alf Stockton www.stockton.co.za

The human race is a race of cowards; and I am not only marching in that
procession but carrying a banner.
-- Mark Twain

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 31.03.2009 16:33:07 von harlequin2

Hi Alf,

I just installed MSDE on my PC and I could connect locally with a
trusted connection, using shared memory Net-Library. When connecting
using hostname and port, the connection failed, because the server was
not listening on port 1433.

this will resolve your problem: if you install MSDE without giving the
parameter "DISABLENETWORKPROTOCOLS=0", only local access with the
Net-Library will be available. You can reactive the network protocols
through the client tool "svrnetcn" located in your MSSQL server's "binn"
directory and enabling "TCP/IP" (you can also define the used port with
this utiliy). Don't forget to restart your SQL Server service!

If you now run "netstat -an", you will find your server listening on
port 1433.

Regards, Sascha

Alf Stockton schrieb:
> Sascha Meyer wrote:
>> Hi Alf,
>>
>> your local SQL Server is probably listening on another port ...
>> perhaps you could try the following in a DOS prompt:
>>
>> netstat
>>
>> and
>> netstat -n
>>
>> The first should give you all open local ports with descriptions to
>> the port if a default port was used. The second will give you all
>> open ports with port numbers instead of protocol names. This could
>> help you check if your server is listening on another port.
>>
> The results of your above was/is:-
>
> C:\Documents and Settings\alf>netstat
>
> Active Connections
>
> Proto Local Address Foreign Address State
> TCP k9pad:1032 k9pad:1522 ESTABLISHED
> TCP k9pad:1522 k9pad:1032 ESTABLISHED
> TCP k9pad:1045 localhost:27015 ESTABLISHED
> TCP k9pad:27015 localhost:1045 ESTABLISHED
>
> C:\Documents and Settings\alf>netstat -n
>
> Active Connections
>
> Proto Local Address Foreign Address State
> TCP 10.0.0.3:1032 10.0.0.3:1522 ESTABLISHED
> TCP 10.0.0.3:1522 10.0.0.3:1032 ESTABLISHED
> TCP 127.0.0.1:1045 127.0.0.1:27015 ESTABLISHED
> TCP 127.0.0.1:27015 127.0.0.1:1045 ESTABLISHED
>
> but I do not see mssql in either of those results?
>


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 01.04.2009 11:48:49 von Alf C Stockton

Sascha Meyer wrote:
> Hi Alf,
>
> I just installed MSDE on my PC and I could connect locally with a
> trusted connection, using shared memory Net-Library. When connecting
> using hostname and port, the connection failed, because the server was
> not listening on port 1433.
>
> this will resolve your problem: if you install MSDE without giving the
> parameter "DISABLENETWORKPROTOCOLS=0", only local access with the
> Net-Library will be available. You can reactive the network protocols
> through the client tool "svrnetcn" located in your MSSQL server's "binn"
> directory and enabling "TCP/IP" (you can also define the used port with
> this utiliy). Don't forget to restart your SQL Server service!
>
> If you now run "netstat -an", you will find your server listening on
> port 1433.
I have not reinstalled MSDE but have done the svrnetcn you suggest where I
found 1433 listed as the TCP port but when I try netstat -an I get:-
C:\Documents and Settings\Alf Stockton>svrnetcn

C:\Documents and Settings\Alf Stockton>netstat -an

Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:990 0.0.0.0:0 LISTENING
TCP 0.0.0.0:2869 0.0.0.0:0 LISTENING
TCP 127.0.0.1:1026 0.0.0.0:0 LISTENING
TCP 127.0.0.1:1094 127.0.0.1:30606 ESTABLISHED
TCP 127.0.0.1:5152 0.0.0.0:0 LISTENING
TCP 127.0.0.1:5679 0.0.0.0:0 LISTENING
TCP 127.0.0.1:7438 0.0.0.0:0 LISTENING
TCP 127.0.0.1:30606 0.0.0.0:0 LISTENING
TCP 127.0.0.1:30606 127.0.0.1:1094 ESTABLISHED
TCP 192.168.30.192:139 0.0.0.0:0 LISTENING
TCP 192.168.30.192:1095 72.5.124.55:80 ESTABLISHED
UDP 0.0.0.0:445 *:*
UDP 0.0.0.0:500 *:*
UDP 0.0.0.0:1028 *:*
UDP 0.0.0.0:4500 *:*
UDP 127.0.0.1:123 *:*
UDP 127.0.0.1:1029 *:*
UDP 127.0.0.1:1900 *:*
UDP 192.168.30.192:123 *:*
UDP 192.168.30.192:137 *:*
UDP 192.168.30.192:138 *:*
UDP 192.168.30.192:1900 *:*

as you can see no 1433?
--
Regards,
Alf Stockton www.stockton.co.za

In the first place, God made idiots; this was for practice; then he made
school boards.
-- Mark Twain

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP connecting to MSSQL

am 02.04.2009 08:54:52 von harlequin2

Hi Alf,

Alf wrote:
> I have not reinstalled MSDE but have done the svrnetcn you suggest where I
> found 1433 listed as the TCP port but when I try netstat -an I get:-
> C:\Documents and Settings\Alf Stockton>svrnetcn
>
> C:\Documents and Settings\Alf Stockton>netstat -an

have you restarted the service MSSQLSERVER? If this does not work, try uninstalling and reinstalling MSDE with the given parameters. Don't worry, databases won't be deleted when uninstalling versions of MS SQL Server.

Regards, Sascha
--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php