IE7 + SSL + Printing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

IE7 + SSL + Printing

Post by mchaggis »

Hi,

This one is currently confusing me and frustrating me immensely, as there seems to be now logic!

I have a web application that runs over SSL (HTTPS) and as part of the the application is a document builder with the facility to print. This works without a problem in our dev environment (HTTP) but has the following oddness in our live system.
Note: This only affects IE7, not IE6, Firefox, safari! Just IE7

Here is the scenario:

1. Log in
2. Browse through to print page
3. Print Preview - All looks ok
4. Print - Print out has broken images
5. Click refresh - You get redirected to Login prompt
6. Log in
7. Browse through to print page
8. Print - All prints perfectly with no logging out?!?!

I am wasting so much paper trying to solve this problem!

I have tried placing the below at the top of the print page, as recommended for another similar issue I read about:

Code: Select all

header('P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"');
It has not worked, and I must confess I have always put the Privacy Policy stuff to the back of my mind.

It seems to me that on the first launch that when IE7 actually sends the job to the printer it is losing the PHP session cookie and thus logging out prior to it reaching the printer. This raises three questions:
1. Why is no one else experiencing this problem?
2. Why is IE7 insisting on trying to download the page again when send to the printer? (remember, the print preview looks all ok)
3. Why does IE7 only do this the first time of printing?


Any help / pointers will be gratefully read and tried, as long as the rain forests can sustain my printer until I get it fixed!!! :banghead:
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

Re: IE7 + SSL + Printing

Post by mchaggis »

I seem to have solved this, but making sure the following header line is passed out in every page including the login page.

Code: Select all

 
header('P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"'); 
 
After seeing some peoples views on this method through out the internet, I worry about exactly what I am doing with the above, so I think I need to go away and read up :roll:

But if anyone feels like explaining the above P3P headeer to me.... :mrgreen:
Post Reply