Forum Moderators: coopster

Message Too Old, No Replies

Default MIME type for PHP Scripts

Works on Windows but not on Linux

         

DCHWeb

2:31 am on Feb 12, 2004 (gmt 0)

10+ Year Member



I am trying to set php to send application/xhtml+xml instead of text/html as the MIME type header, but when I set default_mimetype in php.ini, nothing happens. I am running Apache 2 with PHP 4 on Linux. The funny thing is that on Windows XP with Apache2 and PHP5, it works. Does anyone have any input?

coopster

10:04 pm on Feb 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you checked the httpd.conf file on your Linux Apache server for any overrides? Search for MIME, php, or AddType and see if you can't find anything. Restart your server after any changes.

DCHWeb

12:52 am on Feb 13, 2004 (gmt 0)

10+ Year Member



There is no setting in my httpd.conf that says anything about php except for the AddType Handeler for parcing the php documents. I even looked in mime.types and there was nothing.

coopster

1:34 am on Feb 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



How do you have it defined...

default_mimetype = "application/xhtml+xml"

...?

DCHWeb

1:49 am on Feb 13, 2004 (gmt 0)

10+ Year Member



Yes, that is exactly how it is defined. No matter what mime type I put in there, it always comes out as text/html

DCHWeb

3:50 am on Feb 13, 2004 (gmt 0)

10+ Year Member



Yes, that is exactly what I had, but in the wrong file :P I was editing /etc/php.ini which I used to always edit, but apparently it was suddenly changed to a different folder. I got it to work now. Thanks for your help anyway