php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18967 base64_encode troubles
Submitted: 2002-08-19 13:05 UTC Modified: 2002-09-21 01:56 UTC
From: fxdc at wanadoo dot fr Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.1.2 OS: Linux pomerol 2.2.19 #8 SMP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fxdc at wanadoo dot fr
New email:
PHP Version: OS:

 

 [2002-08-19 13:05 UTC] fxdc at wanadoo dot fr
Hello sorry for my poor English.

My problem : I use base64_encode to encode a file for send by E-mail. I use the following code to find the problem.
$file=$name1;
$fp=fopen($file,"r");
$temoin="./temoin/".time();
$fq=fopen ($temoin,"w");
$attachmentorig=fread($fp,filesize($file));
$attachment=base64_encode($attachmentorig);
$controle= "file name :".$file."\r\n file size:".filesize($file)."\r\n file content:".$attachmentorig."\r\n file encoded :".$attachment.
fclose($fp);
fwrite ($fq,$controle);
fclose ($fq);
So sometimes, Name, size, file content are exactly the sames, but file encoded is different. Can you explain me please ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-19 17:23 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-09-21 01:56 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 12:01:30 2024 UTC