Integrated Error Messages

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
Spider M. Mann
Registered User
Posts: 73
Joined: Sat Dec 01, 2007 3:06 pm

Re: Integrated Error Messages

Post by Spider M. Mann »

Nice catch Phantom. I never thought of that.

If anyone else uses this solution, make sure to keep the second line as written above. The directive proposed at the external link causes all .phpx files to be rerouted, thus returning a 404 for the entire website (it did on my Apache server setup, anyway). This is the new and improved version:

Code: Select all

RewriteEngine On
Rewritecond %{REQUEST_FILENAME} !-f
RewriteRule \.php$ /nonexistentfile
I'm pretty sure the "^.+" regular expressions (in the last line) used at the external link are unneeded as well, so I omitted them, and all still seems to function normally.

I don't have any diagnostic software (like Wireshark) to check to make sure all is returning/rerouting correctly, but I think this will work out just fine, just make sure the file you point to is actually nonexistent.

Thanks again, Phantom, for the input.
Deathader
Registered User
Posts: 5
Joined: Sun Jun 01, 2008 7:40 pm
Location: Canada
Contact:

Re: Integrated Error Messages

Post by Deathader »

How would I go about changing what the error pages look like?

I mean, I want to add a "404 Image" to my page, so how would I do it?

Thanks,
Alex
User avatar
Phantom784
Registered User
Posts: 290
Joined: Wed Aug 08, 2007 3:09 am
Location: State College, PA
Contact:

Re: Integrated Error Messages

Post by Phantom784 »

Find

Code: Select all

	case '404':
		trigger_error('ERROR_NOT_FOUND');
in error.php and replace ERROR_NOT_FOUND with the image that you want eg. <img src="error.png" />. Be sure to keep the single quotes.
Want to contact me? Find out how at http://francisfisher.com/contact.php
moozer
Registered User
Posts: 102
Joined: Sat Nov 10, 2007 10:36 pm
Location: Netherlands
Contact:

Re: Integrated Error Messages

Post by moozer »

can anyone share some info with me about how to get this to work on a win2K3 server?
Board at http://www.noobdude.com , Running phpbb3, Template(s) used: ProSilver, Language(s) used: English, Its hosted on a local server, Version of PHP used: 5.2.0, Database and version used: MySQL 5
User avatar
callumacrae
Former Team Member
Posts: 2662
Joined: Tue Feb 12, 2008 12:28 pm
Location: London, UK
Name: Callum Macrae
Contact:

Re: Integrated Error Messages

Post by callumacrae »

Thanks, great MOD.

I had a little trouble finding .htaccess, but now I'm fine :)
macr.ae = my website. you probably won't like it.
Proud user ofProud user of
User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Integrated Error Messages

Post by MartectX »

Is there a way to avoid broken error pages on paths below the phpBB root path? For example if I request /styles/lol.html the custom error page displays but the CSS link and all image links and <a> links are broken (the page assumes I'm in the root directory)! Error.php should somehow sense where the Error Request is coming from and change the phpbb_root_path accordingly: In my former example it should have been "../".

Sorry if I'm totally wrong, though. :?
User avatar
Phantom784
Registered User
Posts: 290
Joined: Wed Aug 08, 2007 3:09 am
Location: State College, PA
Contact:

Re: Integrated Error Messages

Post by Phantom784 »

MartectX wrote:Is there a way to avoid broken error pages on paths below the phpBB root path? For example if I request /styles/lol.html the custom error page displays but the CSS link and all image links and <a> links are broken (the page assumes I'm in the root directory)! Error.php should somehow sense where the Error Request is coming from and change the phpbb_root_path accordingly: In my former example it should have been "../".

Sorry if I'm totally wrong, though. :?
the mod should include a fix to this problem, i encountered and worked around it during development. could you give me the link to the site you are experiencing this problem on?
Want to contact me? Find out how at http://francisfisher.com/contact.php
User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Integrated Error Messages

Post by MartectX »

Phantom784 wrote:the mod should include a fix to this problem, i encountered and worked around it during development. could you give me the link to the site you are experiencing this problem on?
Here you go - Thanks for looking into this!
User avatar
Phantom784
Registered User
Posts: 290
Joined: Wed Aug 08, 2007 3:09 am
Location: State College, PA
Contact:

Re: Integrated Error Messages

Post by Phantom784 »

MartectX wrote:
Phantom784 wrote:the mod should include a fix to this problem, i encountered and worked around it during development. could you give me the link to the site you are experiencing this problem on?
Here you go - Thanks for looking into this!
It looks like you didn't complete the instructions for the template modifications. Go into the templates folder and follow the instructions for prosilver and/or subsilver2.
Want to contact me? Find out how at http://francisfisher.com/contact.php
User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Integrated Error Messages

Post by MartectX »

Phantom784 wrote:It looks like you didn't complete the instructions for the template modifications. Go into the templates folder and follow the instructions for prosilver and/or subsilver2.
Thank you very much, I'm embarrassed... *g*
.knightl3y
Registered User
Posts: 5
Joined: Mon May 05, 2008 2:23 am

Re: Integrated Error Messages

Post by .knightl3y »

Not Found

The requested URL /p3forum/page was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
lol

Ok, I got that solved. Turned out that since my root directory didn't include "phpbb3" I had to change that in .htaccess

But I still get the error message if I use a link with the /page.php ending. just /page and /page.html show correct error text.
User avatar
GoBieN
Registered User
Posts: 546
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: Integrated Error Messages

Post by GoBieN »

.knightl3y wrote:
Not Found

The requested URL /p3forum/page was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
lol

Ok, I got that solved. Turned out that since my root directory didn't include "phpbb3" I had to change that in .htaccess

But I still get the error message if I use a link with the /page.php ending. just /page and /page.html show correct error text.
Perhaps your host is using php as CGI.
Inform with them why error documents do no work when asking a fake php file.
User avatar
Spider M. Mann
Registered User
Posts: 73
Joined: Sat Dec 01, 2007 3:06 pm

Re: Integrated Error Messages

Post by Spider M. Mann »

.knightl3y wrote:But I still get the error message if I use a link with the /page.php ending. just /page and /page.html show correct error text.
Did you try the solution posted above? (Read back a bit for details.)
femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: Integrated Error Messages

Post by femu »

Hi,

I have a different problem with this mod. Also it's calling the error link correctly like http://mydomain.de/phpbb3/error.php?mode=404, it simply shows a white page.

I went through this thread, but couldn't find the solution. Also when I try calling it with other error numbers, it's always only a white page ...

Anybody probably an idea?

Thanks,
femu
User avatar
GoBieN
Registered User
Posts: 546
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: Integrated Error Messages

Post by GoBieN »

femu wrote:Hi,

I have a different problem with this mod. Also it's calling the error link correctly like http://mydomain.de/phpbb3/error.php?mode=404, it simply shows a white page.

I went through this thread, but couldn't find the solution. Also when I try calling it with other error numbers, it's always only a white page ...

Anybody probably an idea?

Thanks,
femu
Try turning on debugging in your config.php (DEBUG and DEBUG_EXTRA true).

I think you probably have a different language on your board (german ?) and so you copied the lang file to the DE directory and changed the text. If this is true, rename that file and upload the original (english) one to the DE directory. White pages are frequently an error in the language files.

If not the solution, i suggest you look at the apache/php error log, there should be more info on the error there.
Locked

Return to “[3.0.x] MOD Database Releases”

cron