php-windows Digest 16 Nov 2005 02:26:37 -0000 Issue 2825

Topics (messages 26483 through 26491):

php & VoIP
        26483 by: buxalex\.libero\.it

Re: mssql tcp
        26484 by: Joakim Ling
        26486 by: Alf Stockton
        26487 by: Frank M. Kromann
        26490 by: Joakim Ling

ÍøÂçÉÌ»úÄÜÓ봫ͳÉÌ»ú½áºÏÆðÀ´Âð?BA188,ÉÏÍø±ðÍüÁËÎÒ
        26485 by: epbdrgd4

Re: Install trouble - PHP & MS SQL
        26488 by: G. Eggold
        26491 by: Armando

PECL PDO on WIN32. Problems with PDO_PARAM* constants
        26489 by: Leonardo Javier Belén

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hello,

I wrote an application for VoIP where the IP addresses are retrieved through 
some PHP scripts as well as all the mysql db updates;  it works fine until the 
clients are connected to internet with a public IP address. As soon as a call 
is made to a client that is behind a NAT the connection fails because the real 
IP address (Private one) is not available. To reach this IP I need to send an 
UDP message to a IP address. I think I should use the sockets, but I have no 
knowledge about it. there is anyone that can help me? may be some manual or 
documentation or script?

Thanks in advance
Alessandro

--- End Message ---
--- Begin Message ---
It doesn't matter, the problem lies within php. To solve this problem you have 
to use a client that usage pooling like ODBC -> MSSQL. So my next step is to 
rewrite all mssql code to ODBC.

This is not a problem if you run a small mssql server, buy if you have over 100 
databases with a lot of activity windows starts to act really strange because 
of a bug in php. (read more in Zend forum)

But who works with php and mssql? :-) (except me)

//Jocke

-----Ursprungligt meddelande-----
Från: Robert Twitty [mailto:[EMAIL PROTECTED] 
Skickat: den 15 november 2005 14:20
Till: Joakim Ling
Kopia: php windows
Ämne: Re: [PHP-WIN] mssql tcp

Are you using mssql_pconnect() to connect to the database?

-- bob

On Mon, 14 Nov 2005, Joakim Ling wrote:

> Hi
>
>
>
> When I connect to my MSSQL server (internal) with mssql_connect, make a
> few queries etc and then close the connection link. It creates a TCP
> connection each time (for every query). I'm running Win 2003 STD, IIS6,
> PHP5, MSSQL2000. The problem is that the connection doesn't close
> correctly so after a few minutes I will have a lot of TCP connections
> that looks like this:
>
>
>
> (With "netstat -ap tcp")
>
>   TCP    w1new:22953            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22954            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22955            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22956            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22957            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22958            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22959            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22960            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22961            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22962            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22963            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22964            w1new:ms-sql-s         TIME_WAIT
>
>   TCP    w1new:22965            w1new:ms-sql-s         TIME_WAIT
>
>
>
> After rebooting and running a few minutes the list is full and Windows
> begins to act really strange, not so strange when mssql has more then
> 10000 TIME_WAIT connections waiting to close, but how to close them????
> mssql_close(); has no effect to this problem.
>
>
>
> I changed the TCPTimeWaitDelay value to 30 in regedit to increase
> connections, but still a huge problem. Anyone experience this before or
> knows if converting to ODBC would work better?
>
>
>
>
>
> Best regards
>
> Joakim Ling
>
>

--- End Message ---
--- Begin Message ---
Joakim Ling wrote:
It doesn't matter, the problem lies within php. To solve this problem you have to 
use a client that usage pooling like ODBC -> MSSQL. So my next step is to 
rewrite all mssql code to ODBC.

This is not a problem if you run a small mssql server, buy if you have over 100 
databases with a lot of activity windows starts to act really strange because 
of a bug in php. (read more in Zend forum)

But who works with php and mssql? :-) (except me)

And I.......:-(
--

Regards,
Alf Stockton            www.stockton.co.za

Linux 2.6.12-9-386

Good night to spend with family, but avoid arguments with your mate's
new lover.

My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message ---
Hi Jocke,

Well I work with PHP and MSSQL and I know a bit about the broblems too.
The library used to build the extension (msdblib) is not thread safe so if
you are using the extension on a hight trafic server under Apache or ISAPI
you might find odd problems. This has nothing to do with PHP. Using it
under CGI or FastCGI will remove all these problems.

Another solution would be to use the mssql extension with another library.
FreeTDS is providing an exelent replacement for msdblib. Look at
http://kromann.info/php.php. The download site on the right hand side
include this extension. It's called php_dblib.dll and it's a drop-in
replacement for php_mssql.dll. No recoding required.

- Frank


> It doesn't matter, the problem lies within php. To solve this problem
you have to use a client that usage pooling like ODBC -> MSSQL. So my next
step is to rewrite all mssql code to ODBC.
> 
> This is not a problem if you run a small mssql server, buy if you have
over 100 databases with a lot of activity windows starts to act really
strange because of a bug in php. (read more in Zend forum)
> 
> But who works with php and mssql? :-) (except me)
> 
> //Jocke
> 
> -----Ursprungligt meddelande-----
> Från: Robert Twitty [mailto:[EMAIL PROTECTED] 
> Skickat: den 15 november 2005 14:20
> Till: Joakim Ling
> Kopia: php windows
> Ämne: Re: [PHP-WIN] mssql tcp
> 
> Are you using mssql_pconnect() to connect to the database?
> 
> -- bob
> 
> On Mon, 14 Nov 2005, Joakim Ling wrote:
> 
> > Hi
> >
> >
> >
> > When I connect to my MSSQL server (internal) with mssql_connect, make
a
> > few queries etc and then close the connection link. It creates a TCP
> > connection each time (for every query). I'm running Win 2003 STD,
IIS6,
> > PHP5, MSSQL2000. The problem is that the connection doesn't close
> > correctly so after a few minutes I will have a lot of TCP connections
> > that looks like this:
> >
> >
> >
> > (With "netstat -ap tcp")
> >
> >   TCP    w1new:22953            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22954            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22955            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22956            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22957            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22958            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22959            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22960            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22961            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22962            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22963            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22964            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22965            w1new:ms-sql-s         TIME_WAIT
> >
> >
> >
> > After rebooting and running a few minutes the list is full and
Windows
> > begins to act really strange, not so strange when mssql has more then
> > 10000 TIME_WAIT connections waiting to close, but how to close
them????
> > mssql_close(); has no effect to this problem.
> >
> >
> >
> > I changed the TCPTimeWaitDelay value to 30 in regedit to increase
> > connections, but still a huge problem. Anyone experience this before
or
> > knows if converting to ODBC would work better?
> >
> >
> >
> >
> >
> > Best regards
> >
> > Joakim Ling
> >
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Hi

Interesting, so if I swap mssql library to FreeTDS (never heard of this before) 
my socket problem will disappear without changing the code?

Do I have to change from ISAPI (IIS6) to CGI?

// jocke


-----Ursprungligt meddelande-----
Från: Frank M. Kromann [mailto:[EMAIL PROTECTED] 
Skickat: den 15 november 2005 17:23
Till: Joakim Ling
Kopia: php windows; Robert Twitty
Ämne: Re: SV: [PHP-WIN] mssql tcp

Hi Jocke,

Well I work with PHP and MSSQL and I know a bit about the broblems too.
The library used to build the extension (msdblib) is not thread safe so if
you are using the extension on a hight trafic server under Apache or ISAPI
you might find odd problems. This has nothing to do with PHP. Using it
under CGI or FastCGI will remove all these problems.

Another solution would be to use the mssql extension with another library.
FreeTDS is providing an exelent replacement for msdblib. Look at
http://kromann.info/php.php. The download site on the right hand side
include this extension. It's called php_dblib.dll and it's a drop-in
replacement for php_mssql.dll. No recoding required.

- Frank


> It doesn't matter, the problem lies within php. To solve this problem
you have to use a client that usage pooling like ODBC -> MSSQL. So my next
step is to rewrite all mssql code to ODBC.
> 
> This is not a problem if you run a small mssql server, buy if you have
over 100 databases with a lot of activity windows starts to act really
strange because of a bug in php. (read more in Zend forum)
> 
> But who works with php and mssql? :-) (except me)
> 
> //Jocke
> 
> -----Ursprungligt meddelande-----
> Från: Robert Twitty [mailto:[EMAIL PROTECTED] 
> Skickat: den 15 november 2005 14:20
> Till: Joakim Ling
> Kopia: php windows
> Ämne: Re: [PHP-WIN] mssql tcp
> 
> Are you using mssql_pconnect() to connect to the database?
> 
> -- bob
> 
> On Mon, 14 Nov 2005, Joakim Ling wrote:
> 
> > Hi
> >
> >
> >
> > When I connect to my MSSQL server (internal) with mssql_connect, make
a
> > few queries etc and then close the connection link. It creates a TCP
> > connection each time (for every query). I'm running Win 2003 STD,
IIS6,
> > PHP5, MSSQL2000. The problem is that the connection doesn't close
> > correctly so after a few minutes I will have a lot of TCP connections
> > that looks like this:
> >
> >
> >
> > (With "netstat -ap tcp")
> >
> >   TCP    w1new:22953            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22954            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22955            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22956            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22957            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22958            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22959            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22960            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22961            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22962            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22963            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22964            w1new:ms-sql-s         TIME_WAIT
> >
> >   TCP    w1new:22965            w1new:ms-sql-s         TIME_WAIT
> >
> >
> >
> > After rebooting and running a few minutes the list is full and
Windows
> > begins to act really strange, not so strange when mssql has more then
> > 10000 TIME_WAIT connections waiting to close, but how to close
them????
> > mssql_close(); has no effect to this problem.
> >
> >
> >
> > I changed the TCPTimeWaitDelay value to 30 in regedit to increase
> > connections, but still a huge problem. Anyone experience this before
or
> > knows if converting to ODBC would work better?
> >
> >
> >
> >
> >
> > Best regards
> >
> > Joakim Ling
> >
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Title: 网络商机能与传统商机结合起来吗?BA188,上网别忘了我

网络商机能与传统商机结合起来吗?思想有多远,行动有多远。

Ba188网站为庞大的创业人群(特别是中小创业者)提供各色创业项目、创业指导、自助创业平台等全面的创业需求服务,为广大的招商、加盟、连锁企业和机构提供丰富的网络服务及产品推广;

  5000家企业的最新最快、最有价值的创业信息
  餐饮/ 服饰/ 美容健身/ 医疗/ 家饰/ 数码/ 日用/ 汽车/ 科教及娱乐等行业
  强大的商机阵容、实时、高效
  最丰富、最满意的创业资源
  希望有一天你的财源能babbaba......
  还能加入网吧联盟、特色MM视频聊天、音乐放送。
    看看我们是怎么做到的
    
http://www.ba188.com 


--- End Message ---
--- Begin Message ---
If it's any consolation, I'm having the same issue.  In my case, I can't
seem to get PHP5 to talk to either MySQL or MS SQL by following all the
documentation I've been able to get my hands on.

See my post from 11/5 entitled: Re: [PHP-WIN] PHP 5.0 and MySQL Support

One note: when you execute the "phpinfo()" function, do YOU see an MS SQL
section appear?

I'll be watching to see if anyone can step up to the plate on this one.

""Jim McDonald"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> MS SQL "database type" not supported
>
> --------------------------------------------------------------------------
------
>
> I can't get MS SQL supported in my PHP installation.
>
> I've just installed PHP BB (and I have tried their forums) and want to use
> MS SQL, here's my setup
>
> MS Win 2K SP4
> Apache 2.0.50 with OpenSSL v 0.9.7d
> MS SQL 2000 SP3
> PHP 5.0.5
> PHP BB 2.0.18
>
> Apache has been running for some time serving other live sites (with MS
SQL
> integration) - no trouble there. I've done an install of PHP (1st & fresh)
> onto the above, which tested fine with a simple test page.
>
> I have looked at the php.ini (based upon php.ini-recommended) file and
> (thanks to a posting on a forum) tried a few settings (like changing
> "mssql.secure_connection" from "off" to "on")
>
> I have copied all the DLL's to the same directory that holds PHP.exe (to
be
> sure) and this is in windows PATH variable of course.
>
> I have uncommented the extension=php_mssql.dll as well of course.
>
> Elsewhere, ppl have mentioned having MS SQL Client tools installed, which
I
> have.
>
> And, just in case it occurs to anyway, I have restarted Apache after
> changes.
>
> As a complete noob to PHP and PHP BB I've now run out of ideas, although
I'm
> sure it's a simple solution of getting the settings right.
>
> I'd appreciate someone letting me know what the php.ini settings should be
> (and if necc, and changes to httpd.conf) I should be doing.
>
> Thanks in advance.

--- End Message ---
--- Begin Message --- Can't speak to MSSQL but getting PHP to talk to MySQL is not so difficult. However, one thing I would recommend is putting your DLLs in the actual Windows system directory rather than in the PHP directory and relying on the PATH variable. I found that even having the PHP dir in the PATH and having my libmysql.dll file in there, it still didn't work properly. As soon as I dropped libmysql.dll into the Windows/system32 directory, everything was peachy keen.

G. - What version of MySQL are you trying to get PHP to talk to? I just upgraded my MySQL servers to 5 from 4.0.2x the other night and ended up having to upgrade from PHP 5.0.1 to 5.0.5 before it would talk to the MySQL server properly. All is running smooth again though, and I am mighty happy with them thus far. Cheers.

Armando

G. Eggold wrote:
If it's any consolation, I'm having the same issue.  In my case, I can't
seem to get PHP5 to talk to either MySQL or MS SQL by following all the
documentation I've been able to get my hands on.

See my post from 11/5 entitled: Re: [PHP-WIN] PHP 5.0 and MySQL Support

One note: when you execute the "phpinfo()" function, do YOU see an MS SQL
section appear?

I'll be watching to see if anyone can step up to the plate on this one.

""Jim McDonald"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

MS SQL "database type" not supported

--------------------------------------------------------------------------

------

I can't get MS SQL supported in my PHP installation.

I've just installed PHP BB (and I have tried their forums) and want to use
MS SQL, here's my setup

MS Win 2K SP4
Apache 2.0.50 with OpenSSL v 0.9.7d
MS SQL 2000 SP3
PHP 5.0.5
PHP BB 2.0.18

Apache has been running for some time serving other live sites (with MS

SQL

integration) - no trouble there. I've done an install of PHP (1st & fresh)
onto the above, which tested fine with a simple test page.

I have looked at the php.ini (based upon php.ini-recommended) file and
(thanks to a posting on a forum) tried a few settings (like changing
"mssql.secure_connection" from "off" to "on")

I have copied all the DLL's to the same directory that holds PHP.exe (to

be

sure) and this is in windows PATH variable of course.

I have uncommented the extension=php_mssql.dll as well of course.

Elsewhere, ppl have mentioned having MS SQL Client tools installed, which

I

have.

And, just in case it occurs to anyway, I have restarted Apache after
changes.

As a complete noob to PHP and PHP BB I've now run out of ideas, although

I'm

sure it's a simple solution of getting the settings right.

I'd appreciate someone letting me know what the php.ini settings should be
(and if necc, and changes to httpd.conf) I should be doing.

Thanks in advance.



--- End Message ---
--- Begin Message ---
Dear all, 
    I am not able to get the value of the PDO_PARAM*  constants. Instead of the 
value I get the plain string. 
I am using PHP 5.0.5 on Win2000 with APACHE, and the php_pdo.dll from the 
pecl.php.net. 
I searched on the mailing lists and the php documentation but noone seems to 
have faced the same problem, so I am lost. 

Thanks in advance. 

--- End Message ---

Reply via email to