Category Archives: CodeIgniter

Your server does not support the GD function required to process this type of image.

This is how I’v solved this issue, in a loop….


$this->load->library('image_lib', $resize_config);
if ( ! $this->image_lib->resize() )
    echo $this->image_lib->display_errors();


if ( ! $this->image_lib->resize() )
    echo $this->image_lib->display_errors();

codeigniter + php + mysql – emojis 😉

This is how…

On mysql set your table(s)’s filed(s) to utf8mb4_general_ci.

codeigniter config/database.php
$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_general_ci';

500 Internal Server Error while uploading files

I was having a 500 Internal Server Error…
nginx logs were showing me the following

2016/03/17 12:09:32 [crit] 31488#0: *11192 open() "/var/lib/nginx/tmp/client_body/0000000005" failed (13: Permission denied), client: 84.91.XXX.XXX, server:, request: "POST /trades_edit/edit_trade HTTP/1.1", host: "", referrer: ""


chown -R www-data:www-data /var/lib/nginx

Codeigniter – Message: Only variable references should be returned by reference

On a new deployment of a Codeigniter tool that I’v made, I got the following error, after installed it in more than 10 different servers… my own servers and clients…

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257


This only happens with PHP >= 5.6….

We need to tweak /system/core/Common.php Line number 257
Change this line from

return $_config[0] =& $config;


$_config[0] =& $config;
return $_config[0];

“MySQL server has gone away” with CodeIgniter and MySQL

I’v stopped using CodeIgniter for 7 months, but I maintaining a product that was developed under CI.

rock ssd

Today I’v got a error saying  “MySQL server has gone away” after a long time PHP execution.
I’v managed to solve it by, on the model that was getting me the error, *reconnect* to the database .

Before the *command* i’v added $this->db->reconnect();

 $this->db->insert('photoGallery', $data);
 return $this->db->insert_id();

Hope it helps anyone out there.