Closed (fixed)
Project:
Mail MIME
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Apr 2011 at 10:33 UTC
Updated:
11 Jun 2012 at 16:39 UTC
After installing mailmime 6.x-1.1 my testing site is unresponsive. The Apache error log states: "PHP Fatal error: require_once(): Failed opening required 'Mail/mime.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/mysite/sites/all/modules/mailmime/mailmime.inc on line 24". I needed to remove mailmime module from the file system in order to have this site back. The installation of mailmime was required by htmlmail upgrade, from 6.x-1.7 to 6.x-2.3.
Comments
Comment #1
pillarsdotnet commentedApparently your Apache configuration is not letting PHP scripts change the
include_path.Possible fixes:
Edit your php.ini file and remove
set_include_pathfrom thedisable_functionsdirective.Manually add
/var/www/mysite/sites/MYSITE/files/PEARto yourinclude_path, where/var/www/mysite/sites/MYSITE/is the path to your site settings directory. You should able to do this in your.htaccessfile, using thephp_valuedirective.Manually install Mail_Mime and its prerequisites. (This requires command-line root access).
Ask me nicely and I might package up a customized version of the PEAR libraries. I wouldn't be able to host it on drupal.org, though.
Comment #2
pillarsdotnet commentedComment #3
pillarsdotnet commentedComment #4
pillarsdotnet commentedThe 6.x-1.3/7.x-1.3 release now provides better error logic in hook_requirements(), and will warn if a file was downloaded but could not be read because the
set_include_path()function is disabled.Comment #5
pillarsdotnet commentedVersion bump. 6.x-1.3 had a syntax error, sigh.
Comment #6
jddeli commentedI dont have php.ini in my site.
How to remove set_include_path from the disable_functions directive?
How then i can use this module with HTML Mail?
Comment #7
pillarsdotnet commented@jddell -- dunno; I suggested four ways to solve the problem. If you don't know how to do any of the four, then ask your hosting provider. That's why you pay them money -- so they will support you. Also see #1119088: Make dependencies optional
Comment #8
esbon commentedHi I need to use this module, but it is changing the site's include_path to the files directory thus breaking all other includes. I read your four recommendations, but what I would need is for this module not change the include_path. Is there anything else I can do besides your recommendations above?
Thanks
Comment #9
pillarsdotnet commentedinclude_path. If you already have the requisite modules installed and they're already on the path, then you may simply delete both themailmime.installandmailmime.modulefiles.include_pathshouldn't be If it is, then something is very wrong with your configuration, and you should contact your hosting provider to get it fixed.Comment #10
pillarsdotnet commentedComment #11
esbon commentedThanks so much for your reply. Our php.ini is set to: .: I don’t know why that could be wrong, but this module is changing the site’s local include_path to: files/PEAR:.:
My whereis pear result is: /usr/share/pear
So what might work for us could be to disable the include function or change its path to /usr/share/pear I appreciate your help.
Comment #12
esbon commentedI also deleted the mailmine.install and mail.module, but this disabled the HTML module
Comment #13
pillarsdotnet commentedRecreate mailmime.module as an empty file.
Comment #14
pillarsdotnet commentedComment #15
esbon commentedI did recreate mailmime.module as an empty file, but the the whole site goes white and I can get this error:
Fatal error: require_once() [function.require]: Failed opening required 'Mail/mime.php' (include_path='.:') in /sites/default/modules/mailmime/mailmime.inc on line 24
thanks
Comment #16
pillarsdotnet commentedThen you don't have the required PEAR module installed. Either install it or ask your hosting provider to do so.
Comment #17
esbon commentedSince pear was installed and working, I ran: pear install Mail_Mime to install Mail_Mime and it is now working with an empty mailmime.module file
Thanks for your help!
Comment #18
pillarsdotnet commentedI will try to code the "Mail Mime" module so that it properly detects this kind of situation, disables itself, and displays a message instructing the user to manually install the pear package.
Comment #19
jddeli commentedMy hosting provider dont understand what you are write
Apparently your Apache configuration is not letting PHP scripts change the include_path.
Possible fixes:
•Edit your php.ini file and remove set_include_path from the disable_functions directive.
•Manually add /var/www/mysite/sites/MYSITE/files/PEAR to your include_path, where /var/www/mysite/sites/MYSITE/ is the path to your site settings directory. You shoud able to do this in your .htaccess file, using the php_value directive.
•Manually install Mail_Mime and its prerequisites. (This requires command-line root access).
pear install --onlyreqdeps Mail_Mime Mail_mimeDecode PEAR
•Ask me nicely and I might package up a customized version of the PEAR libraries. I wouldn't be able to host it on drupal.org, though.
Comment #20
esbon commentedIn reply to #18, I think this will make things a lot easier. Thanks very much for the time and effort to get this working.
Comment #21
pillarsdotnet commentedWriting (yet another!) module to handle this. It will most likely become a dependency of the next version of Mail MIME, which will in turn become much smaller.
EDIT: The new module will be called Include.
Comment #22
jddeli commentedI cant work html mail with Mail MIME there is not a guide to put pear in my site.
I have apatch php php my admin.
I want to use this module but there is not a guide how i can but pear in my site and what to i have to enter in pear
Comment #23
jddeli commentedMake the effort to but same guides
Comment #24
pillarsdotnet commentedFixed in the 7.x-2.0 release. Will roll a 6.x-2.0 release shortly.
Comment #25
pillarsdotnet commentedRelease 6.x-2.0 version which should fix this problem nicely. Anyone care to test?
Comment #26
pillarsdotnet commentedExtensively tested and fixed all errors I can find. The 2.x branch is now default, recommended, and supported. Let the complaining begin!
Comment #27
pillarsdotnet commentedOkay, 6.x-2.3 and 7.x-2.x no longer have a hard dependency on the Include module.
The new startup code looks something like this:
Comment #29
Quarath commentedDon't have access to any other solution - please could you elaborate how to do this? What exacly to add to .htaccess?