get_headers() error
| Project: | RSS Remote Enclosure |
| Version: | 5.x-0.2-beta |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | ewlloyd |
| Status: | closed |
Jump to:
Just tried installing this module. I've been waiting for a mod like this for a long time as I've been using a lot of hack's and workarounds to do A/V podcasts.
I have a couple of issues running this mod on Drupal 5.1:
1. Here is the error I get when I try to submit
Fatal error: Call to undefined function: get_headers() in /home/mysite/public_html/modules/encl_remote/encl_remote.module on line 239
Marked this issue as critical because it seems to make this mod unusable.
2. What exactly has to be inputted for the MIME type field? Anything I try seems to get the red tape (.mp3, mp3). Also I don't know if it allows for m4v but I think that should be supported if it is not already.
I can't wait to use this module, many thanks for creating it!

#1
Thanks for your input! I've split your MIME types discussion into a separate issue. As for get_headers():
The get_headers() function is specific to PHP 5. I used it to avoid slurping the entire file down to the web server just to measure its size (many hosts will fail with a PHP memory error if you try to do this). The present workaround is to specify the file size explicitly, or switch your site to PHP 5 (granted, not always easy!). I'll examine the possibilities for graceful degradation. I suppose I could require the user to input the size in a PHP 4 environment...
Thanks for taking my baby out for a spin!
#2
Ah, I see. PHP5.
Well, I would be happy to enable this on my server, but I worry about other Drupal module compatibilities. I'm not by any means a programmer and I wouldn't know if a module is being affected by the PHP5 upgrade (unless it started throwing errors on screen). I could test it out and see.
As for an alternative, would it be possible to just forgo that option for auto filesize generation? On most of the Drupal podcasting sites I am running I don't have a file size field. Except for the video podcasting site which has to run through the video.module. That has the field for file size however I leave it blank.
Anyway, I can't wait to use this module on my site as well as all my client sites. We are tired of using too many convoluted workarounds to create simple off-site podcasts using Drupal. This module seems to be the answer.
#3
Fixed in 5.x-0.3-beta. Now users on PHP4-based installations will have to specify the size of the remote file by hand. A warning appears on the administrative page, and the description of the size field contains text to this effect.
#4