Bug #13477 Updated: gethostbyname() result broken if used same variable as argument

From: Date: Fri, 28 Sep 2001 12:01:24 +0000
Subject: Bug #13477 Updated: gethostbyname() result broken if used same variable as argument
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-66764@lists.php.net to get a copy of this message
ID: 13477 User updated by: khimich@ukr.net Reported By: khimich@ukr.net Old Status: Feedback Status: Closed Bug Type: Network related Operating System: FreeBSD 4.3 PHP Version: 4.0CVS-2001-09-28 New Comment: Seems that I can't reproduce this on simple scripts too. I've stable errors on my complex site. This script uses two nested functions with includes. In one include I'm used gethostname() and it broke my variable. So, I'm closing this bug, because I can't reproduce all of my code. Oleg Khimich. Previous Comments: ------------------------------------------------------------------------ [2001-09-28 07:46:29] derick@php.net Also tried it on php 4.0.8dev on FreeBSD 4.3. Works fine too. Derick ------------------------------------------------------------------------ [2001-09-28 07:02:40] derick@php.net I could not reproduce this with PHP 4.0.3/OpenBSD, PHP 4.0.6/Linux, PHP 4.0.7RC2/Linux or latest CVS/Linux... Can you please post the whole script, and possible can you show us the failing script on a webserver? Derick ------------------------------------------------------------------------ [2001-09-28 06:45:18] khimich@ukr.net This expression returns corrupted value: $host=gethostbyname($host); This variant is good: $temp=gethostbyname($host); $host=$temp; Even this: $host=$temp=gethostbyname($host); Return two corrupted values for $temp and $host Oleg Khimich. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13477&edit=1

« previous php.dev (#66764) next »