Gentoo Archives: gentoo-server

From: Peter Abrahamsen <rainhead@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] handling syntax/parse errors with PHP
Date: Tue, 27 Nov 2007 19:27:19
Message-Id: e3171c650711271124m44f8d972o60b18ef85a49dca2@mail.gmail.com
In Reply to: [gentoo-server] handling syntax/parse errors with PHP by Andrew Gaffney
1 Hi Andrew,
2
3 I'm not aware of any way to do this. At my last job we focused on
4 making sure syntax errors never get into the repository, which was
5 easy to do. We had a pre-commit hook that ran .php files through php
6 -l (lint mode). If that failed, the commit was rejected. I had another
7 hook that made sure all the files contained only valid unicode.
8
9 I believe there is documentation out there for how to make the hook.
10
11 Cheers,
12 Peter
13
14 On Nov 27, 2007 9:47 AM, Andrew Gaffney <agaffney@g.o> wrote:
15 > In my PHP-based websites for work, I have some error handling code that captures
16 > any errors, displays a "friendly" error page, and then sends me an email with
17 > all the details about the error.
18 >
19 > However, this doesn't work for syntax/parse errors in pages, since the code is
20 > not actually executed in this case. I can't seem to find anything online about
21 > capturing these errors and notifying myself somehow.
22 >
23 > Does anyone do something like this already?
24 >
25 > --
26 > Andrew Gaffney http://dev.gentoo.org/~agaffney/
27 > Gentoo Linux Developer Catalyst/Installer + x86 release coordinator
28 > --
29 > gentoo-server@g.o mailing list
30 >
31 >
32 --
33 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] handling syntax/parse errors with PHP Andrew Gaffney <agaffney@g.o>