OK, that error is repaired, but $adapter->addValidator('IsImage', false,
'jpeg'); gets error: Array ( [fileMimeTypeNotDetected] => )
PHP logs give no errors. What can it be?
thomasW wrote:
>
> Look here for details to the openbase_dir directive:
> http://php.net/manual/en/ini.sect.safe-mode.php
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
> ----- Original Message -----
> From: "robos85" <[email protected]>
> To: <[email protected]>
> Sent: Wednesday, November 04, 2009 6:37 PM
> Subject: [fw-general] File upload problem:(
>
>
>>
>> I have that code in my controller:
>> $destination = PUBLIC_PATH.'/obrazek.jpg';
>> $adapter = new Zend_File_Transfer_Adapter_Http();
>> $adapter->addFilter('Rename', array('target'=>$destination,
>> 'overwrite'=>true));
>> $adapter->addValidator('Size', false, array('min' => 20, 'max' =>
>> 2000000));
>> $adapter->addValidator('Count', false, array('min' =>1, 'max' => 1));
>> $adapter->addValidator('IsImage', false, 'jpeg');
>> if(!$adapter->isValid()) {
>> print_r($adapter->getMessages());
>> }
>> try {
>> $adapter->receive();
>> } catch (Zend_File_Transfer_Exception $e) {
>> $e->getMessage();
>> }
>>
>> I get that error:
>> Warning: file_exists() [function.file-exists]: open_basedir restriction
>> in
>> effect. File(/usr/share/misc/magic) is not within the allowed path(s):
>> (/home/wwday/:/tmp:/usr/local/lib/php/:/usr/sbin/:/usr/bin/:/usr/local/bin/:/usr/local/sbin/:/bin/:/sbin/)
>> in
>> /home/wwday/domains/wwday/wwdaypriv/library/Zend/Validate/File/MimeType.php
>> on line 144
>> AND
>> Array ( [fileMimeTypeNotDetected] => )
>>
>> What have I done wrong? I'm searchung all day, tyied many ways but i
>> can't
>> get it work :(
>> --
>> View this message in context:
>> http://old.nabble.com/File-upload-problem%3A%28-tp26201092p26201092.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>
--
View this message in context:
http://old.nabble.com/File-upload-problem%3A%28-tp26201092p26203838.html
Sent from the Zend Framework mailing list archive at Nabble.com.