> +1 for trigger_error(); -1 for user_error: alias for trigger_error OK, use trigger_error(). Is user_error() a deprecated alias?
> syslog seems always a bit suspicious to me. Depending on the webserver > configuration, that user may have insufficient rights to write into?? > On win detailed tuning of user-rights maybe neceessary (ok, you talked > about production sites, but there maybe also some sites running on w2k > or winnt :-) ) What trigger_error() actually do depens on the PHP setup. I would not like to make this a base recommendation for everybody to use syslog. I use this option on a winnt server, and it works fine, without outputting any error messages to the user. > $conn = mysql_connect(...) or user_error("Cannot connect", E_USER_ERROR); > lacks flexibility, not in error_handling but the in the or construct. Philip > Olson dropped a note about this in a recent mail. > Therefore my suggestion: > $conn = mysql_connect(...); > if !("whatever...."); > doSomething(); > echo 'output stuff'; > trigger_error("Cannot connect", E_USER_ERROR); Echo is the thing I think we need to get rid of here... If you use this scruipt on a production site, it is not likely, that you would like to user see the echoed output (debug info in most cases). Now the only thing left is the doSomething() method, which is only needed if you would like to do something on error before invoking trigger_error(). Trigger_error() is nice to handle general errors, like no connection, in which case it can redirect to a general error page for example. If something special needed in the example, a doSomething() kind of call can be inserted. In most of the cases IMHO, there is no special thing to do, but to present a general error and log it somewhere... > (Sample output: > not as familiar to docbook as you are. > Therefore i just copied this from array.xml; first example with screen.. > Btw. there are many differrent ways used with this <sreen> thing.) Check if it is still there, from where you copied. If it is, then it is docbook compatible. I faced with some problems with <para>s in examples lately in the HU branch, so I think this is not valid. I have not checked the DTD or the docs though... > 0ne comment to strings and variables and output with echo: > echo $string, "blabla", .....; maybe an alternative? This works, but . is used most of the time IMHO. Goba