1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Hello, |
5 |
|
6 |
In theory, a production server shouldn't have files with parse errors. |
7 |
It may be why there's no easy way to handle such an error. So I cannot |
8 |
give you the way to show a custom error page. |
9 |
But, for the second point, you may use php.ini' setting like log_errors, |
10 |
error_log (the logfile path), and ignore_repeated_errors in order to |
11 |
keep a little file. So you can parse this file and then send a mail, or |
12 |
whatever you want to do with errors. |
13 |
|
14 |
I hope it can help you. If you find a way to redirect on such error, |
15 |
i'll be happy to know how to do ;) |
16 |
|
17 |
Jil Larner. |
18 |
|
19 |
Andrew Gaffney a écrit : |
20 |
> In my PHP-based websites for work, I have some error handling code that |
21 |
> captures any errors, displays a "friendly" error page, and then sends me |
22 |
> an email with all the details about the error. |
23 |
> |
24 |
> However, this doesn't work for syntax/parse errors in pages, since the |
25 |
> code is not actually executed in this case. I can't seem to find |
26 |
> anything online about capturing these errors and notifying myself somehow. |
27 |
> |
28 |
> Does anyone do something like this already? |
29 |
> |
30 |
-----BEGIN PGP SIGNATURE----- |
31 |
Version: GnuPG v1.4.7 (GNU/Linux) |
32 |
|
33 |
iD8DBQFHTG0gMBDlpRaep+4RAjlaAKDa872UZIwZ7SLglKduspga3P7rYACg1jk+ |
34 |
NHCZWsPT5Y2UAJJgk+Gm8Yk= |
35 |
=qkrR |
36 |
-----END PGP SIGNATURE----- |
37 |
-- |
38 |
gentoo-server@g.o mailing list |