Ok, I tried that. proc is not available for regular adp page code, but if defined inside it, it works. Please see in-line (marked AAA).
I have a feeling that I might miss some configurations, because I am trying to reuse config.tcl from 4.0.10. Do I need to add something to it for 4.5? Thanks, ~ Alex. On 2/16/07, Tom Jackson <[EMAIL PROTECTED]> wrote:
Okay, so the next potential step is to place a call to your proc on a regular tcl page, making sure tcl pages are enabled. visit the page and see if you get the same error: the proc isn't found.
AAA: I put the call into a regular adp page, fancy parser enabled.
You also might try putting the proc on the same tcl page as the call to the proc. So: repeat the error by visiting the /test/ url
AAA: Confirmed, error is there
create a separate test page
AAA: Done
visit the test page with the call to the proc
AAA: proc not found
put a copy of the proc on the page and then revisit
AAA: when proc is defined in the page code, it works OK (later on the same page)
***Also, I noticed that your proc doesn't return anything, just logs a message. Maybe return something, that might be the problem (ns_return 200 text/plain ok)
AAA: Done, no changes
I remember AOLserver used to act weird during a POST to a script which never tried to read the POSTed data. So not returning anything to a request might screw stuff up somewhere else. tom jackson On Friday 16 February 2007 14:09, Alex wrote: > Tom, > > thanks for suggestion ... > redirect worked just as expected (that is, redirected to <server>/ws/) > > Thanks, > ~ Alex. > > On 2/16/07, Tom Jackson <[EMAIL PROTECTED]> wrote: > > Alex, > > > > It seems that at least ns_register_proc is firing at the correct url, but > > the proc itself isn't found. So here is an idea: > > > > register the same url, but use this proc ns_returnredirect: > > > > ns_register_proc GET /test/ ns_returnredirect /ws/ > > > > You have to provide some following url to redirect to, even if it doesn't > > exist. This might flag something very strange. I am running 4.5 from cvs, > > and I use ns_register_proc. I have run the above code, and it works as > > expected. > > > > tom jackson > > > > On Friday 16 February 2007 12:49, Alex wrote: > > > Tom, > > > > > > Changing url doesn't make difference, and I did try to define and > > > register the proc in global namespace explicitly, with no luck. > > > > > > File is located in directory pointed by "ns_param library". From the > > > log, I am positively sure that it's being picked up on server startup. > > > > > > No virtual servers running on this host, and exactly the same code > > > used to work with 4.0.10 > > > ...which makes me wonder if I must do any changes in config.tcl to > > > accommodate 4.5 ??? > > > > > > Thanks, > > > ~ Alex. > > > > > > On 2/16/07, Tom Jackson <[EMAIL PROTECTED]> wrote: > > > > Alex, > > > > > > > > Might be something simple. What if the URL was /test instead of > > > > /test/ ? > > > > > > > > Also, maybe define and register the proc with full namespace > > > > qualification: > > > > ::myproc ... > > > > > > > > Otherwise, I haven't run into any issues with ns_register_proc in the > > > > new release. > > > > > > > > Where exactly is this file located? Maybe there is something with > > > > virtual servers? > > > > > > > > tom jackson > > > > > > > > On Thursday 15 February 2007 22:10, Alex wrote: > > > > > Hi, > > > > > > > > > > I am having strange problem wile moving 4.0.10 -> 4.5, CVS version > > > > > 2006-12-15 ... > > > > > it seemingly doesn't see procs defined in the library and > > > > > registered with ns_register_proc. > > > > > > > > > > So this example code: > > > > > > > > > > #--- file test.tcl -will be picked up from lib directory --- > > > > > > > > > > ns_log debug "Loading test.tcl" > > > > > > > > > > proc reg_test {args} { > > > > > ns_log debug "Ok, here" > > > > > } > > > > > > > > > > ns_register_proc GET "/test/" reg_test > > > > > > > > > > ns_log debug "Loaded tsl.test - and proc [info procs reg_test] is > > > > > defined" > > > > > > > > > > #--------------------------------------------------------- > > > > > > > > > > gives Tcl exceptions when page http://192.168.1.1/test/ is > > > > > requested: > > > > > > > > > > [16/Feb/2007:00:51:59][22157.3083470528][-main-] Notice: nsmain: > > > > > AOLserver/4.5.0 starting > > > > > ... > > > > > [16/Feb/2007:00:52:00][22157.3083470528][-main-] Debug: Loading > > > > > test.tcl [16/Feb/2007:00:52:00][22157.3083470528][-main-] Debug: > > > > > Loaded tsl.test - and proc reg_test is defined > > > > > [16/Feb/2007:00:52:00][22157.3083470528][-main-] Notice: nsmain: > > > > > AOLserver/4.5.0 running > > > > > [16/Feb/2007:00:52:00][22157.3083470528][-main-] Notice: nsmain: > > > > > security info: uid=1005, euid=1005, gid=1005, egid=1005 > > > > > [16/Feb/2007:00:52:00][22157.3071925168][-sched-] Notice: sched: > > > > > starting [16/Feb/2007:00:52:00][22157.3083470528][-main-] Notice: > > > > > driver: starting: nssock > > > > > [16/Feb/2007:00:52:00][22157.3067521968][-nssock:driver-] Notice: > > > > > starting > > > > > [16/Feb/2007:00:52:00][22157.3067521968][-nssock:driver-] Notice: > > > > > nssock: listening on 192.168.1.1:80 > > > > > [16/Feb/2007:00:52:07][22157.3066465200][-conn:0-] Error: Tcl > > > > > exception: invalid command name "reg_test" > > > > > while executing > > > > > "reg_test {}" > > > > > > > > > > Any quick ideas why that could happen? > > > > > > > > > > Thanks, > > > > > ~ Alex. > > > > > > > > > > > > > > > -- > > > > > AOLserver - http://www.aolserver.com/ > > > > > > > > > > To Remove yourself from this list, simply send an email to > > > > > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in > > > > > the email message. You can leave the Subject: field of your email > > > > > blank. > > > > > > > > -- > > > > AOLserver - http://www.aolserver.com/ > > > > > > > > To Remove yourself from this list, simply send an email to > > > > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in > > > > the email message. You can leave the Subject: field of your email > > > > blank. > > > > > > -- > > > AOLserver - http://www.aolserver.com/ > > > > > > To Remove yourself from this list, simply send an email to > > > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the > > > email message. You can leave the Subject: field of your email blank. > > > > -- > > AOLserver - http://www.aolserver.com/ > > > > To Remove yourself from this list, simply send an email to > > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the > > email message. You can leave the Subject: field of your email blank. > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the > email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
-- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.