headers doesnt work on apache1.33

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

headers doesnt work on apache1.33

Post by dude81 »

Hello,
my headers are not working
Ill put one such logic

Code: Select all

if($parameter=="upcoming_events")
                                {
                                echo "upcoming";
                                header("Location:dsa_events_reservations.php?upcoming_events='YES'");
                                }
I can see only that echo message . Also I dont even get a notice header already passed.

Thank You
Sai Krishna
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post by mickd »

check out
Error Reporting
and set it to E_ALL

also its a good idea to set die() after header redirections to stop anything else from getting executed after it.

also are you sure you want quotes around the YES?
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post by thomas777neo »

Dont echo anything before using the header function
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

E_ALL is given but still there is no error reporitng Im echoing a value and after echoing it stops, but ehcoing is given for testing
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

full uri is required for many servers and browsers for header redirection.
Post Reply