Jump to content
sylvest

Trouble With Header() Redirect On My Php Page

Recommended Posts

I have a web page which under certain conditions forwards to another one using the statement:

 

header($next_page);

 

where $next_page == "Location: http://www.sylvesterbradley.org/swchoir/index.php?v=1493894983"

 

This causes a 500 error.

 

I am reasonably sure that I have sent no output at all (other than to a log file) before the header statement. In any case, on other occasions where I have done this I seem to get a warning, which in this case is not happening.

 

I see nothing in any error_log files that I am aware of (that is /home/sylvest/error_log and /home/sylvest/pubic_html/swchoir/error_log) nor do I see anything relevant in the cPanel Errors list.

 

What am I doing wrong? How can I debug what is happening? I have a log statement early in the redirected-to file (index.php) and this does not seem to be being triggered, so I don't think it is ever executing this file.

 

Thanks - Rowan

Share this post


Link to post
Share on other sites

Most times when I see a 500 error it's usually a page that was supposed to be ASCII was uploaded in binary mode or it has the wrong permissions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×