[jira] Commented: (MODPYTHON-104) Allow Python code callouts with mod_include (SSI).
[ http://issues.apache.org/jira/browse/MODPYTHON-104?page=comments#action_12376180 ] Graham Dumpleton commented on MODPYTHON-104: On Apache 2.2, but not on Apache 2.0, if an error occurs in the Python script, Apache is later crashing at some point. [Tue Apr 25 16:32:13 2006] [error] [client ::1] includes /Users/grahamd/Workspaces/testing/ssi-1/ssi.shtml: Traceback (most recent call last): [Tue Apr 25 16:32:13 2006] [error] [client ::1] includes /Users/grahamd/Workspaces/testing/ssi-1/ssi.shtml: File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/importer.py, line 1377, in IncludeDispatch\nexec(code, filter.req.ssi_globals) [Tue Apr 25 16:32:13 2006] [error] [client ::1] includes /Users/grahamd/Workspaces/testing/ssi-1/ssi.shtml: File string, line 2, in ? [Tue Apr 25 16:32:13 2006] [error] [client ::1] includes /Users/grahamd/Workspaces/testing/ssi-1/ssi.shtml: ImportError: No module named module_1 [Tue Apr 25 16:32:14 2006] [error] [client ::1] File does not exist: /usr/local/apache-2.2/htdocs/favicon.ico [Tue Apr 25 16:32:15 2006] [notice] child pid 5360 exit signal Bus error (10) Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x0005 [Switching to process 5368 thread 0x1203] apr_pool_clear (pool=0x1) at memory/unix/apr_pools.c:685 685 while (pool-child) (gdb) where #0 apr_pool_clear (pool=0x1) at memory/unix/apr_pools.c:685 #1 0x00028c4c in includes_filter (f=0x19117f8, b=0x1911998) at mod_include.c:3402 #2 0x8af8 in default_handler (r=0x190c450) at core.c:3701 #3 0xa224 in ap_run_handler (r=0x190c450) at config.c:157 #4 0xa7ec in ap_invoke_handler (r=0x190c450) at config.c:371 #5 0x0002e44c in ap_process_request (r=0x190c450) at http_request.c:258 #6 0x0002dac0 in ap_process_http_connection (c=0x1902bd0) at http_core.c:172 #7 0x0001cd64 in ap_run_process_connection (c=0x1902bd0) at connection.c:43 #8 0x000441bc in worker_thread (thd=0x1899920, dummy=0x0) at worker.c:531 #9 0x9002ba68 in _pthread_body () The ctx pointer seems to be somehow be getting overwritten with 0. This may be related to issue Nicolas saw on Win32 with Apache 2.2 in test suite, but then that would imply the Python code in the test failed for some reason which it shouldn't have. Allow Python code callouts with mod_include (SSI). -- Key: MODPYTHON-104 URL: http://issues.apache.org/jira/browse/MODPYTHON-104 Project: mod_python Type: New Feature Components: core Reporter: Graham Dumpleton Assignee: Graham Dumpleton Fix For: 3.3 Attachments: MP104_20060317_jgallacher_1.diff, grahamd_20060126_1_mod_include.diff, grahamd_20060226_MP104_1.diff The mod_include module supporting server side includes (SSI), provides a means of registering new element tags which trigger callouts to other code in separate Apache modules. This is used for example in mod_perl to allow Perl language code to be used with server side includes: !--#perl sub=MySSI::remote_host -- !--#perl arg=Hello arg=SSI arg=World sub=sub { my($r, @args) = @_; print qq(@args); } -- An equivalent feature for Python was previously asked about on the mailing list back in 2004: http://www.modpython.org/pipermail/mod_python/2004-January/014832.html Since it seems entirely reasonable that such integration of mod_python and mod_include would be possible, thought it would be good to log it as a possible new feature. Because of SSI's support for basic conditionals, includes and other callout mechanisms, would be a good quick and dirty way of doing templating without having to resort to PSP, or other high level templating systems. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MODPYTHON-104) Allow Python code callouts with mod_include (SSI).
[ http://issues.apache.org/jira/browse/MODPYTHON-104?page=comments#action_12370851 ] Jim Gallacher commented on MODPYTHON-104: - Comparing the current version with grahamd_20060226_MP104_1.diff, it looks like some of the apache 2.2 code got copied over into the section for apache 2.0. Fix is attached as MP104_20060317_jgallacher_1.diff. -SSI_CREATE_ERROR_BUCKET(ctx, f, bb); +CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); +release_interpreter(); I still haven't reviewed the rest of the code, but unit tests passed once the patch is applied. Allow Python code callouts with mod_include (SSI). -- Key: MODPYTHON-104 URL: http://issues.apache.org/jira/browse/MODPYTHON-104 Project: mod_python Type: New Feature Components: core Reporter: Graham Dumpleton Assignee: Graham Dumpleton Fix For: 3.3 Attachments: MP104_20060317_jgallacher_1.diff, grahamd_20060126_1_mod_include.diff, grahamd_20060226_MP104_1.diff The mod_include module supporting server side includes (SSI), provides a means of registering new element tags which trigger callouts to other code in separate Apache modules. This is used for example in mod_perl to allow Perl language code to be used with server side includes: !--#perl sub=MySSI::remote_host -- !--#perl arg=Hello arg=SSI arg=World sub=sub { my($r, @args) = @_; print qq(@args); } -- An equivalent feature for Python was previously asked about on the mailing list back in 2004: http://www.modpython.org/pipermail/mod_python/2004-January/014832.html Since it seems entirely reasonable that such integration of mod_python and mod_include would be possible, thought it would be good to log it as a possible new feature. Because of SSI's support for basic conditionals, includes and other callout mechanisms, would be a good quick and dirty way of doing templating without having to resort to PSP, or other high level templating systems. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MODPYTHON-104) Allow Python code callouts with mod_include (SSI).
[ http://issues.apache.org/jira/browse/MODPYTHON-104?page=comments#action_12370468 ] Graham Dumpleton commented on MODPYTHON-104: Patches for SSI support will not work with Apache 2.2. Names of macros have changed which mean it will not compile and the prototype of a registered handler for include tags has changed meaning that it will then crash when called, even after macros fixed, as arguments don't match up. :-( Allow Python code callouts with mod_include (SSI). -- Key: MODPYTHON-104 URL: http://issues.apache.org/jira/browse/MODPYTHON-104 Project: mod_python Type: New Feature Components: core Reporter: Graham Dumpleton Assignee: Graham Dumpleton Fix For: 3.3 Attachments: grahamd_20060126_1_mod_include.diff, grahamd_20060226_MP104_1.diff The mod_include module supporting server side includes (SSI), provides a means of registering new element tags which trigger callouts to other code in separate Apache modules. This is used for example in mod_perl to allow Perl language code to be used with server side includes: !--#perl sub=MySSI::remote_host -- !--#perl arg=Hello arg=SSI arg=World sub=sub { my($r, @args) = @_; print qq(@args); } -- An equivalent feature for Python was previously asked about on the mailing list back in 2004: http://www.modpython.org/pipermail/mod_python/2004-January/014832.html Since it seems entirely reasonable that such integration of mod_python and mod_include would be possible, thought it would be good to log it as a possible new feature. Because of SSI's support for basic conditionals, includes and other callout mechanisms, would be a good quick and dirty way of doing templating without having to resort to PSP, or other high level templating systems. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira