Jump to content

[SOLVED] header error displaying after editing in Expression Web


Recommended Posts

G'day

 

Just recently upgrade to Microsoft Expression Web from Microsoft Frontpage, and have discovered that any file I edit where I have this line at the start of the file:

<?

    session_start();

    include("checkfilename.php");

?>

comes up with 'cannot modify header' error, yet I haven't touched the header, and this is only apparent since I have gone to using Expression Web to edit my pages.

So is there something in Expression Web that somewhere changes something in the file i'm editing that I can't see?

 

Cheers

It would seriously help if you posted one of the complete error messages.

 

If the error message states the output is starting on line 1, then it is most likely that your files are being saved as UTF-8 instead of ANSI (ASCII) and the BOM characters that the editor places at the start of the file is the content that is being output that prevents the headers from working.

It would seriously help if you posted one of the complete error messages.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/website/public_html/test.php:1) in /home/website/public_html/test.php on line 2

 

I see you mentioned something about UTF-8 & Ansi, I did see something somewhere in expression web about that. If it is UTF8, then how do I change it?

If your page must be saved as UTF-8, then save it without the BOM. If the editor you are using does not have that option, time to use a real programming editor.

I just want to save it like how it use to save it on Frontpage.

And whats a real editor? I thought thats what expression web was, or are you referring to linux software which I don't know much about?

In Save the current file as: dropdown choose Unicode (UTF-*) (or an

encoding that you want)

Clear the checkbox “Include a byte-order mark (BOM) when saving as

Unicode - Click Save as… and overwrite the original file.

In Save the current file as: dropdown choose Unicode (UTF-*) (or an

encoding that you want)

Clear the checkbox “Include a byte-order mark (BOM) when saving as

Unicode - Click Save as… and overwrite the original file.

Thankyou, that appears to work sweel. The ascii one I could find was 'US (Ascii)'.

Thanks for your help, most appreciated.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.