php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3124 extra white space in copy() causes error
Submitted: 2000-01-06 17:05 UTC Modified: 2000-01-07 03:52 UTC
From: mstearne at entermix dot com Assigned:
Status: Closed Package: Parser error
PHP Version: Earlier? Upgrade first! OS: FreeBSD
Private report: No CVE-ID: None
 [2000-01-06 17:05 UTC] mstearne at entermix dot com
If there is extra white space in the copy function it will cause the function to break.  This happens on FreeBSD 2.?? and PHP 3.0.6 (I can't upgrade it), but does not happen on Linux 2.2.12-20 with PHP 3.0.12 so I don't know if it has been fixed or is platform specific.  

-------------------------------------------------------
$ABS_IMAGES_DIR=" /usr/www/users/XXXX/house/images/";
/// White space above before /usr/
$ImageFinal=$ABS_IMAGES_DIR.$new_file_name.$ImageExt;
copy($image, $ImageFinal);


Gets error:
Warning: Unable to create ' /usr/www/users/XXXX/house/images/1RIMG2.jpg': No such file or directory in
                          /usr/www/users/XXXX/db/menurent.php3 on line 306


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-07 03:52 UTC] thies at cvs dot php dot net
please specify the file-pathes the way you want them!

i don't think that  PHP 3.0.12  behaves any different in that aspect - 

if yes you have found a bug: copy() strips whitespace from filenames. (just  checked, it doesn't)



 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC