mime_content_type()

Hello,

I’d like to use the mime_content_type() php function.
This function exists since PHP 4 >= 4.3.0 and PHP 5

As we are under php 4.3.11 I should have it, but the function_exists() tells me that the mime_content_type() doesn’t exist

Maybe there is a special compilation directive of php to enable this function ?

Do you have informations about this problem ?
Why this function isn’t in 4.3.11 interworx package ?

Thanks for your help

Pascal

Ok I found that I have to recompile php with --with-mime-magic

So I have dowloaded the php-4.3.11 src rpm from updates.interworx

Then rpm -Uvh php-4.3.11-100.iworx.src.rpm

Then edit the php.spec file in SPECS to update the bversion to 101 and add --with-mime-magic

Then I launch rpmbuild -bb --with cos3x /usr/src/redhat/SPECS/php.spec

But I have a lot of fault depedencies missing

[root@obiwan SPECS]# rpmbuild -bb --with cos3x /usr/src/redhat/SPECS/php.spec
error: Failed build dependencies:
bzip2-devel is needed by php-4.3.11-101.cos3x.iworx
db4-devel is needed by php-4.3.11-101.cos3x.iworx
expat-devel is needed by php-4.3.11-101.cos3x.iworx
gdbm-devel is needed by php-4.3.11-101.cos3x.iworx
gmp-devel is needed by php-4.3.11-101.cos3x.iworx
aspell-devel >= 0.50.0 is needed by php-4.3.11-101.cos3x.iworx
libjpeg-devel is needed by php-4.3.11-101.cos3x.iworx
libpng-devel is needed by php-4.3.11-101.cos3x.iworx
pam-devel is needed by php-4.3.11-101.cos3x.iworx
libstdc+±devel is needed by php-4.3.11-101.cos3x.iworx
ncurses-devel is needed by php-4.3.11-101.cos3x.iworx
pcre-devel is needed by php-4.3.11-101.cos3x.iworx
libmcrypt-devel is needed by php-4.3.11-101.cos3x.iworx
rh-postgresql-devel is needed by php-4.3.11-101.cos3x.iworx
libxslt-devel >= 1.0.18-1 is needed by php-4.3.11-101.cos3x.iworx
libxml2-devel >= 2.4.14-1 is needed by php-4.3.11-101.cos3x.iworx
cyrus-sasl-devel is needed by php-4.3.11-101.cos3x.iworx
openldap-devel is needed by php-4.3.11-101.cos3x.iworx
readline-devel is needed by php-4.3.11-101.cos3x.iworx
libmhash-devel is needed by php-4.3.11-101.cos3x.iworx
apr-devel is needed by php-4.3.11-101.cos3x.iworx
apr-util-devel is needed by php-4.3.11-101.cos3x.iworx
net-snmp-devel is needed by php-4.3.11-101.cos3x.iworx
elfutils-devel is needed by php-4.3.11-101.cos3x.iworx

This box is a fresh install one, and I didn’t install anything on it less interworx
On all my others box I didn’t have this problem when I recomplied php to have the zip option

Any idea ?
Do I really have to install all these packages ?

Thanks

Pascal

I have installed all these dependencies but I have a pbm with 3 ones

    libxslt-devel >= 1.0.18-1 is needed by php-4.3.11-100.cos3x.iworx
    libxml2-devel >= 2.4.14-1 is needed by php-4.3.11-100.cos3x.iworx
    libmhash-devel is needed by php-4.3.11-100.cos3x.iworx

I try to install libxml2-devel

[root@obiwan SPECS]# yum install libxml2-devel
Gathering header information file(s) from server(s)
Server: CentOS 3 - Addons
Server: CentOS 3 - Base
Server: CentOS 3 - Extras
Server: InterWorx-CP - CentOS 3
Server: InterWorx-CP - Generic
Server: CentOS 3 - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
…Unable to satisfy dependencies
Package libxml2-devel needs libxml2 = 2.5.10, this is not available.

[quote]

but libxml2 is already install and is uptodate

[quote]
Looking in Installed Packages:
Name Arch Version Repo

libxml2 i386 2.6.16-1.1.el3.rf db

and libmhash-devel doesn’t exist

[root@obiwan SPECS]# yum install libmhash-devel
Gathering header information file(s) from server(s)
Server: CentOS 3 - Addons
Server: CentOS 3 - Base
Server: CentOS 3 - Extras
Server: InterWorx-CP - CentOS 3
Server: InterWorx-CP - Generic
Server: CentOS 3 - Updates
Finding updated packages
Downloading needed headers
Cannot find a package matching libmhash-devel
No actions to take

I just want to enable in PHP the last function that exist under php-4.3.11

Help is really welcome

Thanks

Pascal

Ok, I’ve taken the rpm from my others box that was in yum cache to put and isntall them in the new box.

Then I’ve ran rpmbuild -bb --with cos3x /usr/src/redhat/SPECS/php.spec

but I have these errors :

checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for gcc… no
checking for cc… no
checking for cc… no
checking for cl… no
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details.
error: Bad exit status from /var/tmp/rpm-tmp.21063 (%build)

Pascal

Pascal,

Yes, you need all the packages and you’ll need to install gcc and any other compiler deps to get the compiler working.

Chris

I thought GCC was installed by default
Also, there is some needs packages that was on you repository and that are no more

Thanks, evruthing should be fine now

Pascal