Re: Re: [pmwiki-users] debugging using error_log stuff
| From: | Tamara Temple | Date: | Mon, 13 Jun 2011 17:00:54 +0000 |
| Subject: | Re: Re: [pmwiki-users] debugging using error_log stuff | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313499@lists.php.net to get a copy of this message | ||
On Jun 13, 2011, at 11:59 AM, Tamara Temple wrote:
On Jun 13, 2011, at 4:05 AM, Richard Quadling wrote:It's not Friday, but a general discussion of testing and debugging PHP might be a good thing, no?On 12 June 2011 22:57, Tamara Temple <tamouse.lists@gmail.com> wrote:On Jun 12, 2011, at 4:32 PM, Peter Bowers wrote:On Sun, Jun 12, 2011 at 3:18 PM, Tamara Temple <tamouse.lists@gmail.comI'm not sure it would have in this case, as there were no errors from the PHP side of things -- what I had done was perfectly acceptable to PHP. error_log doesn't require the last 2 arguments and did send the message to the PHP error log with no problems. I just wasn't looking there... I do set those values when I'm developing and testing an application typically, though, so that is good advice in general.Would the use of ... error_reporting(-1); ini_set('display_errors', 1); have helped during your development?wrote:D'oh. Sometimes you stare and stare and stare at something and you still don't see it. Thanks a bunch.function sms($text,$switch=0){global $MessagesFmt; error_log(date(DATE_RFC822)." Entered sms. text=$text.switch=$switch\n",3,"/var/log/pmwiki/error.log");if ($switch == true || is_array($text)) { $MessagesFmt[] = "<pre>" . print_r($text,true) ."</pre>\n";} else { $MessagesFmt[] = $text . "<br />\n"; }# error_log(date(DATE_RFC822)." Exit sms.\n"); error_log(date(DATE_RFC822)." Exitsms.\n",3,"/var/log/pmwiki/error.log");}Missing arguments #2 and #3 -- try as modified above. -Peter