Reference: #1941668: Include module unable to download mimeDecode.php
I am unable to download the files using the Include module. I used the following steps to reproduce the issue:
drush dl include mailmime
drush en -y include
drush en -y mailmime
Then I refreshed my browser window and the following appeared as notice messages:
- Created include Mail/mime.php.
- Created include Mail/mimePart.php.
and the following as errors:
- Error downloading (http://svn.php.net/repository/pear/packages/Mail_mimeDecode/trunk/Mail/m...): Forbidden
- One or more of the required PEAR classes could not be loaded:
The Mail MIME module has been disabled to avoid further errors. Please satisfy the module requirements listed in the documentation, then visit your Modules page to re-enable the Mail MIME module.
- The Include module tried to automatically download the required files, but the attempt failed. You may retry the download by re-enabling the Mail MIME module. If your hosting provider has disabled the
set_include_pathdirective, the files must be manually installed.
After debugging some code in the Include module it would appear the svn.php.net is blocking requests matching Drupal's user agent. Drupal makes this request to svn.php.net:
GET /repository/pear/packages/Mail_mimeDecode/trunk/Mail/mimeDecode.php HTTP/1.0
User-Agent: Drupal (+http://drupal.org/)
Host: svn.php.netWhich fails with a HTTP forbidden notice. However, taking my machine's Chrome user agent works just fine:
GET /repository/pear/packages/Mail_mimeDecode/trunk/Mail/mimeDecode.php HTTP/1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
Host: svn.php.net
Comments
Comment #1
salvisThank you — I've submitted a bug report to php.net.
Comment #2
salvisBased on the feedback I got on php.net, this is not going to work anymore, and I've opened #2298121: php.net is blocking the Drupal client -- cannot retrieve PEAR files in the Include module queue.
Nevertheless, I think the version of mimeDecode.php from the svn repository (http://svn.php.net/repository/pear/packages/Mail_mimeDecode/trunk/Mail/m...) is the most recent one by far (timestamp Tue Oct 15 04:59:59 2013 UTC), and the one to use. The version on GitHub is much older.
Have you tried the PEAR approach? What versions does that give you?
Where does the Include module put the files?
You can't be quite sure what you get, but I guess our best bet would be to manually download the files from
https://github.com/pear/Mail_Mime/tree/master/Mail and
http://svn.php.net/viewvc/pear/packages/Mail_mimeDecode/trunk/Mail/
and put them there.
Comment #3
stewart.adam commentedWow, I went over the PHP thread and think they're being a bit rude and strongheaded.
I agree, given their response it looks like the best course of action is to update documentation (instruct users to download manually) and forgo Include module support.