From:             hans at nyu dot edu
Operating system: RedHat 6.2 (2.2.14)
PHP version:      4.3.1
PHP Bug Type:     Unknown/Other Function
Bug description:  CLI and --enable-mime-magic Spews Warnings

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 bug report at http://bugs.php.net/?id=22275&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22275&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22275&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22275&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22275&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22275&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22275&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22275&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22275&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22275&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22275&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22275&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22275&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22275&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22275&r=gnused

Reply via email to