ID: 22275
Updated by: [EMAIL PROTECTED]
Reported By: hans at nyu dot edu
-Status: Open
+Status: Analyzed
Bug Type: Unknown/Other Function
Operating System: RedHat 6.2 (2.2.14)
PHP Version: 4.3.1
New Comment:
mime magic extension only supports simplified magic files that come
with Apache distribution for now, as most part of its code is taken
from mod_mime_magic.
Previous Comments:
------------------------------------------------------------------------
[2003-02-18 09:46:40] hans at nyu dot edu
Hopefully I'm not missing something obvious. After downloading PHP
4.3.1 to a RedHat 6.2 box, I configured and compiled like so for use as
a CLI bin:
./configure
--prefix=/usr/local/psh --disable-cgi
--disable-ipv6 --with-openssl=/usr/local/ssl
--with-zlib --enable-bcmath
--with-bz2 --enable-dio
--enable-ftp --enable-mime-magic
--with-mysql=/usr/local/mysql --with-ncurses
--enable-pcntl --with-readline
--enable-shmop --enable-sockets
--enable-sysvmsg --enable-sysvsem
--enable-sysvshm
Everything happily compiles and installs, but when finally running the
binary as /usr/local/psh/bin/php -v the following is spewed out:
HTTP/1.0 0 X
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
PHP 4.3.1 (cli) (built: Feb 17 2003 22:13:02)
Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
The same type of output occurs whether I use php -h or just plain php
with no arguments. Looking at /usr/share/magic I've excerpted the
lines as noted:
3848 # HP Printer Job Language
3849 0 string \033%-12345X@PJL HP Printer Job Language data
3850 # HP Printer Job Language
3851 # The header found on Win95 HP plot files is the "Silliest Thing
possible"
3852 # (TM)
3853 # Every driver puts the language at some random position, with
random case
3854 # (LANGUAGE and Language)
3855 # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE"
in line 10
3856 # From: Uwe Bonnes <[EMAIL PROTECTED]>
3857 #
3858 0 string \033%-12345X@PJL HP Printer Job Language data
3859 >&0 string >\0 %s
3860 >>&0 string >\0 %s
3861 >>>&0 string >\0 %s 3862 >>>>&0 string
>\0 %s
3863 #>15 string \ ENTER\ LANGUAGE\ =
3864 #>31 string PostScript PostScript
If I then make distclean and ./configure just as above, but without
--enable-mime-magic everything looks as it should. Should CLI and
--enable-mime-magic not be used together? Hopefully this all makes
sense to someone and this message comes out readable.
Thanks,
Hans
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22275&edit=1