E
E
ex_coderisimo2016-02-11 21:03:29
CodeIgniter
ex_coderisimo, 2016-02-11 21:03:29

How to defeat Codeigniter error?

Wrote a new part for the project, specially made on the version of Codeigniter 2.0.2 used on the site.
As a result, I have 500 Internal Server Error , without any additional. info.
Moreover, this method of the model works:

public function getStartTotals()
        {
            $total_counts = array();
            $total_counts['casinos'] = $this->db->count_all('casinos');
            $total_counts['machines'] = $this->db->count_all('machines');
            return $total_counts;
        }

but this one will fall without any additional information:
public function getMachines($searched_string)
        {
            $this->db->select('machines.id id , machines.title name');
            $this->db->from('machines');
            $this->db->like('machines.title',$searched_string);
            $query = $this->db->get();
            $result = array();
            foreach ($query->result() as $key) {
                $result[] = $key;
            }
            return $result;
        }

I have access to the server via ftp and cPanel. But I can't find the error log.
Tell me, plz, where to dig?
Thanks
ZY Locally everything works.
update
For people with a similar problem:
1) the use of active record can be disabled in the config
2) the use of $_GET (only $_POST) is disabled
3) In some cases, active record for version 3 differs from the same for version 2 (for example, no groups)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Arutyunov, 2016-02-12
@arutyunov

Comment out the lines, run the method, and see exactly when the problem occurs.
You can also write hard in index.php error_reporting(E_ALL)andini_set('display_errors', 'On')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question