• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threading integration in codeigniter ver 3.1 and php ver >=5.6 not working

#1
Bug 
Hello Everyone could anyone help me for the below.

I am trying create on library class which has do some curl call using my model method.
see below code snippet-
PHP Code:
class CI_Multi_thread extends Thread {
   protected $CI;
   public function __construct($data=array()) {
       $this->CI =&get_instance();
   }
   public function run($data=array()) {
       $this->faux_apikey=$data['faux_apikey'];
       $this->faux_apisecret=$data['faux_apisecret'];
       $this->device_ip=$data['device_ip'];
       $this->device_id=$data['device_id'];
       $this->fk_group_id=$data['fk_group_id'];
       
       $this
->CI->load->model('Fauxapi_model','fm',TRUE);
       $this->CI->fm->processing_logs($this->device_id,$this->fk_group_id);
       $this->CI->fm->config_set($this->faux_apikey,$this->faux_apisecret,$this->device_ip,$this->device_id,$this->fk_group_id);
   }

but &get_instance(); is not working. show "Fatal error: Cannot assign by reference to overloaded object in C:\xampp\htdocs\darshan\system\libraries\Multi_thread.php on line 8
"
also my server is also close my current process when last running thread is stop.

after all it stop my complete server working for 5 second.

I am also attaching my libraries and model file here.


Attached Files
.php   Multi_thread.php (Size: 813 bytes / Downloads: 70)
.php   Fauxapi_model.php (Size: 26.79 KB / Downloads: 63)
Darshan Baraiya
Founder & CEO WebMonks Technology
Contact Number - 80000 71314

" Self confidence is a small Lamp in a dark tunnel.

It does not show everything at once,

but gives enough light for the next step."
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.