note 29130 added to function.mime-content-type
| From: | pir8 at rack1 dot php dot net | Date: | Tue, 04 Feb 2003 03:21:20 +0000 |
| Subject: | note 29130 added to function.mime-content-type | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43358@lists.php.net to get a copy of this message | ||
I have tried using --enable-mime-magic when compiling php 4.3 for command line, but everytime I try
to run a test script with the binary, I get errors with relation to the mime-magic file, although it
doesnt state the filename.
These are the steps I followed:
1. Download php-4.3.0.tar.gz
2. tar -xzvf php-4.3.0.tar.gz
3. cd php-4.3.0 ; ./configure --enable-mime-magic ; make
4. cat test.php
<?php
print "this is what I have to say\n";
?>
5. cd sapi/cgi/; ./php test.php
This is the error:
Status: 0
Content-type: text/html
PHP Warning: mime_magic: (line 3859) offset `&0 string >\0
%s ' invalid in Unknown on line 0
PHP Warning: mime_magic: type &0 string >\0 %s
invalid in Unknown on line 0
PHP Warning: mime_magic: (line 3860) offset `&0 string >\0
%s ' invalid in Unknown on line 0
PHP Warning: mime_magic: type &0 string >\0 %s
invalid in Unknown on line 0
PHP Warning: mime_magic: (line 3861) offset `&0 string >\0
%s ' invalid in Unknown on line 0
PHP Warning: mime_magic: type &0 string >\0 %s
invalid in Unknown on line 0
PHP Warning: mime_magic: (line 3862) offset `&0 string >\0
%s ' invalid in Unknown on line 0
PHP Warning: mime_magic: type &0 string >\0 %s
invalid in Unknown on line 0
Content-type: text/html
X-Powered-By: PHP/4.3.0
This is what I want to say
text/plain
Can anyone point as to what I might have done wrong?
--
http://www.php.net/manual/en/function.mime-content-type.php
http://master.php.net/manage/user-notes.php?action=edit+29130
http://master.php.net/manage/user-notes.php?action=delete+29130
http://master.php.net/manage/user-notes.php?action=reject+29130