Bug #18013 Updated: Local variable losing value

From: Date: Thu, 27 Jun 2002 23:00:26 +0000
Subject: Bug #18013 Updated: Local variable losing value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12271@lists.php.net to get a copy of this message
ID: 18013 Updated by: rasmus@php.net Reported By: miguel@ipatimup.pt Status: Bogus Bug Type: Variables related Operating System: Linux 2.2.16 - Suse 7.x PHP Version: 4.2.1 New Comment: Are you sure you are using PHP 4.2.1? There was a bug once upon a time where basename() corrupted the source string. You could try upgrading to a newer version of PHP. Previous Comments: ------------------------------------------------------------------------ [2002-06-27 18:45:09] sniper@php.net Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-06-27 12:46:02] miguel@ipatimup.pt I, >Your example code prints out: >BEFORE:temp_file_path=/home/mnuc/x/1234.IMG.gz >interfile_final_path=/home/mnuc/1234.IMG.gz >AFTER: temp_file_path=/home/mnuc/x/1234.IMG.gz >interfile_final_path=/home/mnuc/1234.IMG.gz >Looks right to me. How do you get the right output? The output you have got is the right output. On my PHP i got: BEFORE:temp_file_path=/home/mnuc/x/1234.IMG.gz interfile_final_path=/home/mnuc/1234.IMG.gz AFTER: temp_file_path=/home/mnuc/x/1234 interfile_final_path=/home/mnuc/1234.IMG.gz How can this be possible? Does any one have any solution, tip? Thank's ------------------------------------------------------------------------ [2002-06-27 11:51:41] rasmus@php.net Your example code prints out: BEFORE:temp_file_path=/home/mnuc/x/1234.IMG.gz interfile_final_path=/home/mnuc/1234.IMG.gz AFTER: temp_file_path=/home/mnuc/x/1234.IMG.gz interfile_final_path=/home/mnuc/1234.IMG.gz Looks right to me. ------------------------------------------------------------------------ [2002-06-27 07:55:34] miguel@ipatimup.pt I, here are the requested lines: $temp_file_path = "/home/mnuc/x/1234.IMG.gz"; $interfile_final_path = "/home/mnuc/1234.IMG.gz"; $full_file_path = $temp_file_path; printf("<P>BEFORE:temp_file_path=%s<BR>interfile_final_path=%s</P>", $temp_file_path,$interfile_final_path ); $ficheiro_nome = basename( $full_file_path, ".IMG.gz"); printf("<P>AFTER: temp_file_path=%s<BR>interfile_final_path=%s</P>", $temp_file_path,$interfile_final_path ); die(); Regards, Miguel ------------------------------------------------------------------------ [2002-06-27 07:32:48] sander@php.net Can you provide a _simple_ and _selfcontained_ sample script, say about 5 lines long, so we can play with it a little? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18013 -- Edit this bug report at http://bugs.php.net/?id=18013&edit=1

« previous php.bugs (#12271) next »