Drupal 4.7
Debian-sarge, Apache2-worker
PHP 4.3.10-16, via FastCGI
I just switched from mod_php4 to PHP/fastCGI (smaller memory footprint and seems nearly 2x as fast for my config). I'm guessing I've got some kind of mime problem, but can't sort it out.
I can attach/upload and later download files fine using upload.module and the Public File System settings. But using the Private settings (which I'd prefer), where you get those http://example.com/system/files/xxxxx.yyy URLs for attachments, I get some problems. Many file types download fine (*.pdf, for example works fine), but *.gif and *.jpg (at least) don't download properly. The behavior is a bit different in IE vs. Firefox, but it is the same problem.
IE wil display stuff like:
Content-Length: 153826 Content-Disposition: inline; filename=seebeck effect.jpg Content-type: image/jpeg ÿØÿàJFIF,,ÿÛC
and Firefox will try to open the file with some app, but the file is borked.
It sure looks to me like the mime type has not be set correctly, yet my server perfectly correctly serves up images. I've looked all over at php.ini and apache2.conf settings, so far to no avail.
Any suggestions?
Thanks in advance.
- Cronin
Comments
Same here
I've about the same problem, on a website in an hosted account. .jpg and .ppt files are downloaded as text - included header. I still didn't try with *.pdf - must test it :)
I know my (cheap :-d ) provider runs PHP as CGI, not as a module - I think it could have to do with the problem. I wonder if there's something I could modify in the php.ini to get some solution.. any suggestion?
I solved!
I had to make a little patch to includes/file.inc to solve it.
Look: http://drupal.org/node/81123