Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Session issues with SAFARI

I have a form and payment gateway that I use for a business site. For the payment to be processed, information is sent to my merchant provider's gateway URL (off my site/server) and then redirected back to my site. To a receipt page if you will.

Well, on all my other browsers that I've tested so far (IE6–9, FF, Chrome), everything works beautifully. With Safari, all the session variables come back empty.

I've tested the session ID itself and it is the same throughout the site and never changes. Even when I get back to the receipt page, it stays the same. What I have at the very start of the page is this:

    header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
    session_start();

I found somewhere that said that the header() call could fix the problem but it doesn't! Do you have any suggestions on how to fix this little problem? I'm totally stumped.

like image 431
djdgel Avatar asked Sep 19 '26 02:09

djdgel


1 Answers

Even I had same issue, The following header in before starting Session works well for IE also

<?php
    // sort out ie with the below header
    header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
    session_start();
    $_SESSION = array();
like image 63
Bhavesh B Avatar answered Sep 21 '26 18:09

Bhavesh B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!