S
S
sphinks2011-12-04 11:51:51
PHP
sphinks, 2011-12-04 11:51:51

PHP+MySQLi - how to configure error output?

Recently I decided to transfer my small project to php from using MySQL to MySQLi - protection against SQL-injection, other goodies work faster. I rewrote the DAO functions in a new way, but I can’t get it to work from MySQLi, there is no debugging information - when the DAO is connected, the output of the php file simply stops. As a result, DAO minimized the connection function. Everything works, everything connects. Then I decided to add functions to the DAO one at a time and look for where the problem is, at the very first function the connection of the file stopped. E_ALL set in php.ini | E_STRICT. Tell me how to make MySQLi report errors, although it is possible that the errors are not MySQL level but PHP and I have a syntax problem somewhere, but still there are no messages.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2011-12-04
@sphinks

1) Check if you have @ before require/include constructs. If there is, remove it. (The fact is that if an error occurs in a file that was included by @require_once, then you will not see any messages)
2) Use PDO to work with the database.

M
Myroslav Zozulia, 2011-12-04
@diwms

Since you are translating the “project” into MySQLi, I would generally advise you to take a closer look at such a class as adodb
Here is the link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question