Jump to content

Db. Errors Not Propagated (Or Config Issue?)


Richard Foley

Recommended Posts

I have an insert which is failing in lib/pear/DB/DataObject.php here:

 

            $this->raiseError("insert:No table definition for {$this->__table}",
                DB_DATAOBJECT_ERROR_INVALIDCONFIG);
            return false;

 

Never mind about the source of the error for now, I'm working on that (fixed). The issue is that I didn't see this error until I hunted it down by cut and destroy. The code in question returned false and continued otherwise silently. So, my question is whether my config is insufficient to call attention to this error, or is something else going on inside Revive which stops the error from being propagated out.

 

In my php.ini I have, although nothing appears in the apache error logs, or in php_errors.log either:

  error_reporting = E_ALL
  display_errors = On
  log_errors = On
  error_log = php_errors.log

In my Revive config I have, although nothing appears in the var/debug.log (and yes, it's writable).

  [log]
  enabled=1
  type=file
  name="debug.log"

Following dumping information manually to screen, I found the DB_DATAOBJECT_ERROR_INVALIDCONFIG call, however, without this: Nothing appears on screen, or in any logging/debug file.

 

Excuse me for showing my ignorance, but perhaps there is a simple flag I'm missing, or someone has some helpful pointers here...?

Link to comment
Share on other sites

  • 1 year later...

Hi @Richard Foley,

Did you ever get anywhere with this? I have always wondered myself, and knowing would be a good addition to https://documentation.revive-adserver.com/display/DOCS/Developer+Guide

We do set error reporting in the init.php file to try and help https://github.com/revive-adserver/revive-adserver/blob/master/init.php#L69 - but PHP sometimes seems to have a mind of its own in this matter.

I wonder if the PHP error reporting level was being set in the web server configuration?

The best way of debugging is to use an IDE, though - set breakpoints and inspect as you execute the code. It's better than printing out information to try and debug.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...