Closed (duplicate)
Project:
Shared Sign-On
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2007 at 14:45 UTC
Updated:
25 Feb 2008 at 03:17 UTC
The module is working great for logins across all sites (great work!), however cron.php never gets run on any of the slave sites. Running `wget http://mysite/cron.php` manually shows that it is choking on the authentication redirects. I don't know if this is the right answer, but I was able to work around the problem by adding these lines to the beginning of singlesignon_init():
// If in cron script, do nothing
if ($_SERVER['REQUEST_URI'] == '/cron.php') {
return null;
}
Comments
Comment #1
localhost@2006.planet-soc.com commentedHello, I found the same problem when I attempted to make a cron script that I could run with the Windows scheduler. First I'll explain my setup as this might play a part in the validity of my code below. I'm using the Ionic Isapi URL Rewrite Filter (IIRF) with PHP 5.2.2 on IIS 6 on a Windows server. So I can verify that this code works correctly on Windows.
My attempt is more a less a hack to cron.php and the singlesignon.module files. While this might not be the best implementation, I believe something like this should be considered, as chances are, other forms of issues could occur for scripts other than just cron.php and this one way to plan for future uses.
Note: the $_singlesignon_noredirect_ variable might be done best as an array (a better variable name should probably be used).
Below are the code chunks with the changes made being indicated by comments:
cron.php
singlesignon.module
Comment #2
starkos commentedI have a fix for this and several related problems; you can get it from my site (along with a brief explanation of the fix).
Comment #3
wayland76 commentedDuplicate of http://drupal.org/node/170001