Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting

Archive for the ‘PHP’ Category

php session issue in Internet Explorer – subdomain name


2011
Jul 08

we find out a bug in IE7 or above recently. If you use php session, you can run in firefox, google chrome but cannot never success in IE7 or above.

There are many topics discussing the same issue, for example adding p3p, change session.use_trans_sid, change timezone….however, there is one security issue in IE7 or above which let the above solution no longer working.

If the domain/sub-domain name contains an “underscore“, your session cookie will never be created….

for example:

sub_domain.domain.com the security issue from Microsoft (DNS section): http://support.microsoft.com/kb/909264

ie+SSL issue on PHP header for downloading file


2010
Apr 14

If you use SSL, ie will get issue when download file if the PHP header using

header(“Cache-Control: no-cache, must-revalidate”);
header(“Pragma: no-cache”);

When you click the file you want to download, ie will prompt:
“Internet Explorer was unable to open this site.The requested site is either unavailable or cannot be found.Please try again later”

Here is the link talk about this:
http://support.microsoft.com/kb/323308

However, we just need to do some modifications on PHP header and it can actually work.

Here is the PHP header modification:

header(“Content-type: application/octet-stream”);
header(“Content-Disposition: attachment; filename=YOUR_OWN_FILE”);
header(“Cache-Control: private, must-revalidate”);

It should work even on ie now!
header(“Pragma: private”);