Link to home
Start Free TrialLog in
Avatar of ppeiris
ppeiris

asked on

serializing session objects

Hi

I have a series of classes written in php and passing around using session variables. Everything was working fine until I had to embed my inventory search pages in to different domains using iframes. even with iframe it works except IE. In IE+iframe doesn't pass the session variables correctly so I had to serialize my objects and save in to a tmp file first, and when i need the object in different page I unserialize the object from the tmp file. Even this is working fine, except when inheritance links are broken of the objects. I know that I have to include all the class definitions in to the file where I unserialize the objects, but still it won't keep the inheritances. I just include the class definition by using require_once('class.php'); .

Any ideas ?????

Thank you
~Prabath

Avatar of DerkArts
DerkArts
Flag of Netherlands image

Not a real answer to your question, but you can fix the ie iframe session problem with a p3p header.

just put a .htaccess file in you server root (of the iframed page) with these lines:
#P3P Header example
header append P3P 'policyref="URI", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'

and your sessions should work like a charm.  Has something to do with ie security blocking session cookies from another domain.


Avatar of ppeiris
ppeiris

ASKER

Hi

Thank you for your reply

It is quite encouraging to see this solution. I have done exactly what you ask me to do, but still I am out of luck.

here is the link http://preview.nsource.com/lemieux/diamond_search.asp

the main domain is not my domain but the iframe contents are mine. if you see in the source page i have a domain call www.uniquediamondcollection.com. if you browse this site in firefox you can see the results, just go head and make a diamond search and do the second search, you will see the problem in IE.

I have created a .htaccess file in my root folder and add the lines below
#P3P Header example
header append P3P 'policyref="www.uniquediamondcollection.com", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'

in addition to this

LoadModule headers_module path/to/mod_headers.so
and
AddModule mod_headers.c
are enabled in my Apache server.

Am I doing something wrong or missing something ?

Thank you
~Prabath



Have you added i to the root of the iframed page? Or the page that contains the iframe. Because i don't see the header in the request...

Secondly, you do NOT need to edit what i posted, i see you put the URL of the website instead of URI. Remove that, just put it in the .htaccess exactly as i posted. That should do the trick....
Avatar of ppeiris

ASKER

Thank you for your help

I have correct my mistakes and put the .htaccess file in to the root folder of the iframed domain (which is www.uniquediamondcollection.com) NOT in to the page that contains the iframe (i don't have access to that domain which is http://preview.nsource.com/)  still doesn't do the trick.

now my .htaccess file contents looks like this:
#P3P Header example
header append P3P 'policyref="URI", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'

what is the .htaccess file permission should be ? mine is set to 644 at this moment.

Thank you
~Prabath
I still dont see the request. Could you try putting the the .htaccess in directory /Login/search/

Avatar of ppeiris

ASKER

it is there. is it possible if I can include the header information directly in to the <head> section ? if so how can I do that ? or can i copy all these in to a xml file and bring that fine using <link> tag if so could you please show me the html code ?

thank you
~Prabath
ASKER CERTIFIED SOLUTION
Avatar of DerkArts
DerkArts
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ppeiris

ASKER

Thank you very much and this works.
Avatar of ppeiris

ASKER

Thank you very much for helping me to fix this problem. I still didn't get the .htaccess file working, now the site is working customer is happy and I have time in my hand to play around with .htaccess file. Thank you again for your great help.

~Prabath