ID: 8951 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Feedback Status: Closed Bug Type: MySQL related Assigned To: Comments: No feedback, works for me just fine. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-01-27 21:34:57] [EMAIL PROTECTED] Could you please try the latest snapshot from http://snaps.php.net/ to check if this is fixed already? --Jani --------------------------------------------------------------------------- [2001-01-27 12:46:46] [EMAIL PROTECTED] Parameter $host is modified in function php_mysql_do_connect(). Example: $host = "localhost:/tmp/mysql.sock"; $conn = mysql_connect($host ..... echo $host; Output is: localhost/tmp/mysql.sock because of replacing of ":" charcter by null char in this part of php_mysql_do_connect =================== static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) { char *user,*passwd,*host,*socket=NULL,*tmp; char *hashed_details; int hashed_details_length,port = MYSQL_PORT; .... /* We cannot use mysql_port anymore in windows, need to use * mysql_real_connect() to set the port. */ if (host && (tmp=strchr(host,':'))) { *tmp=0; tmp++; if (tmp[0] != '/') { port = atoi(tmp); } else { socket = tmp; } ..... } =================== solution: copying of *host content through *host2 pointer =================== static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) { char *user,*passwd,*host,*socket=NULL,*tmp,*host2; char *hashed_details; int hashed_details_length,port = MYSQL_PORT; .... /* We cannot use mysql_port anymore in windows, need to use * mysql_real_connect() to set the port. */ host2 = (char *) emalloc(strlen(SAFE_STRING(host) + 1)); strcpy(host2, host); host = host2; if (host && (tmp=strchr(host,':'))) { *tmp=0; tmp++; if (tmp[0] != '/') { port = atoi(tmp); } else { socket = tmp; } ... } --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8951&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]