Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] php-5.0.5-r5 "--with-mime-magic"?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Leprechaun
n00b
n00b
Posts: 49
Joined: Sat Oct 04, 2003 7:19 pm
Location: Minnesota, USA

[SOLVED] php-5.0.5-r5 "--with-mime-magic"?

  • Quote

Post by Leprechaun » Thu Feb 02, 2006 4:22 am

I recently upgraded to dev-lang/php-5.0.5-r5, the version currently in "stable." I've been going through my site, reworking code to fit the new version. I've been getting an error that the mime_content_type function is undefined. After looking at the PHP Mimetype page (http://us2.php.net/mime_magic), I found that php >= 4.3.2 needs to be compiled with the "--with-mime-magic" option in order to define this function. At least, that's how I read it.

Here is an emerge -pv of php:

Code: Select all

oliver backups # emerge -pv dev-lang/php

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-lang/php-5.0.5-r5  -adabas -apache +apache2 -bcmath +berkdb -birdstep +bzip2 -calendar -cdb -cgi -cjk +cli +crypt -ctype -curl -curlwrappers -db2 +dba -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase -ftp +gd -gd-external +gdbm -gmp -hardenedphp -hyperwave-api -iconv -imap -informix -inifile -interbase -iodbc +ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit +mhash -ming -mnogosearch -msql -mssql +mysql -mysqli +ncurses +nls -oci8 -oci8-instant-client -odbc -oracle7 -ovrimos -pcntl +pcre -pdo-external -pfpro -pic -posix -postgres -qdbm +readline -recode -sapdb -sasl +session -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct -sysvipc -threads -tidy +tiff -tokenizer +truetype -wddx +xml -xmlrpc -xpm -xsl -yaz -zip +zlib 0 kB 

Total size of downloads: 0 kB
I've looked through the USE flags using equery, but nothing mentions mime. Here is the result of phpinfo():

Code: Select all

System 	Linux oliver 2.6.12-gentoo-r9 #1 SMP Sat Dec 17 22:53:11 CST 2005 i686
Build Date 	Feb 1 2006 19:59:19
Configure Command 	'./configure' '--prefix=/usr/lib/php5' '--sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--disable-ftp' '--with-gettext' '--without-gmp' '--without-hwapi' '--without-iconv' '--without-informix' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--disable-memory-limit' '--with-mhash' '--without-ming' '--without-mnogosearch' '--without-msql' '--without-mssql' '--with-ncurses' '--without-oci8' '--without-oci8-instant-client' '--without-oracle' '--with-openssl' '--with-openssl-dir=/usr' '--without-ovrimos' '--disable-pcntl' '--without-pfpro' '--without-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--without-xmlrpc' '--without-xsl' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite'
Server API 	Apache 2.0 Handler
Virtual Directory Support 	disabled
Configuration File (php.ini) Path 	/etc/php/apache2-php5/php.ini
Scan this dir for additional .ini files 	/etc/php/apache2-php5/ext-active
PHP API 	20031224
PHP Extension 	20041030
Zend Extension 	220040412
Debug Build 	no
Thread Safety 	disabled
Zend Memory Manager 	enabled
IPv6 Support 	enabled
Registered PHP Streams 	php, file, http, ftp, compress.bzip2, compress.zlib, https, ftps
Registered Stream Socket Transports 	tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
As you can see, the configure options contain neither the proper "--with-mime-magic" option nor the outdated "--enable-mime-magic" function. This leads me to believe that I have configured something incorrectly. Has anyone else run across this problem? Thanks in advance for any advice.
Last edited by Leprechaun on Thu Feb 02, 2006 1:30 pm, edited 1 time in total.
Top
ecatmur
Advocate
Advocate
User avatar
Posts: 3595
Joined: Mon Oct 20, 2003 8:07 pm
Location: Edinburgh
Contact:
Contact ecatmur
Website

  • Quote

Post by ecatmur » Thu Feb 02, 2006 4:45 am

It just means the ebuild doesn't handle that configure option.

You could file a request on bugs.gentoo.org, and in the meantime set EXTRA_ECONF="--with-mime-magic" in your environment or in /etc/portage/bashrc. However I doubt Gentoo will add support for it; as the man page says mime_magic is deprecated.
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Top
llongi
Retired Dev
Retired Dev
User avatar
Posts: 459
Joined: Thu Apr 15, 2004 8:32 pm
Location: Switzerland
Contact:
Contact llongi
Website

  • Quote

Post by llongi » Thu Feb 02, 2006 8:24 am

Mime_magic is deprecated, exactly, so we dropped it from the supported extensions, please emerge the dev-php5/pecl-fileinfo extension wich is still maintained and supported and does substitute the Mime_magic one.
Best regards, Luca.
Top
Leprechaun
n00b
n00b
Posts: 49
Joined: Sat Oct 04, 2003 7:19 pm
Location: Minnesota, USA

  • Quote

Post by Leprechaun » Thu Feb 02, 2006 1:30 pm

Thanks, that did it. I knew I was missing something. :-)
Top
BlackB1rd
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 131
Joined: Wed Aug 13, 2003 11:45 am
Location: /Europe/Netherlands/Haarlem

php-5.1

  • Quote

Post by BlackB1rd » Thu Mar 30, 2006 4:14 pm

CHTEKK wrote:Mime_magic is deprecated, exactly, so we dropped it from the supported extensions, please emerge the dev-php5/pecl-fileinfo extension wich is still maintained and supported and does substitute the Mime_magic one.
Emerged it, but it won't help. Still get the undefined function error. Installed php with the following flags:

Code: Select all

[ebuild   R   ] dev-lang/php-5.1.2  -adabas -apache +apache2 -bcmath -berkdb -birdstep +bzip2 -calendar -cdb -cgi -cjk +cli +crypt -ctype +curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob +exif -fastbuild -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase -ftp +gd -gd-external +gdbm -gmp -hardenedphp -hash -hyperwave-api -iconv -imap -informix -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit -mhash -ming -msql -mssql +mysql +mysqli +ncurses +nls -oci8 -oci8-instant-client -odbc -pcntl +pcre -pdo -pdo-external -pic -posix -postgres -qdbm +readline -recode -reflection -sapdb -sasl +session +sharedext -sharedmem -simplexml -snmp -soap -sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -truetype -vm-goto -vm-switch -wddx +xml -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip +zlib 
Do I need some other flag to enable?
Top
ikrabbe
n00b
n00b
User avatar
Posts: 28
Joined: Sun Aug 11, 2002 6:48 pm
Location: Dortmund, Germany
Contact:
Contact ikrabbe
Website

  • Quote

Post by ikrabbe » Fri Jun 23, 2006 12:12 pm

No you don't need it in your useflags. fileinfo is an external extension to php, so you don't need to recompile php. But what I miss is a valid mime.magic file, that is still needed. The current configuration doens't detects a valid and simple xml file ! So I assume the used mime.magic (if any) is not quite usefull.
Top
ikrabbe
n00b
n00b
User avatar
Posts: 28
Joined: Sun Aug 11, 2002 6:48 pm
Location: Dortmund, Germany
Contact:
Contact ikrabbe
Website

  • Quote

Post by ikrabbe » Fri Jun 23, 2006 12:22 pm

Acutally I reviewed the file usage and found out that fileinfo correctly uses /usr/share/misc/file/mime.magic.mgc, which correctly detects "XML document text" but returns "" as mime type string. Something seems to be broken in mime.magic.mgc.

Any hints how this can be fixed ?
Top
kendowns
n00b
n00b
Posts: 17
Joined: Mon Dec 02, 2002 1:33 am
Contact:
Contact kendowns
Website

Deprecated means will disappear, not *did*

  • Quote

Post by kendowns » Mon Jan 08, 2007 7:08 pm

Removing this feature from the ebuild breaks the definition of deprecated. Deprecated means a function is supported but discouraged from use because it will disappear in the future, but has not disappeared yet. Removing support for a deprecated function before upstream support is removed breaks applications.
Every application wants to be a database application when it grows up
Top
wpetya
n00b
n00b
User avatar
Posts: 9
Joined: Wed Aug 16, 2006 10:35 am

Re: Deprecated means will disappear, not *did*

  • Quote

Post by wpetya » Fri Jan 26, 2007 12:07 pm

kendowns wrote:Removing this feature from the ebuild breaks the definition of deprecated.
I agree. Perhaps a use flag deprecated (for all deprecated) or deprecated_ prefix for use flags of deprecated features.
Top
SunHateR
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Fri Aug 13, 2004 11:43 am

  • Quote

Post by SunHateR » Sun Jan 28, 2007 11:43 am

ikrabbe wrote:Acutally I reviewed the file usage and found out that fileinfo correctly uses /usr/share/misc/file/mime.magic.mgc, which correctly detects "XML document text" but returns "" as mime type string. Something seems to be broken in mime.magic.mgc.

Any hints how this can be fixed ?
The same problem. Any help please!
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic