I just wanted to comment because I've experienced a 503 when Down For Maintenance is enabled. I'm not running IIS at all. [edit: i'm running httpd 2.x on unix]
I have a php script in the root of my filesystem that I hit for ajax style requests.. so, the main web page loads (e.g. http://ourserver.com/admin/whatever.php) and the code on that page requests /ajaxHandler.php?foo=bar. So that it can integrate with Zen Cart's utilities ($db, defines, etc) I "include('includes/application_top.php') at the head of this file. When the site is 'down for maintenance', I find that the ajaxHandler.php request returns 503. This means the ajax-driven funcitonality on the page breaks.
I don't know why the 503 is returned, but here's my investigation:
If I put just /ajaxHandler.php?foo=bar into my browser, to directly request the resource, I get the 503 as expected. Now, strangely, if I put an "echo 'hello'" into includes/application_top.php, or includes/autoload_func.php, the 503 stops happening and everything executes correctly (except for the stray 'hello' in the output stream). I presume this is because it breaks an attempted zen_redirect, which would fail if the output stream has been committed. Thus, I guess the $down_for_maint_flag check in init_customer_auth.php which tries to call zen_redirect is what's being reached, but I don't see why this would cause a 503 response code.
That's as far as I've got and I'm a bit tired of debugging this, I'm happy to turn off Down For Maintenance when using this ajax functionality. I thought these thoughts might help someone.
If there is a way of keeping DFM on, and using my ajax script, I'd be very glad to hear it :) If this deserves its own thread I'll be happy to re-post for discussion.
Nick




