PHP Warning: Module 'imagick' already loaded in Unknown on line 0

642 views
Skip to first unread message

Muhammad Shahzad

unread,
May 25, 2017, 2:01:32 AM5/25/17
to Fat-Free Framework

Hi,

I have a cron job file, when I execute it from server I'm getting this error:

PHP Warning:  Module 'imagick' already loaded in Unknown on line 0
Fatal error: Module 'imagick' already loaded

Please let me know where is the issue? Is f3 loading imagick extension twice?

This code is working from browser but not from cli.

myproject/cron/updatetransactions.php

require_once "base.php";
$mapper
= new \DB\Mongo\Mapper(\Base::Instance()->get('MongoDB'), 'transactions');
$todayDate
= date('Y-m-d', strtotime("-1 days")). " 23:59:59";
$filters  
= array(
               
'display'=>array('$ne'=>'1'),
               
'cwhen'=>array(                            
                           
'$lt'=>$todayDate
                           
)
           
);
$options
['limit'] = 30000;
$options
['order'] = array('_id'=>-1);
$count
= $mapper->count($filters);
...


Muhammad Shahzad

unread,
May 25, 2017, 5:43:41 AM5/25/17
to f3-fra...@googlegroups.com
Is anyone there for reply??

ikkez

unread,
May 25, 2017, 6:23:28 AM5/25/17
to f3-fra...@googlegroups.com
it's a php configuration issue. F3 only tells you about that. check your php-cli.ini
Alternatively disable startup warnings in your index.php:

error_reporting(0);
$f3 = require('lib/base.php');
Reply all
Reply to author
Forward
0 new messages