Re: PHP 4.0 Bug #3976: mysql_query produces warnings (fwd)

From: Date: Thu, 30 Mar 2000 18:00:57 +0000
Subject: Re: PHP 4.0 Bug #3976: mysql_query produces warnings (fwd)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-17425@lists.php.net to get a copy of this message
>>>>> "Andi" == Andi Gutmans <andi@zend.com> writes: Andi> Guys, Andi> Since we have incorporated the MySQL client library it seems like we have Andi> had a lot more problems with MySQL. Andi> People often have problems when using mod_auth_mysql (compiled against a Andi> different version of the MySQL client library) and mod_php with the same Andi> Apache server. Andi> I don't know what the exact problem these guys seem to be encountering but Andi> it seems that when they link against a different mysql client library Andi> things start working again. Andi> What do you guys think? Andi> Andi What kind problems do the get? Has anyone been able to reproduce this in any way? The only thing I can think of is the patch we made regarding SIGPIPE. Have you tried to not set the flag CLIENT_IGNORE_SIGPIPE when connecting to MySQL? Another option may be that apache doesn't seem to like when the libmysql library is compiled with thread support. Try to not define -DTHREAD and check if this helps! The last suggestion I have is to change mysql_init() as follows: (The creation of a sigpipe handler is was something that was removed when we made the MySQL library for PHP, and it may not have been a good idea): YSQL * STDCALL mysql_init(MYSQL *mysql) { mysql_once_init(); if (!mysql) { if (!(mysql=(MYSQL*) my_malloc(sizeof(*mysql),MYF(MY_WME | MY_ZEROFILL)))) return 0; mysql->free_me=1; mysql->net.vio = 0; } else bzero((char*) (mysql),sizeof(*(mysql))); #ifdef __WIN32__ mysql->options.connect_timeout=20; #endif #if defined(SIGPIPE) && defined(THREAD) if (!((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE)) (void) signal(SIGPIPE,pipe_sig_handler); #endif return mysql; } Have anyone been able to reproduce any problems with a standalone PHP script? Regards, Monty

« previous php.dev (#17425) next »