I tried removing the ?> from my files, but that didn't seem to help.
I don't have a space at the end of ?> on any of my files anyway.  This
same exact code worked under cake 1.1, but it isn't in 1.2.

I also did some searching online and found an application called
BabelPad that would save utf-8 files without BOM.  I tried that.  All
of my files appeared to be saved without BOM, but I resaved them
anyway, just in case.

Still didn't work.  I've narrowed the problem down to one line of
code.

$this->Post->Department->find("Department.id = " . $this->data['Post']
['department_id'], array(), null, 1);

Then further down I have a redirect.  The line above is a simple query
to the database.  I can comment this line out and the application
redirects like it should.  If I try to use this line, I get the header
could not be sent error.

This model is associated with two other models.  The User model and
Post model.  I'm unbinding the Post model so the only data being
fetched is Department and user.  In the find method above, if I set
recursive to 0 the application redirects like it should (just grabbing
the department data).  Set to 1 it grabs the User data as well, but
then I get the header can't be sent error.

I'm still trying to narrow the problem down.  If anyone has any
suggestions, I'd appreciate it though.

On Jul 17, 9:06 am, RichardAtHome <[EMAIL PROTECTED]> wrote:
> You can save yourself a *lot* of heartache with this issue by leaving
> off the closing ?> in your php files :-)
>
> --- snip ---
> <?php
> class TestController extends AppController {
>
> function index() {
>
> }
> }
>
> ---end snip---
>
> is enough, the closing ?> is optional
>
> On Jul 17, 2:20 pm, haj <[EMAIL PROTECTED]> wrote:
>
> > I'm using this editor on windows:
>
> >http://www.emeditor.com/
>
> > There is a checkbox in config menu if to add BOM or not for UTF-8.
> > Some editor may not have this feature.
>
> > On Jul 16, 1:07 pm, Stinkbug <[EMAIL PROTECTED]> wrote:
>
> > > Excuse my stupidity on this topic, but I don't really understand
> > > encoding at all.  So how exactly do I save a a file without the BOM?
>
> > > Does it require special software, or what?  I'm on windows.
>
> > > On Jul 14, 11:39 pm, haj <[EMAIL PROTECTED]> wrote:
>
> > > > So, I basically saved all UTF-8 files without BOM and now things works
> > > > beautifully.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to