Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to Redirect PHP script error to a Custom error page
Old 05-23-2011, 04:42 AM How to Redirect PHP script error to a Custom error page
Novice Talker

Posts: 9
Trades: 0
I want to redirect any php script error

eg. 404 redirect

to my custom error page

how do i do this?
WebmasterDiaper is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-23-2011, 04:58 AM Re: How to Redirect PHP script error to a Custom error page
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
I don't know these things by heart but it can be set at the server, i.e. in a .htaccess file i think. You don't need php for this. Have you tried searching google for "custom 404 error page"?
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 05-23-2011, 05:06 AM Re: How to Redirect PHP script error to a Custom error page
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://httpd.apache.org/docs/1.3/mod...#errordocument
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-27-2011, 01:05 PM Re: How to Redirect PHP script error to a Custom error page
Average Talker

Posts: 18
Trades: 0
Thank you OP for this topic. I am not a pro to HTML and PHP stuff by the way.

Quote:
Originally Posted by lizciz View Post
I don't know these things by heart but it can be set at the server, i.e. in a .htaccess file i think. You don't need php for this.
So, can I create a 404 error page in html instead of php?

like

http://www.mydomain.com/404.html
SparkyMonkey is offline
Reply With Quote
View Public Profile
 
Old 05-27-2011, 05:50 PM Re: How to Redirect PHP script error to a Custom error page
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by SparkyMonkey View Post
Thank you OP for this topic. I am not a pro to HTML and PHP stuff by the way.



So, can I create a 404 error page in html instead of php?
Yes.
After all PHP is HTML when served to the browser
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-04-2011, 08:06 PM Re: How to Redirect PHP script error to a Custom error page
expertspk's Avatar
Junior Talker

Posts: 2
Trades: 0
use "Error Pages" option in your Web Hosting control Panel (cPanel)
expertspk is offline
Reply With Quote
View Public Profile
 
Old 06-06-2011, 04:38 PM Re: How to Redirect PHP script error to a Custom error page
Average Talker

Posts: 18
Trades: 0
I found this very helpful page and would like to share with you.
Hope it helps

http://php.net/manual/en/function.header.php

Quote:
Originally Posted by expertspk
use "Error Pages" option in your Web Hosting control Panel (cPanel)
I have cpanel , where do i see that?
SparkyMonkey is offline
Reply With Quote
View Public Profile
 
Old 06-06-2011, 04:55 PM Re: How to Redirect PHP script error to a Custom error page
Shey's Avatar
Keeper of the herd

Posts: 1,598
Name: Shey
Location: Behind you, laying my ever corrupting hands upon your shoulders. Soon, you shall be an extension of me.
Trades: 0
It's under Advanced





Attached Images
File Type: png advanced.png (37.9 KB, 9 views)
File Type: png advanced1.png (18.9 KB, 9 views)
__________________
RenditionDigital provides Software Development, Games Development, Digital Publishing, Social Media moderation in all flavors-
Please login or register to view this content. Registration is FREE
. What is software engineering? There is a great group of highly skilled tech people
Please login or register to view this content. Registration is FREE
. |Also visit My Blog
Please login or register to view this content. Registration is FREE
Shey is offline
Reply With Quote
View Public Profile Visit Shey's homepage!
 
Reply     « Reply to How to Redirect PHP script error to a Custom error page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.59771 seconds with 13 queries