Re: [PHP-DB] Re: PHP - MsSQL - DB error connect failed - mssql_pconnect?

2004-01-21 Thread Robert Twitty
mssql_pconnect() may add to problem of too many connections.  The reason
is because the persistent connection is associated with the Apache child
process and not the script.  This is significant because you are not
guaranteed to be served by the same child everytime the script is invoked.
Thus, over an extendend period of operation, the result will be a
persistently open connection for each active Apache child process.

-- bob

t
On Wed, 21 Jan 2004, Alain [iso-8859-15] Barthélemy wrote:

 Le mercredi 21 janvier 2004, 13:55:26 ou environ Alain Barthélemy [EMAIL 
 PROTECTED] a écrit:

 Still another question in my (desperate?) trials to connect to a MsSQL-2000
 Server from a Linux host.

 I don't work usually with MsSQL but no choice at work. Still problems to have a
 connections. I went to see the SQL-server administrator and she found that the
 same person had 4 connections to the server (and not having 4 jobs at the same
 time). The server is quickly saturated (undersized) and I suppose that the
 mssql_connect() request of my PHP script is just ignored because there is no
 place left (bad configuration of the MsSQL server?).

 Now I wonder if it would be possible to keep a stable connection with
 mssql_pconnect()?

 Can anybody enlighten me?

 --
 Alain Barthélemy
 [EMAIL PROTECTED]
 http://bartydeux.be
 Linux User #315631

 --
 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: [PHP-DB] Re: PHP - MsSQL - DB error connect failed - mssql_pconnect?

2004-01-21 Thread Alain Barthlemy
Le mercredi 21 janvier 2004, 13:07:24 ou environ Robert Twitty [EMAIL PROTECTED] a 
écrit:
 mssql_pconnect() may add to problem of too many connections.  The reason
 is because the persistent connection is associated with the Apache child
 process and not the script.  This is significant because you are not
 guaranteed to be served by the same child everytime the script is invoked.
 Thus, over an extendend period of operation, the result will be a
 persistently open connection for each active Apache child process.
 
 -- bob

Thank you for this explanation. That is well what I supposed. I guess the other
MsSQL clients (Windows) are doing something like a permanent connection. I
can't force my way through with my Linux/PHP host. I secretly hoped that
mssql_pconnect would allow me to have a materially permanent connection and
prevent anybody to take my place. Well! It was just a hope. I hoped too to
launch plenty of permanent connections and prevent the others to connect in
order to force the administrator to think how to solve the problem if there was
a way to solve it. I must say I am doing a development work of connection of a
Linux server with Apache/PHP to a MsSQL-2000 server in an environment dominated
by Windows/IIS/ASP. IIS/ASP are for me a pain in the ass (I respect the others
with another opinion) but I have to understand very well the inner working of
the MsSQL server without having access to the configuration of it (personnaly I
don't think the administrator understands it which is another problem). Thus
any hint is welcome.

Thank you again.

Alain 

 
 t
 On Wed, 21 Jan 2004, Alain [iso-8859-15] Barthélemy wrote:
 
  Le mercredi 21 janvier 2004, 13:55:26 ou environ Alain Barthélemy [EMAIL 
  PROTECTED] a écrit:
 
  Still another question in my (desperate?) trials to connect to a MsSQL-2000
  Server from a Linux host.
 
  I don't work usually with MsSQL but no choice at work. Still problems to have a
  connections. I went to see the SQL-server administrator and she found that the
  same person had 4 connections to the server (and not having 4 jobs at the same
  time). The server is quickly saturated (undersized) and I suppose that the
  mssql_connect() request of my PHP script is just ignored because there is no
  place left (bad configuration of the MsSQL server?).
 
  Now I wonder if it would be possible to keep a stable connection with
  mssql_pconnect()?
 
  Can anybody enlighten me?
 
  --
  Alain Barthélemy
  [EMAIL PROTECTED]
  http://bartydeux.be
  Linux User #315631
 
  --
  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
 
 ###
 This message has been checked against known virusses and was found to be virus-free.
 Dit bericht werd gecontroleerd op bekende virussen en werd virusvrij bevonden
 Ce message a été vérifié et est certifié exempt de virus connus.
 
 Scientific Institute of Public Health, J.Wytsmanstreet 14, B-1050 Brussels, Belgium
 Wetenschappelijk Instituut Volksgezondheid, J.Wytsmanstraat 14, B-1050 Brussel, 
 België
 Institut scientifique de santé Publique, 14 rue J.Wytsman, B-1050 Bruxelles, Belgique
 Visit our website: http://www.iph.fgov.be
 Tel: +32 2 642 51 11   Fax: +32 2 642 50 01
 ###

-- 
Alain Barthélemy
[EMAIL PROTECTED]
http://bartydeux.be
Linux User #315631

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



Re: [PHP-DB] Re: PHP MSSQL

2003-08-14 Thread jeffrey_n_Dyke

personally, i had luck with the statement below, but have sent it to others
in the past and they had varying results.  but give this a shot at the top
of your page that your PHP code is running on.


mssql_query(set textsize 65536);

hth
Jeff


   
 
  Adam Presley   
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   
  m   cc: 
 
   Subject:  [PHP-DB] Re: PHP  MSSQL  
 
  08/11/2003 10:26 
 
  AM   
 
   
 
   
 




I know what you're going through here. In MS SQL you can define a VARCHAR
up
to about 8000 characters, but your PHP mssql_query command only returns 255
(0 - 254) characters. I then tried using the TEXT datatype. TEXT datatype
in
MS SQL allows somewhere around 2 billion characters. However, the PHP
mssql_query command only returns 4096 characters every time. This appear to
be a limitation of the PHP MSSQL commands.


Shaun Bentley [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi
 I am currently trying to use PHP and MSSQL together but I am having a
 few problems.

 I can enter data into the Db OK, but when pulling the data back to
display
 on the page, the string cuts to around 250 chars. The Db field is VarChar
 6000 and I can see the whole data in the field.

 I have tried pulling the data out as object, array  row but always lose
the
 end.

 Any help please!

 Shaun





--
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: [PHP-DB] Re: PHP MSSQL

2003-08-14 Thread Robert Twitty
I believe this is only applicable to fields of type text.  It may have
no effect on varchar(255) fields.  The purpose of this statement is to
limit the amount of memory allocated by the driver for text data. If it is
not specified, the driver will try to allocate 2GB of memory.  The
extension sets this value to 4096 by default.

-- bob

On Mon, 11 Aug 2003 [EMAIL PROTECTED] wrote:


 personally, i had luck with the statement below, but have sent it to others
 in the past and they had varying results.  but give this a shot at the top
 of your page that your PHP code is running on.


 mssql_query(set textsize 65536);

 hth
 Jeff



   Adam Presley
   [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   m   cc:
Subject:  [PHP-DB] Re: PHP  MSSQL
   08/11/2003 10:26
   AM






 I know what you're going through here. In MS SQL you can define a VARCHAR
 up
 to about 8000 characters, but your PHP mssql_query command only returns 255
 (0 - 254) characters. I then tried using the TEXT datatype. TEXT datatype
 in
 MS SQL allows somewhere around 2 billion characters. However, the PHP
 mssql_query command only returns 4096 characters every time. This appear to
 be a limitation of the PHP MSSQL commands.


 Shaun Bentley [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi
  I am currently trying to use PHP and MSSQL together but I am having a
  few problems.
 
  I can enter data into the Db OK, but when pulling the data back to
 display
  on the page, the string cuts to around 250 chars. The Db field is VarChar
  6000 and I can see the whole data in the field.
 
  I have tried pulling the data out as object, array  row but always lose
 the
  end.
 
  Any help please!
 
  Shaun
 
 



 --
 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




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