I think I have a handle on this. When Apache starts it loads a copy of mod_oorexx.so into memory and that allows it to execute ooRexx scripts. The problem is that the external method addresses are know to Apache, but they will not be known to a started script. This is because ooRexx expects to have to load a copy of the library containing the external methods, it does not know how to resolve them from the current address space.
This is a classic chicken/egg problem. The way to resolve this is to place a copy of mos_oorexx.so in Apache's library path. Just putting it in the module directory is not enough as that is not in Apache's library path. So place a copy (or a link) in /usr/lib and then run ldconfig (do all this as root). Please let me know if this does not work. On 02/24/2010 03:42 AM, Robert Maschek wrote: > Hello, > It seems that my posting from last sunday was lost (at least not shown > here). Anyway here are the results once more. > > > From my point of view the methods are not loaded. > I'm getting 0 for each of it when running the script. > > For more details see the enclosed log of the session. > > Robert > > =============================================== > > Script started on Sun 21 Feb 2010 09:08:11 PM CET] > [r...@www mod_rexx]# cat /usr/local/apache2/bin/Apache.cls > /*---------------------------------------------------------------------- > ------*/ /* > */ /* Copyright (C) W. David Ashley 2004-2008. All Rights Reserved. > */ /* Copyright (c) 2009-2010 Rexx Language Association. All rights > reserved. */ /* > */ /* This program and the accompanying materials are made available > under */ /* the terms of the Common Public License v1.0 which > accompanies this */ /* distribution. A copy is also available > at the following address: */ /* > http://www.ibm.com/developerworks/oss/CPLv1.0.htm > */ /* > */ /* Redistribution and use in source and binary forms, with or > */ /* without modification, are permitted provided that the following > */ /* conditions are met: > */ /* > */ /* Redistributions of source code must retain the above copyright > */ /* notice, this list of conditions and the following disclaimer. > */ /* Redistributions in binary form must reproduce the above copyright > */ /* notice, this list of conditions and the following disclaimer in > */ /* the documentation and/or other materials provided with the > distribution. */ /* > */ /* Neither the name of Rexx Language Association nor the names > */ /* of its contributors may be used to endorse or promote products > */ /* derived from this software without specific prior written > permission. */ /* > */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS */ /* "AS IS" AND ANY EXPRESS OR IMPLIED > WARRANTIES, INCLUDING, BUT NOT */ /* LIMITED TO, THE IMPLIED > WARRANTIES OF MERCHANTABILITY AND FITNESS */ /* FOR A > PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ > /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > INCIDENTAL, */ /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS > OR SERVICES; LOSS OF USE, DATA, */ /* OR PROFITS; OR BUSINESS > INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ /* OF LIABILITY, > WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ /* > NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS > */ /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ /* > */ /* Author: W. David Ashley > */ /* > */ > /*---------------------------------------------------------------------- > ------*/ > /*---------------------------------------------------------------------- > ------*/ /* The Request_rec class > */ > /*---------------------------------------------------------------------- > ------*/ ::class Request_rec public ::METHOD init EXTERNAL "LIBRARY > mod_oorexx WWWNewReqRec" ::METHOD connection EXTERNAL "LIBRARY > mod_oorexx WWWReqRecConnection" ::METHOD server EXTERNAL "LIBRARY > mod_oorexx WWWReqRecServer" ::METHOD next EXTERNAL "LIBRARY mod_oorexx > WWWReqRecNext" ::METHOD prev EXTERNAL "LIBRARY mod_oorexx > WWWReqRecPrev" ::METHOD main EXTERNAL "LIBRARY mod_oorexx > WWWReqRecMain" ::METHOD ismain EXTERNAL "LIBRARY mod_oorexx > WWWReqRecIsMain" ::METHOD the_request EXTERNAL "LIBRARY mod_oorexx > WWWReqRecThe_request" ::METHOD proxyreq EXTERNAL "LIBRARY mod_oorexx > WWWReqRecProxyreq" ::METHOD header_only EXTERNAL "LIBRARY mod_oorexx > WWWReqRecHeader_only" ::METHOD protocol EXTERNAL "LIBRARY mod_oorexx > WWWReqRecProtocol" ::METHOD status_line EXTERNAL "LIBRARY mod_oorexx > WWWReqRecStatus_line" ::METHOD status EXTERNAL "LIBRARY mod_oorexx > WWWReqRecStatus" ::METHOD method EXTERNAL "LIBRARY mod_oorexx > WWWReqRecMethod" ::METHOD method_number EXTERNAL "LIBRARY mod_oorexx > WWWReqRecMethod_number" ::METHOD allowed EXTERNAL "LIBRARY mod_oorexx > WWWReqRecAllowed" ::METHOD bytes_sent EXTERNAL "LIBRARY mod_oorexx > WWWReqRecBytes_sent" ::METHOD header_in EXTERNAL "LIBRARY mod_oorexx > WWWReqRecHeader_in" ::METHOD header_out EXTERNAL "LIBRARY mod_oorexx > WWWReqRecHeader_out" ::METHOD err_header_out EXTERNAL "LIBRARY > mod_oorexx WWWReqRecErr_header_out" ::METHOD subprocess_env EXTERNAL > "LIBRARY mod_oorexx WWWReqRecSubprocess_env" ::METHOD notes EXTERNAL > "LIBRARY mod_oorexx WWWReqRecNotes" ::METHOD content_type EXTERNAL > "LIBRARY mod_oorexx WWWReqRecContent_type" ::METHOD content_encoding > EXTERNAL "LIBRARY mod_oorexx WWWReqRecContent_encoding" ::METHOD > handler EXTERNAL "LIBRARY mod_oorexx WWWReqRecHandler" ::METHOD > content_languages EXTERNAL "LIBRARY mod_oorexx > WWWReqRecContent_languages" ::METHOD no_cache EXTERNAL "LIBRARY > mod_oorexx WWWReqRecNo_cache" ::METHOD uri EXTERNAL "LIBRARY mod_oorexx > WWWReqRecUri" ::METHOD filename EXTERNAL "LIBRARY mod_oorexx > WWWReqRecFilename" ::METHOD path_info EXTERNAL "LIBRARY mod_oorexx > WWWReqRecPath_info" ::METHOD args EXTERNAL "LIBRARY mod_oorexx > WWWReqRecArgs" ::METHOD finfo_stmode EXTERNAL "LIBRARY mod_oorexx > WWWReqRecFinfo_stmode" ::METHOD user EXTERNAL "LIBRARY mod_oorexx > WWWReqRecUser" ::METHOD auth_type EXTERNAL "LIBRARY mod_oorexx > WWWReqRecAuth_type" > /*---------------------------------------------------------------------- > ------*/ /* The Server_rec class > */ > /*---------------------------------------------------------------------- > ------*/ ::class Server_rec public ::METHOD init EXTERNAL "LIBRARY > mod_oorexx WWWNewSrvRec" ::METHOD server_admin EXTERNAL "LIBRARY > mod_oorexx WWWSrvRecServer_admin" ::METHOD server_hostname EXTERNAL > "LIBRARY mod_oorexx WWWSrvRecServer_hostname" ::METHOD port EXTERNAL > "LIBRARY mod_oorexx WWWSrvRecPort" ::METHOD is_virtual EXTERNAL > "LIBRARY mod_oorexx WWWSrvRecIs_virtual" > /*---------------------------------------------------------------------- > ------*/ /* The Connection_rec class > */ > /*---------------------------------------------------------------------- > ------*/ ::class Connection_rec public ::METHOD init EXTERNAL > "LIBRARY mod_oorexx WWWNewCnxRec" ::METHOD aborted EXTERNAL "LIBRARY > mod_oorexx WWWCnxRecAborted" > [r...@www mod_rexx]# > [r...@www mod_rexx]# [r...@www mod_rexx]# cat class_text.rex > /* ---rgf, 2010-02-17, test availability of external mod_ooRexx-methods > */ externalMethodArray=.array~new externalMethodArray~append("LIBRARY > mod_oorexx WWWNewReqRec") externalMethodArray~append("LIBRARY > mod_oorexx WWWReqRecConnection") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecServer") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecNext") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecPrev") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecMain") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecIsMain") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecThe_request") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecProxyreq") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecHeader_only") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecProtocol") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecStatus_line") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecStatus") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecMethod") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecMethod_number") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecAllowed") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecBytes_sent") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecHeader_in") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecHeader_out") > externalMethodArray~append("LIBRARY mod_oorexx > WWWReqRecErr_header_out") externalMethodArray~append("LIBRARY > mod_oorexx WWWReqRecSubprocess_env") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecNotes") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecContent_type") > externalMethodArray~append("LIBRARY mod_oorexx > WWWReqRecContent_encoding") externalMethodArray~append("LIBRARY > mod_oorexx WWWReqRecHandler") > externalMethodArray~append("LIBRARY mod_oorexx > WWWReqRecContent_languages") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecNo_cache") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecUri") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecFilename") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecPath_info") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecArgs") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecFinfo_stmode") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecUser") > externalMethodArray~append("LIBRARY mod_oorexx WWWReqRecAuth_type") > externalMethodArray~append("LIBRARY mod_oorexx WWWNewSrvRec") > externalMethodArray~append("LIBRARY mod_oorexx WWWSrvRecServer_admin") > externalMethodArray~append("LIBRARY mod_oorexx > WWWSrvRecServer_hostname") externalMethodArray~append("LIBRARY > mod_oorexx WWWSrvRecPort") externalMethodArray~append("LIBRARY > mod_oorexx WWWSrvRecIs_virtual") > externalMethodArray~append("LIBRARY mod_oorexx WWWNewCnxRec") > externalMethodArray~append("LIBRARY mod_oorexx WWWCnxRecAborted") > say "testloading external methods:" do descriptor over > externalMethodArray~sortWith(.CaselessComparator~new) parse > var descriptor . . externalEntryName '"' say " " > pp(externalEntryName) testExternalMethodLoading(descriptor) end > ::routine testExternalMethodLoading parse arg descriptor > return .method~loadExternalMethod("testMethod", descriptor)<>.nil > ::routine pp -- "pretty-print" parse arg value > return ("[" || value || "] ")~left(30, ".") [r...@www mod_rexx]# > [r...@www mod_rexx]# > [r...@www mod_rexx]# rexx class_test.rex > testloading external methods: > [WWWCnxRecAborted] ........... 0 > [WWWNewCnxRec] ............... 0 > [WWWNewReqRec] ............... 0 > [WWWNewSrvRec] ............... 0 > [WWWReqRecAllowed] ........... 0 > [WWWReqRecArgs] .............. 0 > [WWWReqRecAuth_type] ......... 0 > [WWWReqRecBytes_sent] ........ 0 > [WWWReqRecConnection] ........ 0 > [WWWReqRecContent_encoding] .. 0 > [WWWReqRecContent_languages] . 0 > [WWWReqRecContent_type] ...... 0 > [WWWReqRecErr_header_out] .... 0 > [WWWReqRecFilename] .......... 0 > [WWWReqRecFinfo_stmode] ...... 0 > [WWWReqRecHandler] ........... 0 > [WWWReqRecHeader_in] ......... 0 > [WWWReqRecHeader_only] ....... 0 > [WWWReqRecHeader_out] ........ 0 > [WWWReqRecIsMain] ............ 0 > [WWWReqRecMain] .............. 0 > [WWWReqRecMethod] ............ 0 > [WWWReqRecMethod_number] ..... 0 > [WWWReqRecNext] .............. 0 > [WWWReqRecNotes] ............. 0 > [WWWReqRecNo_cache] .......... 0 > [WWWReqRecPath_info] ......... 0 > [WWWReqRecPrev] .............. 0 > [WWWReqRecProtocol] .......... 0 > [WWWReqRecProxyreq] .......... 0 > [WWWReqRecServer] ............ 0 > [WWWReqRecStatus] ............ 0 > [WWWReqRecStatus_line] ....... 0 > [WWWReqRecSubprocess_env] .... 0 > [WWWReqRecThe_request] ....... 0 > [WWWReqRecUri] ............... 0 > [WWWReqRecUser] .............. 0 > [WWWSrvRecIs_virtual] ........ 0 > [WWWSrvRecPort] .............. 0 > [WWWSrvRecServer_admin] ...... 0 > [WWWSrvRecServer_hostname] ... 0 > [r...@www mod_rexx]# > [r...@www mod_rexx]# > [r...@www mod_rexx]# exit > exit > > Script done on Sun 21 Feb 2010 09:08:53 PM CET > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel