CodeIgniter Forums
Whoops! error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Whoops! error (/showthread.php?tid=74292)



Whoops! error - Entai - 09-06-2019

Hi!, I set up CI4 rc1 on Infinityfree server, and welcome_message works fine, I make a new Controller and when I reach it, I get the error "Whoops! We seem to have hit a snag. Please try again later...", but the thing is that the line $db->query(my query); crash it, when I try $this->db->query(my query) also get this error.

My controller:
-------------------------------------------------------------------------------------------------------------------
<?php namespace App\Controllers;



class Log extends BaseController {



public function index() {

if (!empty($_POST)) {

$db = \Config\Database::connect();

$search = "SELECT * FROM usuarios WHERE user = ".$_POST['user'].";";

      

      $query = $db->query($search);



}


}
}
-------------------------------------------------------------------------------------------------------------------
I even try the $this->db->query($search);with the same result! (Error 500)

When I put development in the htaccess the folowing error is show:
gzuncompress(): data error
SYSTEMPATH/ThirdParty/Kint/kint.php at line 177

... I am lost ...