Just wanted to share the fruits of my painful morning :-)
On a newly built server an otherwise fully functional labrador wouldn't look up data in the SRA to add new datasets. The javascript function was triggered but the data returned from sra_get_datasets.php was null so it all just hung.
I eventually worked out that nothing was being called in sra_get_datasets.phpbecause of the test there to see if the file was being called as part of an ajax call. The test was:
if(__FILE__ == $_SERVER['SCRIPT_FILENAME']) {
On our system Labrador was installed at /srv/Labrador-0.2 and then there was a symlink linking this to /srv/labrador, and this was the webroot.
On this system the value of __FILE__ was /srv/Labrador-0.2/ajax/sra_get_datasets.php and $_SERVER['SCRIPT_FILENAME'] was /srv/labrador/ajax/sra_get_datasets.php so the test which should have passed actually failed, and stuff went bad from there on.
Not sure what the correct fix is supposed to be but I'll do some more digging.
Just wanted to share the fruits of my painful morning :-)
On a newly built server an otherwise fully functional labrador wouldn't look up data in the SRA to add new datasets. The javascript function was triggered but the data returned from
sra_get_datasets.php
wasnull
so it all just hung.I eventually worked out that nothing was being called in
sra_get_datasets.php
because of the test there to see if the file was being called as part of an ajax call. The test was:On our system Labrador was installed at
/srv/Labrador-0.2
and then there was a symlink linking this to/srv/labrador
, and this was the webroot.On this system the value of
__FILE__
was/srv/Labrador-0.2/ajax/sra_get_datasets.php
and$_SERVER['SCRIPT_FILENAME']
was/srv/labrador/ajax/sra_get_datasets.php
so the test which should have passed actually failed, and stuff went bad from there on.Not sure what the correct fix is supposed to be but I'll do some more digging.