fadzli.com | blog

 

AMFPHP : ‘VerboseException’ error with message ‘Cannot modify header’

i’ve been looking for this solution since past 4 weeks. Ady did give me some clue to start my investigation. Thanks a bunch ady!!.
Finally i found it in amfphp official website.. doh, i shouldnt be overlook next time.

my problem : im having issue with … Uncaught exception ‘VerboseException’ with message ‘Cannot modify header when i open my php in amfphp service browser.

here is the screenshot, it seems like HTML not translated.
amfphp verboseexception header

This has something to do with BOM header in the unicode

here is the text taken from amfphp official website :-

BOM headers in Unicode files cause corrupt output

BOM headers in your service files may cause the output stream to become corrupt. That is because the output stream will contain the BOM header which is not valid AMF. Although in 99% of cases the BOM headers will not cause issues, some combinations of PHP version and server version and possibly the alignment of Jupiter may cause this rather nasty problem to show up. The solution is either to save as ASCII or to save as Unicode in an editor that doesn’t add a BOM header, and deleting the old BOM header with an hex editor. UltraEdit in particular will do the job. To verify if this is indeed happening, load up Charles or Service Capture. If you see an error like ‘cannot modify header information, output started at (guilty file):line number’, then you’ve found the source of the error. Resave as DOS or Unix ASCII and it should work fine.

i havent make the changes yet.. maybe this evening. hahaha.. cant wait to unleash my photo gallery :)



RSS feed | Trackback URI

5 Comments »

Comment by fadzlizuka
2008-07-04 01:29:28

sigh.. this still not working.. :(

 
Comment by Mario Blataric
2008-09-16 18:08:43

Sollution to this: has to be LAST thing in file. No whitespaces, returns or anything BEFORE

 
Comment by Lars Nitteberg
2008-10-09 07:13:59

Thanx for the tip, saving without the BOM did the trick!

 
Comment by doyle
2010-03-13 00:07:27

I ran into the same problem. But the cause was a single additional whitespace after the php closing tag. After removal everything went back to normal

 

OR leave your details below

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> in your comment.

Trackback responses to this post