php-windows Digest 1 Apr 2009 09:49:02 -0000 Issue 3594
Topics (messages 29233 through 29239):
Re: PHP connecting to MSSQL
29233 by: Baboucarr Sanneh
29234 by: Baboucarr Sanneh
29235 by: Baboucarr Sanneh
29236 by: Baboucarr Sanneh
29237 by: Alf Stockton
29238 by: Sascha Meyer
29239 by: Alf Stockton
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
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" <a...@stockton.co.za>
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" <sanne...@hotmail.com>; "Sascha Meyer"
<harlequ...@gmx.de>; <php-wind...@lists.php.net>
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.
--- End Message ---
--- Begin Message ---
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" <a...@stockton.co.za>
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" <sanne...@hotmail.com>; "Sascha Meyer"
<harlequ...@gmx.de>; <php-wind...@lists.php.net>
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.
--- End Message ---
--- Begin Message ---
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" <a...@stockton.co.za>
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" <sanne...@hotmail.com>; "Sascha Meyer"
<harlequ...@gmx.de>; <php-wind...@lists.php.net>
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.
--- End Message ---
--- Begin Message ---
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" <a...@stockton.co.za>
Sent: Monday, March 30, 2009 3:16 PM
To: "Baboucarr Sanneh" <sanne...@hotmail.com>; "Sascha Meyer"
<harlequ...@gmx.de>; <php-wind...@lists.php.net>
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.
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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?
--- End Message ---
--- Begin Message ---
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
--- End Message ---