On Thu, 2009-07-30 at 21:26 -0400, b wrote:
On 07/30/2009 10:15 AM, Ashley Sheridan wrote:
On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote:
You could email it to me, which I presume is better if you replied
back just to me and not the list?
Just copying the list back on in
/usr/share/file/magic
/usr/share/file/magic has lots of rules to know its type and its just
matching it.
I know it has a lot of rules. Grepping it for excel shows that there
are rules in it for those types of files as well.
Maybe your file is quite strange . have you tried with other xls
Christoph Boget wrote:
/usr/share/file/magic
/usr/share/file/magic has lots of rules to know its type and its just
matching it.
I know it has a lot of rules. Grepping it for excel shows that there
are rules in it for those types of files as well.
Maybe your file is quite strange . have
On 07/30/2009 08:53 AM, Peter Ford wrote:
Have you tried using 'file -i' from the command line: after all you are looking
for a MIME type with your fileinfo...
Having said that, with file -i on my system, Word documents are
'application/msword' and Excel files are 'application/octet-stream'
Have you tried using 'file -i' from the command line: after all you are
looking
for a MIME type with your fileinfo...
Having said that, with file -i on my system, Word documents are
'application/msword' and Excel files are 'application/octet-stream'
$ file -i excel.xls
excel.xls:
Having said that, with file -i on my system, Word documents are
'application/msword' and Excel files are 'application/octet-stream'
Fedora11 (2.6.29.6-213.fc11.i586)
$ file excel.xls
excel.xls: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code
page: 1252, Author:
On Thu, 2009-07-30 at 09:51 -0400, Christoph Boget wrote:
Having said that, with file -i on my system, Word documents are
'application/msword' and Excel files are 'application/octet-stream'
Fedora11 (2.6.29.6-213.fc11.i586)
$ file excel.xls
excel.xls: CDF V2 Document, Little Endian, Os:
The xls file I am using was generated with Excel (of Office 2007) for
the Mac. So either you have a different magic file (assuming that's
what the file command uses) than I do or different versions of excel
contain different information.
I just tried using an excel spreadsheet saved using
From: Christoph Boget
Have you tried using 'file -i' from the command line: after all you
are looking
for a MIME type with your fileinfo...
Having said that, with file -i on my system, Word documents are
'application/msword' and Excel files are 'application/octet-stream'
$ file -i
__
From: Ashley Sheridan a...@ashleysheridan.co.uk
To: Christoph Boget jcbo...@yahoo.com
Sent: Thursday, July 30, 2009 10:05:33 AM
Subject: Re: [PHP] fileinfo returning wrong mime type for Excel files
On Thu, 2009-07-30 at 07:04 -0700, Christoph Boget wrote:
To test
On 07/30/2009 10:15 AM, Ashley Sheridan wrote:
On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote:
You could email it to me, which I presume is better if you replied
back just to me and not the list?
Just copying the list back on in this one now. I don't know of any
places that you
Consider the following:
$finfo = finfo_open( FILEINFO_MIME, '/usr/share/file/magic' );
if( $finfo )
{
$mimeType = finfo_file( $finfo, '/path/to/my/excel.xls' );
finfo_close($finfo);
}
echo $mimeType;
When I run the above, it echoes out
On Wed, Jul 29, 2009 at 05:15:38PM -0400, Christoph Boget wrote:
Consider the following:
$finfo = finfo_open( FILEINFO_MIME, '/usr/share/file/magic' );
if( $finfo )
{
$mimeType = finfo_file( $finfo, '/path/to/my/excel.xls' );
PHP 5.2.6
file-4.17-15.el5_3.1
Fileinfo installed through PECL
Checking certain MSWord files, I'm getting back (sans quotes)
application/msword application/msword. Someone reported (in the manual
comments) this same thing back in 2007:
http://ca2.php.net/manual/en/ref.fileinfo.php#79063
Can
RHEL5/PHP 5.1.6
I'm having some trouble getting the Fileinfo package working. It
installed fine, and phpinfo() says it's enabled. But it consistently
returns an empty string when getting the MIME of a file.
/usr/share/pear/bin/pecl install fileinfo
vi /etc/php.d/fileinfo.ini
Thodoris wrote:
Is fileinfo pecl extension installed as a package or with pecl? In case
it is installed as an rpm try to remove it and install it as an
extension in case the package is broken for some reason.
I installed it with PECL:
/usr/share/pear/bin/pecl install fileinfo
Other
Thodoris wrote:
Is fileinfo pecl extension installed as a package or with pecl? In
case it is installed as an rpm try to remove it and install it as an
extension in case the package is broken for some reason.
I installed it with PECL:
/usr/share/pear/bin/pecl install fileinfo
Other
Thodoris Goltsios wrote:
Thodoris wrote:
Is fileinfo pecl extension installed as a package or with pecl? In
case it is installed as an rpm try to remove it and install it as an
extension in case the package is broken for some reason.
I installed it with PECL:
/usr/share/pear/bin/pecl
fileinfo.so is, indeed, in /usr/lib/php/modules. But I know it's
enabled, in any case.
So, anyone know if this extension doesn't work well with 5.1.6?
Well you could enable the error messages to see what is going wrong. The
$type var is probably empty because the instantiation of the $fi
Thodoris wrote:
fileinfo.so is, indeed, in /usr/lib/php/modules. But I know it's
enabled, in any case.
So, anyone know if this extension doesn't work well with 5.1.6?
Well you could enable the error messages to see what is going wrong. The
$type var is probably empty because the
brian wrote:
RHEL5/PHP 5.1.6
I'm having some trouble getting the Fileinfo package working. It
installed fine, and phpinfo() says it's enabled. But it consistently
returns an empty string when getting the MIME of a file.
/usr/share/pear/bin/pecl install fileinfo
vi /etc/php.d/fileinfo.ini
RHEL5/PHP 5.1.6
I'm having some trouble getting the Fileinfo package working. It
installed fine, and phpinfo() says it's enabled. But it consistently
returns an empty string when getting the MIME of a file.
/usr/share/pear/bin/pecl install fileinfo
vi /etc/php.d/fileinfo.ini
I did what you recommended i get the same erorr
;;;
; Resource Limits ;
;;;
max_execution_time = 3600 ; Maximum execution time of each script, in
seconds
max_input_time = 60 ; Maximum amount of time each script may spend
parsing request data
memory_limit =
On Tue, 2008-02-05 at 22:49 -0800, Mad Unix wrote:
I did what you recommended i get the same erorr
Depending on your distro, you may have 2 php.ini files. On debian based
systems there certainly are. One for Apache to use and another for cli.
Check that this is not the case first, you may
Mad Unix wrote:
I did what you recommended i get the same erorr
;;;
; Resource Limits ;
;;;
max_execution_time = 3600 ; Maximum execution time of each script, in
seconds
max_input_time = 60 ; Maximum amount of time each script may spend
parsing request
thanks it works now
wget http://pecl.php.net/get/Fileinfo-1.0.3.tgz
tar -zxf Fileinfo-1.0.3.tgz
cd Fileinfo-1.0.3
phpize
./configure
make
make install
Libraries have been installed in:
/usr/local/src/Fileinfo-1.0.3/modules
If you ever happen to want to link against installed libraries
regarding my horde installation it says NOW
memory_limit disabled: No
If PHP's internal memory limit is turned on and if not set high enough Horde
will not be able to handle large data items (e.g. large mail attachments in
IMP). If possible, you should disable the PHP memory limit by recompiling
On Tue, 2008-02-05 at 23:13 -0800, Mad Unix wrote:
thanks it works now
Libraries have been installed in:
/usr/local/src/Fileinfo-1.0.3/modules
Be sure to remember to add the extension to your php.ini now as well
with an extension= line and restart your server for the changes to
I have only one file
[EMAIL PROTECTED] wv-1.0.3]# find / -name php.ini -print
/etc/php.ini
On Feb 5, 2008 10:55 PM, Paul Scott [EMAIL PROTECTED] wrote:
On Tue, 2008-02-05 at 22:49 -0800, Mad Unix wrote:
I did what you recommended i get the same erorr
Depending on your distro, you may
[EMAIL PROTECTED] html]# cat /etc/php.ini | grep -i fileinfo
extension=fileinfo.so
[EMAIL PROTECTED] html]# cat /etc/php.ini | grep -i modules
; Directory in which the loadable extensions (modules) reside.
extension_dir = /usr/lib64/php/modules
; Note: packaged extension modules are now loaded
I can not install FileInfo... any help
[EMAIL PROTECTED] php.d]# pear config-show
Configuration (channel pear.php.net):
=
Auto-discover new Channels auto_discovernot set
Default Channeldefault_channel pear.php.net
HTTP Proxy Server
On Feb 4, 2008 4:06 AM, Mad Unix [EMAIL PROTECTED] wrote:
I can not install FileInfo... any help
[snip]
Note this line:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
Update the php.ini to use more than 8MB. (See `memory_limit`)
While you're at it,
32 matches
Mail list logo