server error when using ForceType
Posted: Tue Jan 06, 2004 3:39 pm
Hello,
I'm stumped on this one and would appreciate any and all help.
I'm trying to implement some scripts that make a forum spiderable, but the mod_mime "ForceType" is not working properly. I have determined that it is installed and working by testing it with a gif file called eek.gif. If I rename eek.gif to eek and add this to .htaccess :
a browser will display the gif file properly. Without the entry in .htaccess, the browser displays the guts of the gif file. This tells me that mod_mime and ForceType work.
When I try to use it for a php script, it gives me a "Premature end of script headers" in the apache error_log file. Here is what I've done so far to debug with a simple script:
Create php file called phpinfo.php with contents:
Verified that it works properly with a browser. Copied to phpinfo without the ".php" extension. Browser now shows contents of the php file. Add this to the .htaccess file:
Now the browser shows the "Internal Server Error" page and the apache error_log shows the "Premature end of script headers" error.
Here is my server info, and I have root on it if anybody has anything for me to try. Thanks in advance.
Dave
PHP Version 4.3.3
System Linux mydomain.com 2.2.19-6.2.1ensim.smp-3.1.5-2 #1 SMP Fri Jan 17 02:15:45 PST 2003 i686
Build Date Nov 10 2003 22:12:29
Configure Command './configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib
_ENV["SERVER_SOFTWARE"] Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.2 FrontPage/5.0.2.2634 mod_ssl/2.8.16 OpenSSL/0.9.6b PHP-CGI/0.1b
I'm stumped on this one and would appreciate any and all help.
I'm trying to implement some scripts that make a forum spiderable, but the mod_mime "ForceType" is not working properly. I have determined that it is installed and working by testing it with a gif file called eek.gif. If I rename eek.gif to eek and add this to .htaccess :
Code: Select all
<Files eek>
ForceType image/gif
</Files>When I try to use it for a php script, it gives me a "Premature end of script headers" in the apache error_log file. Here is what I've done so far to debug with a simple script:
Create php file called phpinfo.php with contents:
Code: Select all
<?php
phpinfo();
?>Code: Select all
<Files phpinfo>
ForceType application/x-httpd-php
</Files>Here is my server info, and I have root on it if anybody has anything for me to try. Thanks in advance.
Dave
PHP Version 4.3.3
System Linux mydomain.com 2.2.19-6.2.1ensim.smp-3.1.5-2 #1 SMP Fri Jan 17 02:15:45 PST 2003 i686
Build Date Nov 10 2003 22:12:29
Configure Command './configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib
_ENV["SERVER_SOFTWARE"] Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.2 FrontPage/5.0.2.2634 mod_ssl/2.8.16 OpenSSL/0.9.6b PHP-CGI/0.1b