GBrowse
GBrowse copied to clipboard
CGI gbrowse_img does not create sessionIds
I have problems with "gbrowse_img" URLs under my local installation using
- centos 6.5
- building perl v.5.18.1
- installed latest cpan, bioperl and gbrowse using cpan:
- as of 14/10/14: CPAN 2.05, BioPerl-1.6.923., GBrowse-2.55
If I clear the browsers cache (and apparently the gbrowse cookie which stores the session id called "gbrowse_sess") and directly go to a ../gbrowse_img/.. "add" URL (e.g.:
/gb2/gbrowse_img/yeast/?name=chrI%3A80%2C000..120%2C000;add=chrI+oli+pelz+100100..100200
) I get a sessionid error message:
[Fri Oct 17 10:05:54 2014] [error] [client 192.108.26.43] Sessionid unavailable at /usr/local/lib64/perl5/Bio/Graphics/Browser2/UserDB.pm line 502.
If I clear the browse cache, then go to a ../gbrowse/.. URL WITHOUT THE ADD URL (e.g. with firebug cookie inspector open: (e.g.:
/gb2/gbrowse_img/yeast/?name=chrI%3A80%2C000..120%2C000
) I see that there it creates the missing "gbrowse_sess" cookie. If I than go to a ../gbrowse_img/.. URL with ADD parameter it works because the cookie has been set before. So the problem is that there is code in the gbrowse which creates a session id cookie only when browsing to the standard gbrowse pages and not in gbrowse_img with "add" parameter.
Since our website makes requests to our gbrowse server through ../gbrowse_img/.. URLS only using the ADD parameter my suggested solution would be to create the missing session id and cookie on the ../gbrowse_img/.. requests if it is not available (e.g. from clearing browser), etc.
Try on your own (tested in Firefox 33): clear browser cache OR "gbrowse_sess" cookie, than:
http://hostname/gb2/gbrowse_img/yeast/?name=chrI%3A80%2C000..120%2C000;add=chrI+oli+pelz+100100..100200
not working! than:
http://hostname/gb2/gbrowse/yeast/ (works!)
than again url from point one:
http://hostname/gb2/gbrowse_img/yeast/?name=chrI%3A80%2C000..120%2C000;add=chrI+oli+pelz+100100..100200
now it works!
Can someone confirm this is a bug or fix this?
I tried calling
gbrowse_new_sessionid.pl
before calling UserDB than I get
[..]
[Fri Oct 24 11:19:08 2014] [error] [client 192.108.26.43] Couldn't make /opt/gbrowse2/lib/userdata/yeast/a2eeb61970fea9b177e3fb7ef98501e0/My_Track/SOURCES directory: No such file or directory at /usr/local/lib64/perl5/Bio/Graphics/Browser2/DataLoader.pm line 270.
So I need to create the whole bunch of session initalization such as creating a session directory.
Best, Oliver