[imp] debug

Eric Rostetter eric.rostetter at physics.utexas.edu
Thu Feb 6 09:33:57 PST 2003


Quoting dimitra deka <dimi at ucnet.uoc.gr>:

> Hi,
> I want to do debugging to imp. Do you know how can I do that?
> 
> dimi

First, make sure you syslog is working.  Make sure it is logging 
everything.  And I mean everything!  If you make changes to your
syslog.conf file, be sure to restart syslog.  Test that it is working.

Next make sure you have php logging working, enabled, and set high enough.
In your php.ini, set error_reporting to E_ALL, maybe even set display_errors
to on (though I run with it off), log_errors to on, and set error_log
appropriately (I use syslog).

Next, make sure Horde logging is setup and working.  Make sure 
$conf['log'][*] variables are set right.  Set it to log as much as
possible (e.g. with syslog use LOG_DEBUG for example).  
Set $conf['debug_level'] to E_ALL.

If using sql or ldap, make sure you have enabled logging and set it to
a high level in those applications.  Make sure you are getting a log file
(for example, RedHat by default redirects the output/log to /dev/null by
default, which isn't good).

Start doing what you want to debug, and watch the log files.  Most problems
can be caught this way.

If the log files don't help, you can start debugging by examining the code.
If you can't see a problem, insert either php "echo" statements or 
Horde messages (notification for head, raiseMessage for stable) to help
debug things.  Also (instead of echo) see things like var_dump and 
print_r and the like.

If you suspect a syntax error or other problem, you can use the standalone
php program in "lint" mode, e.g. "php -l myfile.php" to see if it passes or
not.  In most cases, if it doesn't pass, it will generate log entries for
the errors.  In any case, it will tell you if there are errors or not.

If none of that is enough, ask again with more details of what you want
to debug.  Things like  using a php debugger/profiler are beyond the 
scope of this message (and this list).

In fact, this kind of question should really go to another list (like 
the horde or dev list).

-- 

Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the imp mailing list