Re: Cannot modify header information - headers already sent by ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually, I think I fixed it by moving the style sheets below the
instantiation of the facebook client, where I *think* set_user was
being called.  I'm still curious if it's possible to get stack trace
information on errors, though.  :)

Waynn

On Mon, Apr 21, 2008 at 5:39 PM, Waynn Lue <waynnlue@xxxxxxxxx> wrote:
> This is for a facebook app, so it's just
>
>
>   public function set_user($user, $session_key, $expires=null) {
>     if (!$this->in_fb_canvas() && (!isset($_COOKIE[$this->api_key . '_user'])
>                                    || $_COOKIE[$this->api_key .
>  '_user'] != $user)) {
>       $cookies = array();
>       $cookies['user'] = $user;
>       $cookies['session_key'] = $session_key;
>       $sig = self::generate_sig($cookies, $this->secret);
>       foreach ($cookies as $name => $val) {
>         setcookie($this->api_key . '_' . $name, $val, (int)$expires);
>         $_COOKIE[$this->api_key . '_' . $name] = $val;
>       }
>       setcookie($this->api_key, $sig, (int)$expires);
>       $_COOKIE[$this->api_key] = $sig;
>     }
>     $this->user = $user;
>     $this->api_client->session_key = $session_key;
>   }
>
>  But the problem is I can't tell where it's being called.  Is there any
>  way to generate a stack trace from the error logs so I know what the
>  calling function is?
>
>
>
>  On Mon, Apr 21, 2008 at 4:37 PM, Daniel Brown <parasane@xxxxxxxxx> wrote:
>  > On Mon, Apr 21, 2008 at 11:33 AM, Waynn Lue <waynnlue@xxxxxxxxx> wrote:
>  >  > I fixed this last time by looking for white space both before and
>  >  >  after the opening and closing php tags, as a Google search had
>  >  >  revealed.  But this time, I've spent an hour running down various
>  >  >  files and not seeing what the heck is wrong.  Here's the essential
>  >  >  setup.
>  >  >
>  >  >  main.php
>  >  >  <?
>  >  >
>  >  >  require_once 'shared_style.php';
>  >  >  require_once 'something.php'
>  >  >
>  >  >  ?>
>  >
>  >     If something.php is setting cookies and such, it has to be above
>  >  shared_style.php.  If you've already tried that with no success, post
>  >  the code of something.php for us to view.
>  >
>  >  --
>  >  </Daniel P. Brown>
>  >  Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
>  >  $59.99/mo. with no contract!
>  >  Dedicated servers, VPS, and hosting from $2.50/mo.
>  >
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux