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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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.
 [2024-12-30 13:02 UTC] git@php.net
Automatic comment on behalf of sy-records (author) and web-flow (committer)
Revision: https://github.com/php/web-php/commit/a3dd12141762060f401dd935bc59022c45bde051
Log: Fix loadIndexWithFallback failed (#1193)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 14:01:27 2025 UTC