Welcome Guest, Not a member yet? Register   Sign In
Lost session
#9

(04-21-2018, 03:59 AM)InsiteFX Wrote: Your sessSavePath doe's not look right to me, I do it like below.

PHP Code:
// change this to below
public $sessionSavePath '../../Tarena/writable/temp';

// change to this
public $sessionSavePath WRITEPATH.'temp/'

See if that makes a difference.


maybe am not asking the right question, after the session is set, below is what its expected to be when it redirects.

PHP Code:
array(2) { ["__ci_last_regenerate"]=> int(1524320738) ["ticket_order_1448937565"]=> array(14) { ["validation_rules"]=> array(3) { ["ticket_holder_first_name06"]=> string(8"required" ["ticket_holder_last_name06"]=> string(8"required" ["ticket_holder_email06"]=> string(20"required|valid_email" } ["validation_messages"]=> array(3) { ["ticket_holder_first_name06"]=> array(1) { ["required"]=> string(40"Ticket holder 1's first name is required" } ["ticket_holder_last_name06"]=> array(1) { ["required"]=> string(39"Ticket holder 1's last name is required" } ["ticket_holder_email06"]=> array(2) { ["required"]=> string(35"Ticket holder 1's email is required" ["valid_email"]=> string(37"Ticket holder 1's email must be valid" } } ["event_id"]=> string(1"7" ["tickets"]=> array(1) { [0]=> array(6) { ["ticket"]=> object(App\Icon\Entities\Tickets\Ticket)#164 (28) { ["ticket_id":protected]=> string(1) "6" ["ticket_event":protected]=> string(1) "7" ["ticket_title":protected]=> string(7) "Another" ["ticket_description":protected]=> string(0) "" ["event_venue_name":protected]=> NULL ["ticket_user":protected]=> string(1) "1" ["event_is_live":protected]=> NULL ["event_venue_name_full":protected]=> NULL ["ticket_quantity_available":protected]=> string(2) "20" ["ticket_max_per_person":protected]=> string(2) "30" ["ticket_start_sale_date":protected]=> string(19) "2018-02-28 17:00:00" ["ticket_end_sale_date":protected]=> NULL ["ticket_created_at":protected]=> string(19) "2018-03-09 15:54:08" ["ticket_updated_at":protected]=> string(19) "2018-04-19 21:13:50" ["ticket_deleted":protected]=> string(1) "0" ["ticket_is_hidden":protected]=> string(1) "0" ["ticket_price":protected]=> string(6) "400.00" ["ticket_is_paused":protected]=> string(1) "0" ["ticket_sort_order":protected]=> string(1) "2" ["ticket_organiser_fees_volume":protected]=> string(4) "0.00" ["ticket_quantity_sold":protected]=> string(1) "0" ["ticket_sales_volume":protected]=> string(4) "0.00" ["ticket_status":protected]=> NULL ["_options":protected]=> array(3) { ["datamap"]=> array(0) { } ["dates"]=> array(4) { [0]=> string(17) "ticket_created_at" [1]=> string(17) "ticket_updated_at" [2]=> string(22) "ticket_start_sale_date" [3]=> string(20) "ticket_end_sale_date" } ["casts"]=> array(0) { } } ["relatives":protected]=> array(0) { } ["ticket_edited_by"]=> NULL ["ticket_min_per_person"]=> string(1) "1" ["ticket_public_id"]=> NULL } ["qty"]=> int(1) ["price"]=> float(400) ["booking_fee"]=> float(0) ["organiser_booking_fee"]=> float(0) ["full_price"]=> float(400) } } ["total_ticket_quantity"]=> int(1) ["order_started"]=> int(1524320738) ["expires"]=> object(Carbon\Carbon)#150 (3) { ["date"]=> string(26) "2018-04-21 15:35:38.759239" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Africa/Lagos" } ["reserved_tickets_id"]=> int(13) ["order_total"]=> float(400) ["booking_fee"]=> float(0) ["organiser_booking_fee"]=> float(0) ["total_booking_fee"]=> float(0) ["order_requires_payment"]=> bool(true) ["event_owner"]=> string(1) "1" } } 


but after the redirect, here is what is left

PHP Code:
array(1) { ["__ci_last_regenerate"]=> int(1524320922) } 

note, the redirect is done with ajax.

below is the code from the setting of the session downward.


PHP Code:
/*
        * The 'ticket_order_{event_id}' session stores everything we need to complete the transaction.
        */
     
     session()->set('ticket_order_' $event_Id, [
     
     'validation_rules'        => $validation_rules,
     
     'validation_messages'     => $validation_messages,
     
     'event_id'                => $event->event_id,
     
     'tickets'                 => $tickets,
     
     'total_ticket_quantity'   => $total_ticket_quantity,
     
     'order_started'           => time(),
     
     'expires'                 => $order_expires_time,
     
     'order_total'             => $order_total,
     
     'order_requires_payment'  => (ceil($order_total) == 0) ? false true,
     
     'event_owner'              => $event->user->user_id,
     
     ]);
     
     

          
/*
        * If we're this far assume everything is OK and redirect them
        * to the the checkout page.
       */
     
  //var_dump($_SESSION);
     
   //die;
     
     if ($this->request->isAJAX()) 
     
     {
     
     return json_encode([
     
        'status'      => 'success',
     
        'redirectUrl' => route_to('showEventCheckout',$event_Id,$event->event_slug),
     
     ]);
     
     }else{
 
             /*
            * Maybe display something prettier than this?
            */
 
             exit('Please enable Javascript in your browser.');
     
     
Reply


Messages In This Thread
Lost session - by scalla - 04-19-2018, 05:03 PM
RE: Lost session - by natanfelles - 04-19-2018, 05:29 PM
RE: Lost session - by skunkbad - 04-19-2018, 05:30 PM
RE: Lost session - by scalla - 04-19-2018, 05:44 PM
RE: Lost session - by scalla - 04-19-2018, 05:50 PM
RE: Lost session - by InsiteFX - 04-20-2018, 11:13 AM
RE: Lost session - by scalla - 04-21-2018, 12:45 AM
RE: Lost session - by InsiteFX - 04-21-2018, 03:59 AM
RE: Lost session - by scalla - 04-21-2018, 07:32 AM
RE: Lost session - by dave friend - 04-21-2018, 08:50 AM
RE: Lost session - by scalla - 04-21-2018, 09:11 AM
RE: Lost session - by InsiteFX - 04-21-2018, 09:34 AM
RE: Lost session - by scalla - 04-21-2018, 10:40 AM
RE: Lost session - by InsiteFX - 04-22-2018, 05:06 AM
RE: Lost session - by scalla - 04-22-2018, 01:52 PM
RE: Lost session - by InsiteFX - 04-22-2018, 02:56 PM
RE: Lost session - by scalla - 04-23-2018, 04:34 AM
RE: Lost session - by scalla - 04-23-2018, 11:06 PM
RE: Lost session - by kilishan - 04-22-2018, 07:50 PM
RE: Lost session - by scalla - 04-23-2018, 04:35 AM
RE: Lost session - by InsiteFX - 04-24-2018, 03:55 AM
RE: Lost session - by scalla - 04-24-2018, 04:00 AM
RE: Lost session - by InsiteFX - 04-24-2018, 06:56 AM
RE: Lost session - by scalla - 04-24-2018, 09:51 AM
RE: Lost session - by Narf - 04-24-2018, 11:46 AM
RE: Lost session - by Mayk - 04-24-2018, 12:24 PM
RE: Lost session - by scalla - 04-25-2018, 07:52 AM
RE: Lost session - by Mayk - 04-25-2018, 11:04 AM
RE: Lost session - by natanfelles - 04-24-2018, 11:40 PM
RE: Lost session - by InsiteFX - 04-26-2018, 03:17 AM
RE: Lost session - by Gary - 11-04-2019, 09:35 AM
RE: Lost session - by jim1001 - 05-21-2020, 02:57 AM
RE: Lost session - by Gary - 07-06-2021, 12:09 PM
RE: Lost session - by hmiura - 05-07-2021, 01:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB