Bug 70243

Summary: Mail pear classes not properly installed
Product: [Retired] Red Hat Linux Reporter: Need Real Name <martinc>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: georgeb
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-25 16:45:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Pear's mimePart.php class none

Description Need Real Name 2002-07-31 10:31:05 UTC
Description of problem:
When you try to use Mail pear classes to compose a mime mail, you will get the
following error: 
Fatal error: Failed opening required 'Mail/mimePart.php'
mimePart.php file it is not present!

How reproducible:

Steps to Reproduce:
1.Try the following exaple code, from pear website


$text = 'Text version of email';
$html = '<html><body>HTML version of email</body></html>';
$file = '/home/richard/example.php';
$crlf = "\r\n";
$hdrs = array(
              'From'    => 'you@yourdomain.com',
              'Subject' => 'Test mime message'

$mime = new Mail_mime($crlf);

$mime->addAttachment($file, 'text/plain');

$body = $mime->get();
$hdrs = $mime->headers($hdrs);

$mail =& Mail::factory('mail');
$mail->send('postmaster@localhost', $hdrs, $body);


Actual Results:  After testing code you will get the following error:
Fatal error: Failed opening required 'Mail/mimePart.php'

Expected Results:  sending a mime mail

Additional info:

#grep require_once  /usr/share/pear/Mail/mime.php
require_once 'PEAR.php';
require_once 'Mail/mimePart.php';

#ls /usr/share/pear/Mail
mime.php  RFC822.php  sendmail.php  smtp.php

Comment 1 Phil Copeland 2002-08-05 16:14:35 UTC
I think you'll find that if you edit the /etc/php.ini file and add in 

include_path = ".:/usr/share/pear"

That things will start working. Umm that said, I notice that Mail/mimePart.php
is missing in the 4.1.2 release but it's gone from the 4.2.2 downloadable release.

Comment 2 Phil Copeland 2002-08-05 16:15:32 UTC
Created attachment 68904 [details]
Pear's mimePart.php class

Comment 3 Phil Copeland 2002-08-05 16:17:31 UTC
Sigh, thers a few other files missing too

[root@alpha root]# ls /usr/share/pear/Mail
RFC822.php  sendmail.php  smtp.php

[root@alpha SPECS]# ls /usr/src/redhat/BUILD/php-4.1.2/pear/Mail/
mail.php        mimePart.php  RFC822.php    smtp.php   xmail.xsl
mimeDecode.php  mime.php      sendmail.php  xmail.dtd

I'll make an errata for this asap


Comment 4 George Barbarosie 2002-08-27 17:37:00 UTC
Hmm... I filed bug #72769 without seeing this errata closed bug. It seems that
php-4.1.2-7.3.4 still does not contain the mimePart.php file. Should one reopen
this bug and mark #72769 as a dup?

Comment 5 Phil Copeland 2002-08-27 18:47:09 UTC
*** Bug 72769 has been marked as a duplicate of this bug. ***

Comment 6 Joe Orton 2005-01-25 16:45:48 UTC
Thanks for the report.  This is a mass bug update; since this release
of Red Hat Linux is no longer supported, please either:

a) try and reproduce the bug with a supported version of Red Hat
Enterprise Linux or Fedora Core, and re-open this bug as appropriate
after changing the Product field, or,

b) if relevant, try and reproduce this bug using the current version
of the upstream package, and report the bug upstream.

c) report the bug to the Fedora Legacy project who may wish to
continue maintenance of this package.