if i do:
$mimeType=(is_null($imageData))?CFileHelper::getMimeType($newLocation.$newName):$imageData['mime'];
I get:
2011/01/18 22:18:26 [error] [php] finfo_open() [<a href='function.finfo-open'>function.finfo-open</a>]: Failed to load magic database at '(null)'. (C:\wamp\www\newyii\framework\utils\CFileHelper.php:222)
if i do:
$mimeFilePath=Yii::getPathOfAlias('system.utils.mimeTypes').'.php';
$mimeType=(is_null($imageData))?CFileHelper::getMimeType($newLocation.$newName,$mimeFilePath):$imageData['mime'];
i get:
2011/01/18 22:22:38 [error] [php] include(C:\wamp\www\newyii\framework\utils\mimeTypesphp.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory (C:\wamp\www\newyii\cms\protected\components\Common.php:79)
Of course, the file is there, but seems to be a problem if i add the .php extension on the end of the file, because if i do :
$mimeFilePath=Yii::getPathOfAlias('system.utils.mimeTypes');
$mimeType=(is_null($imageData))?CFileHelper::getMimeType($newLocation.$newName,$mimeFilePath):$imageData['mime'];
It works perfectly.
O.S: Windows 7
PHP: 5.2.8
HTTPD: Apache 2
Any idea why this might happen ?