RSS
people

PHP session problem while using iframe.

Hi guys, recently i am so busy and not able to update my website often.

But today, I face a problem on the PHP session while using iframe to include a custom php file.
The custom php file just doing some select/update command using session data.
I try my script in Google Chrome & Mozilla Firefox, everything is working fine but not Internet Explorer.
The data inside the session is not retrievable and causing the entitle script not working.

Below is my sample script

< ?php
  session_start();
  //echo session_id(); //PRINT OUT THE SESSION ID
  if(!isset($_SESSION['mydata']) && $_POST['action'] == 'update')
    die("unable to get mydata");
 
  $_SESSION['mydata'] = 'ANYTHING';
 //PERFORM SELECT/UPDATE
?>

Above just a simple sample, if you using wordpress/joomla (php applications) and iframe the custom page and using Internet Explorer to retrieve and update it. The page should display “unable to get mydata” but not perform the update statement.
After debug for sometime, I try to print out the session_id() and found that everything the iframe page refresh, it will generate another new session_id but not use the previous id (This act differently with Firefox and Chrome) and this is the main issue causing my script is not working.

Then I google a bit and find the solution below.
read more »

16 Comments | Tags: , , ,

SugarCRM unable connect gmail

Recently working on the SugarCRM open source software. Due to some user requirement, I need to setup an inbound email (an email feature inside the SugarCRM) connect to gmail for downloading email using pop3.

After try few times, I found that the test setting is connecting successfully. But when the scheduler job try to establish the connection to gmail, it always fail. Finally, I found the problem is due to the invalid ssl cert and causing the connection failure. Below is the error that imap_open return to me

ERROR Certificate failure for pop.gmail.com: unable to get local issuer certificate: /C=US/O=Google Inc/CN=Google Internet Authority

read more »

1 Comment | Tags: , ,