Forum OpenACS Q&A: i keep getting this message

Collapse
Posted by George Adamides on
Error: return: failed to redirect '404': exceeded recursion limit of 3
    Notice: ns_getform using encoding iso8859-7 for charset iso-8859-7

Can anyone tell me what is the problem and how to it?

Collapse
Posted by Torben Brosten on
I think this error results only from an undefined 404 error page, which aolserver tries to redirect to, but upon not finding the page, repeatedly tries again. Gives up after 3 tries and produces its own 404 page.

Openacs4.6.3 has a parameter that defines the error page directory. Under serviceurl/admin/site-map goto set parameters of Main Site. Look at the GlobalURLStub parameter. Value defaults to /global.

Collapse
Posted by Nagita Karunaratne on
Try putting in some 'ns_log notice ...' lines into request-processor-procs.tcl and trace the execution path from rp_filter to rp_handler and rp_internal_redirect and you'll find the reason soon enough.
Collapse
Posted by Brian Fenton on
I'm seeing this too and it's puzzling me. I set GlobalURLStub to /global and created a directory called global containing a file-not-found.html and a forbidden.html. I grepped the source code for GlobalURLStub and the only place it's being used is in navigation-procs.tcl (to build some html in ad_menu_footer). So I don't see how it's being used in the request-processor.

Where is the correct location for this global directory? I've tried putting it a few places: $server, $server/www and even /apps/aol

Thanks.

Collapse
Posted by Torben Brosten on
Hi Brian,

There's an ns_param 404 (and 403) in the config.tcl file.  Aolserver doc[1] shows these as absolute urls which means using service0/www/global/file-not-found.html" for all cases. The openacs config.tcl file shows the 404 parameter values as relative urls, apparently so that a custom 404 page can be created for each directory in the website.

[1] http://www.aolserver.com/docs/admin/config-reference.tcl.txt

[2] http://cvs.openacs.org/cvs/openacs-4/etc/config.tcl?rev=1.19.2.13&only_with_tag=oacs-5-1&view=markup

Collapse
Posted by Brian Fenton on
Cheers Torben, I've tried changing both of those, but no joy. I've an old version of OpenACS, so maybe the GlobalURLStub wasn't fully implemented back then. Thanks anyway.
Collapse
Posted by Torben Brosten on
Hi Brian,

Are the errors resulting from valid http requests in the server log?

On aolserver3.4.2 I see security exploit attempts like this that produce the recursion error:

"SEARCH /(followed by thousands of characters)" 404 549 "" ""

Torben

Collapse
Posted by Brian Fenton on
Yes, they're definitely valid requests. I can see them appear in the log when I type in a bogus URL.