Jump to content

Trouble With Header() Redirect On My Php Page


sylvest

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...