Hello,

I have been moving my websites from one server to another. On my old server I was able to send php header information in the middle of a php document (part of a logon form). My new server just shows 'Warning: Cannot modify header information - headers already sent by' is there a particular setting in the php config that could be changed or is it the php version which is causing the problem.

If it helps I can give you the phpinfo file of each server.

Any help will be much appreciated. Thanks
lulemurfan

In standard configuration this error message is accompagnied by the file name and line number where the output started. Did you look there?

A server that allowed you to do this would be pretty unusual. You can't have any output before you use a header. You need to change the code.

Hi lulemurfan,

Open up the php.ini file on your new server and look for the line that starts:

'display_errors = '

.. make sure it reads:

'display_errors = Off'

The server is obviously trying to tell you something with its warning message, but this may help you short-term - I hope it does.

Kind regards

Jim :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.