Re: [PHP-DB] mysql_pconnect options

2009-01-15 Thread Chris

Kathy Mazur Worden wrote:
Thanks, I had been to that page and understood it to mean there are not 
2 options that would handle the "false, 2" part, but since 
mysql_pconnect works on one server with the options there has to be a 
way to get it working on another.


If you want to waste time doing that, I guess..

You know you're not setting client_flags to "2" here though right? It's 
being set to FALSE.


FALSE in the mysql_connect call is for "new_link". "2" is for the client 
flags - and you're better off using the constants defined so you don't 
have to go back and look at what you're setting.


Different php versions? What happens on the server that doesn't work? Do 
you get an error, do you get a segfault, something else ?


Do you have error_reporting(E_ALL) and ini_set('display_errors', true) 
set so you'd notice any problems/messages?



Just change the pconnect call to not include the "new_link" option.

--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP-DB] mysql_pconnect options

2009-01-15 Thread Kathy Mazur Worden
Thanks, I had been to that page and understood it to mean there are not 
2 options that would handle the "false, 2" part, but since 
mysql_pconnect works on one server with the options there has to be a 
way to get it working on another.



Chris wrote:

Kathy Mazur Worden wrote:

I'm setting up a webserver for failover on Linux/Apache and am running
into problems getting mysql_pconnect to work.  The primary webserver
(also Linux/Apache) connects to the local MySQL server using:

$Conn = mysql_pconnect("localhost", "user", "password", false, 2) or
die("Could not connect : " . mysql_error());


RTM (http://au2.php.net/mysql_pconnect).

The syntax is different to mysql_connect.

resource mysql_pconnect  ([ string $server  [, string $username  [, 
string $password  [, int $client_flags   )


After the password, there are client flags and nothing else ("new 
link" has no meaning with pconnect).




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



Re: [PHP-DB] mysql_pconnect options

2009-01-15 Thread Chris

Kathy Mazur Worden wrote:

I'm setting up a webserver for failover on Linux/Apache and am running
into problems getting mysql_pconnect to work.  The primary webserver
(also Linux/Apache) connects to the local MySQL server using:

$Conn = mysql_pconnect("localhost", "user", "password", false, 2) or
die("Could not connect : " . mysql_error());


RTM (http://au2.php.net/mysql_pconnect).

The syntax is different to mysql_connect.

resource mysql_pconnect  ([ string $server  [, string $username  [, 
string $password  [, int $client_flags   )


After the password, there are client flags and nothing else ("new link" 
has no meaning with pconnect).


--
Postgresql & php tutorials
http://www.designmagick.com/


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