Sunday, December 27, 2015

DETERMINISTIC, NO SQL, or READS SQL DATA error

Just after giving name for database , next step it shows
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)...how to solve this?

Most common solution: Open your php.ini file and search for display_errors = ON and change it to display_errors = Off

If the above does not work, try the following:

SSH to your server

Connect to MySQL using your root user and passord and at the mysql prompt, run this command mysql> SET GLOBAL log_bin_trust_function_creators = 1;

Monday, December 7, 2015

Exception Codeigniter 3 pada PHP 7.0 [solved]

awala hanya baca-baca feed yang sudah lama tidak sempat gw tengok. saat itu pula gw dapet info PHP 7.0 sudah di rilis. tanpa berpikir panjang, karena emank sudah nunggu lama banget. akhir lansung saja gw upgrade PHP 5.6.6 ke PHP 7 dan tidak lupa gw update juga Apache 2.4.x. pokoknya pake yang versi terkahir rilis. setelah proses update selesai, gw langsung coba running project yang sedang gw kerjaan yang menggunakan Framework Codeigniter akhir terjadilah error exception yg tidak biasanya. setelah coba cari tahu ketemulah solusi nya. Ternyata ada perbedaan anatar php5dan php7 adalam penulisan Exception. 

Jika rekan-rekan ada yang menemui error serupa silahkan buka file Exceptions.php yang ada pada dirketori system/core/Exceptions.php

Kemudian Rubah pada line 189:
 sebelumnya => "public function show_exception(Exception $exception)"  
 edit menjadi => "public function show_exception(Throwable $exception)"  

 dan error message Codeigntier pun menjadi mudah dibaca kembali tanpa ada tambahan error message yang aneh-aneh.

semoga bermanfaat