We help IT Professionals succeed at work.
Get Started

header function in PHP

Last Modified: 2015-06-19
Hi everyone,

I am moving a webpage I have developed from one webserver to another (due to server upgrades).

On the new server the header commands don't work unless they are literally the only thing on the page.

On the old server AND the test server they work find. I am wondering if there is something I am missing in the PHP setup? any help would be appreciated!

Test server and production have the same version of PHP

I have checked all the things people suggest.. there is no echo's, no whitespace (even in the includes), the only one I could get to work had only the header between the 2 php tags.
Watch Question
This problem has been solved!
Unlock 1 Answer and 13 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE