Bug #18013 Updated: Local variable losing value
| From: | miguel at ipatimup dot pt | Date: | Fri, 28 Jun 2002 10:23:56 +0000 |
| Subject: | Bug #18013 Updated: Local variable losing value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12393@lists.php.net to get a copy of this message | ||
ID: 18013
Updated by: miguel@ipatimup.pt
Reported By: miguel@ipatimup.pt
-Status: Bogus
+Status: Closed
Bug Type: Variables related
Operating System: Linux 2.2.16 - Suse 7.x
PHP Version: 4.2.1
New Comment:
I, sorry, but the fault was mine.
I have reported to have PHP 4.2.1, but i have PHP 4.1.2.
Thanks
Previous Comments:
------------------------------------------------------------------------
[2002-06-27 19:00:26] rasmus@php.net
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.
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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