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: Always Steps to Reproduce: 1.Try the following exaple code, from pear website (http://pear.php.net/manual/en/core.mail.mime.php) <?php include('Mail.php'); include('Mail/mime.php'); $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', 'Subject' => 'Test mime message' ); $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $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
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.
Created attachment 68904 [details] Pear's mimePart.php class
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 Phil =--=
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?
*** Bug 72769 has been marked as a duplicate of this bug. ***
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.