I'm new to the CodeIgniter 3 framework so i'm a bit in the deep with this bugs. Basically, when i try to upload an image it throws me the HTTP ERROR 500 and no errors in the error log on the server.
Here's the controller's function:
if ($_POST)
{
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$config['max_size'] = '1024';
$config['max_width'] = '1920';
$config['max_height'] = '1280';
$this->load->library('upload', $config);
foreach ($_FILES as $fieldname => $fileObject)
{
if (!empty($fileObject['name']))
{
$this->upload->initialize($config);
if (!$this->upload->do_upload($fieldname))
{
var_dump($this->upload->display_errors());
}
else
{
// SUCCESS
}
}
}
}
i've checked the $config['upload_path']
with is_dir, is_writable and such. It's chmod to 777. The $fieldname/$fileObject
have correct values. There is no .htaccess added and i'm working in the subdomain root
Any suggestions would be greatly appreciated as i'm out of ideas :)