Do you get blank pages?

Discussion in 'aMember Pro v.4' started by rked, Jan 9, 2013.

  1. rked

    rked New Member

    Joined:
    Jun 11, 2007
    Messages:
    29
    Here is what I did...

    Well what I did was look at the Amember logs for errors.
    It gave me the following:
    Cannot send headers; headers already sent in /home/******/public_html/member/application/configs/site.php, line 9
    So what i found in that file at line 9 was this:

    <?php
    Am_Di::getInstance()->hook->add(am_Event::THANKS_PAGE, 'onThanksPage');
    function onThanksPage(Am_Event $event){
    $di = Am_Di::getInstance();
    Am_Controller::redirectLocation('https://www.*******.com/thank-you.html');
    }
    /*?>
    <?php */
    Am_Di::getInstance()->hook->add(Am_Event::USER_AFTER_INSERT, 'onUserAfterInsert');
    function onUserAfterInsert(Am_Event $event){
    $user = $event->getUser();
    $di = Am_Di::getInstance();
    $ticket = $di->helpdeskTicketRecord;
    $ticket->user_id = $user->user_id;
    $ticket->status = HelpdeskTicket::STATUS_AWAITING_USER_RESPONSE;

    ///// TICKET SUBJECT
    $ticket->subject = 'Welcome user '.$user->name_f.' '.$user->name_l;


    $ticket->insert();
    $message = $di->helpdeskMessageRecord;

    $message->admin_id = 1; //// ADMIN ID

    ///// TICKET BODY
    $message->content = 'Welcome to helpdesk. Simple content';



    $message->ticket_id = $ticket->ticket_id;
    $message->insert();

    }

    ?>
    My php programmer friend told me it was the "?> <?php " in the middle. How it got there i dont know, but when I commented it out, everything worked! No more blank pages.
    kokanish likes this.

Share This Page