Monday, March 28, 2011

Facebook canvas application and cookie issue with Internet Explorer

The Internet Explorer does not allow cross domain cookies for iframe. This causes the Facebook iframe application to not be able to write Facebook authentication cookie on the client side and it tries to authenticate each time you try to access any page of the Facebook app. This problem does not exist for Firefox.
This can be easily solved using P3P header. Here is how this can be done in PHP
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
use this code wherever you write some cookie. This is harmless for Firefox.

Zypper/Yast: Download all RPM packages first and then install

Yast is the package management tool in open SuSE and its back-end is zypper. One of frequent issue that I have faced with zypper is that it installs a RPM package as soon as it downloads. It does not download the dependent RPMs before installing a RPM package. Sometime this leads to broken installs if there is some network problem while downloading the dependent RPMs. The problem becomes even worse if there is some network problem while the system update is going on. Once I had a broken update for KDE and I was not able to log into the GUI.
The behavior of zypper can be changed by config file. But I do not understand why the Open SuSE comes with behavior by default. The other popular Linux destro Ubuntu does not have this problem.
Anyway, I here is the solution to the probelm:-
Search for the line
commit.downloadMode
in 
/etc/zypp/zypp.conf
By default this line is commented. Uncomment this line and change it to  
commit.downloadMode = DownloadInAdvance