Bug 70243 - Mail pear classes not properly installed
Summary: Mail pear classes not properly installed
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php
Version: 7.3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
: 72769 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2002-07-31 10:31 UTC by Need Real Name
Modified: 2007-04-18 16:44 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2005-01-25 16:45:48 UTC

Attachments (Terms of Use)
Pear's mimePart.php class (10.57 KB, patch)
2002-08-05 16:15 UTC, Phil Copeland
no flags Details | Diff

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.

Note You need to log in before you can comment on or make changes to this bug.