Re: filesize() and mime_content_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/8/07, Richard Lynch <ceo@xxxxxxxxx> wrote:


On Thu, June 7, 2007 12:04 pm, Chris Boget wrote:
>>    Have you uncommented or added `extension=php_mime_magic.dll` in
>> your php.ini file for mime_content_type()?  What about adding
>> something like this, as well:
>
> extension=php_mime_magic.dll is commented out in my php.ini.  So that
> explains why the mime_content_type() isn't working.  That's fine.  Is
> this
> DLL also responsible for filesize()?
>
>>    Do you have anything in the `disable_functions =` area of your
>> php.ini?
>
> No, there are no disabled functions definined in my php.ini.

The fact that filesize is "failing" and stat is "failing" when you
give a specific filename suggests to me that your filename is at
fault.

Try things like:

echo file_exists($filename); // if it's there, it should be TRUE

$path = dirname($filename);
$dir = opendir($path) or die("$path is not there\n");
while (($file = readdir($dir)) !== false){
  echo $file, ": ", filesize("$path/$file"), "<br />\n";
}

This will list all the files in the directory -- which may not be the
directory you think you are looking at, ESPECIALLY if you are using
relative directories.

>
> thnx,
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



   That wouldn't explain the fatal (exit 1) status for undefined
functions though, Rich.  Chris, you didn't compile this from source,
right?  If you're using a binary, it should work Out Of The Box [tm].
Are you using a development version or stable?  Have you noticed
problems with other functions that are expected to work?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux