php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1122 wrong conversions when sending MIME messages
Submitted: 1999-02-06 13:20 UTC Modified: 1999-02-09 13:27 UTC
From: Michael dot Redinger at uibk dot ac dot at Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.6 OS: RedHat Linux 5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Michael dot Redinger at uibk dot ac dot at
New email:
PHP Version: OS:

 

 [1999-02-06 13:20 UTC] Michael dot Redinger at uibk dot ac dot at
I do use the PHP program IMP (IMAP mail reader). Whenever I try to send an attachment, Apache crashes with the following message:

[Sat Feb  6 19:06:51 1999] [notice] httpd: child pid 32082 exit signal Segmentation fault (11)


The file upload works correctly. The seg fault happens when actually sending the message (this behaviour is not quite reproducable - it always happens for me, but others don't have this problem).

After the crash, I do get a "document contains no data". The attachment that is sent anyways. But the conversions don't work - "\0" (one char) is translated into "\" and "0". Definitely wrong. The file gets bigger than it should be and is completely corrupted.


Update:
Fix below doesn't solve the problem.
I could stop apache from crashing by removing the unnecessary lines from http.conf (described in another bug report)
However, the problem with wrong binary conversions still remains.

Updated:
As suggested in the comments, disabling magic quotes did the job.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-02-09 13:27 UTC] Michael dot Redinger
This is caused by a bug in str_replace() in 3.0.6.  You can browse the changes to the functions/string.c file here:
http://cvs.php.net/cvsweb.cgi/functions/string.c.  Applying the 1.175/1.176 patches should fix this for you.
-------
I think this is related to the usage of magic_quotes_gpc. IMP does not stripslash the incoming data correctly and sends out wrong data. Try turning off magic_quotes_gpc and see if that helps.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 23:01:27 2024 UTC