Git Product home page Git Product logo

mod_python's People

Contributors

asl97 avatar boramalper avatar calin-iorgulescu avatar cipherwraith avatar cognusion avatar craig-sh avatar dviererbe avatar estrand2020 avatar grisha avatar lovasoa avatar matsuo avatar maxime2 avatar micwoj92 avatar opoplawski avatar pkarolyi avatar rhiller avatar shinichi62 avatar stefanor avatar subrahmanya-rao avatar thethomaseffect avatar thinkami avatar tstabrawa avatar wom-bat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mod_python's Issues

Configuring mod_python for python 3

I have been trying to configure mod_python to run python 3 scripts in apache.

After ./configure --with-python=/usr/bin/python3

I receive this message:
configure: error: This version of mod_python only works with Python major version 2. The one you have seems to be .

Thank you.

python3.3.3 -> make -> Error with apxs (OSX 10.6.8)

Hi, I am trying to get mod_python with python3.3.3 working on my machine. It works well with python2, but with python3 I get this error:

sh-3.2# make

Building mod_python.so.

/usr/sbin/apxs -I/Volumes/Mac OS X/Users/tobias/Downloads/mod_python_git/mod_python/src/include -I/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m -DNDEBUG -Wc,'-arch x86_64' -Wc,'-arch i386' -Wc,'-arch ppc7400' -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c version.c include/_apachemodule.h  include/filterobject.h  include/hlist.h include/mod_python.h  include/psp_flex.h include/psp_parser.h include/requestobject.h include/tableobject.h include/connobject.h include/finfoobject.h include/hlistobject.h include/mp_version.h include/_pspmodule.h  include/psp_string.h  include/serverobject.h include/util.h -arch x86_64 -arch i386 -arch ppc7400 -Wl,-F/Library/Frameworks -framework Python -framework CoreFoundation  -ldl  -framework CoreFoundation 
Usage: apxs -g [-S <var>=<val>] -n <modname>
       apxs -q [-S <var>=<val>] <query> ...
       apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
               [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
               [-Wl,<flags>] [-p] <files> ...
       apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
       apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
make[1]: *** [mod_python.so] Error 1
make: *** [do_dso] Error 2

AssertionError when raising apache.SERVER_RETURN error with given status, in PSP handler

I discovered an error that occurred when raising the apache.SERVER_RETURN error (from the PSP handler in the PythonHandler stage with an apache.HTTP_* error code, to generate a HTTP error page). Error message:

Mod_python error: "PythonHandler mod_python.psp"

Traceback (most recent call last):

  File "/usr/local/lib/python3.4/site-packages/mod_python/apache.py", line 415, in HandlerDispatch
    _result_warning % result.__class__

AssertionError: Handler has returned result or raised SERVER_RETURN
exception with argument having non integer type. Type of value returned
was <class '_apache.SERVER_RETURN'>, whereas expected <class 'int'>.

Page code, which seems valid enough according to the (v3.5.0) documentation page:

<%
from mod_python import apache
#req.content_type = 'text/plain'
raise apache.SERVER_RETURN(apache.HTTP_NOT_FOUND)
#req.write("Hello World!")
%>

Quote from page (only difference between line 4 and the example code is I added brackets to make it work in Python 3):

As an alternative to returning an HTTP error code, handlers can signal an error by raising the apache.SERVER_RETURN exception, and providing an HTTP error code as the exception value, e.g.:
raise apache.SERVER_RETURN, apache.HTTP_FORBIDDEN

I do not understand this issue, and it prevents PSP handlers from generating error pages so is fairly serious (other handlers such as "Publisher" should be unaffected though if they don't raise errors this way, they just return the error code from the function and it is handled).

mod_python 3.5.0 (with support for Python 3!) available for pre-release testing.

Anyone reading this can test and provide feedback as a comment. Your help is VERY much appreciated!

Instructions:

  • Get mod_python.
  $ git clone https://github.com/grisha/mod_python.git
  $ git checkout -b 3.5.x origin/3.5.x
  • Compile and run tests:
  $ ./configure
  $ make
  $ sudo make install
  $ make test
  • If tests produce errors, please include those as part of your feedback.
  • Please remember to include the output of
  $ mod_python version

I am especially interested in Python 3.3 (and 3.4?) tests. You will most likely need to have a manually installed Python 3 and run ./configure --with-python=/path/to/bin/python3.

Thank You!

mod_python 3.5.0 install on Mac OS X

Error on start of apache
httpd: Syntax error on line 169 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_python.so into server: dlopen(/usr/local/apache2/modules/mod_python.so, 10): Symbol not found: _PyBytes_Type\n Referenced from: /usr/local/apache2/modules/mod_python.so\n Expected in: flat namespace\n in /usr/local/apache2/modules/mod_python.so

MAC info - 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64 i386 MacPro5,1 Darwin

Xcode versionVersion 7.3 (7D175)

compile flags
CPPFLAGS=-I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -DNDEBUG
CFLAGS= -Wc,'-arch x86_64'
LDLIBS=-ldl -framework CoreFoundation
LDFLAGS= -arch x86_64 -Wl,-F/Library/Frameworks -framework Python -Wl -framework CoreFoundation -export_dynamic

apxs:Error: Command failed with rc=65536

Trying to get mod_python installed. Running in to the following issue. I've dug and dug, spent hours on Google, trying/re-trying.
CentOS 7 - Apache 2.4.6 - Python 2.7.5

make[1]: Entering directory `/tmp/mod_python-3.5.0/src'
fatal: Not a git repository (or any of the parent directories): .git

Building mod_python.so.

/usr/bin/apxs -I/tmp/mod_python-3.5.0/src/include -I/usr/include/python2.7 -D_GNU_SOURCE -DNDEBUG -D_GNU_SOURCE  -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c version.c include/_apachemodule.h  include/filterobject.h  include/hlist.h include/mod_python.h  include/psp_flex.h include/psp_parser.h include/requestobject.h include/tableobject.h include/connobject.h include/finfoobject.h include/hlistobject.h include/mp_version.h include/_pspmodule.h  include/psp_string.h  include/serverobject.h include/util.h -L/usr/lib64 -L/usr/lib64/python2.7/config -lpython2.7 -lpthread -ldl  -lutil
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -I/tmp/mod_python-3.5.0/src/include -I/usr/include/python2.7 -D_GNU_SOURCE -DNDEBUG -D_GNU_SOURCE  -c -o mod_python.lo mod_python.c && touch mod_python.slo
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:98:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/util.h:31:1: error: unknown type name 'PyObject'
 PyObject * tuple_from_array_header(const apr_array_header_t *ah);
 ^
/tmp/mod_python-3.5.0/src/include/util.h:32:1: error: unknown type name 'PyObject'
 PyObject * tuple_from_method_list(const ap_method_list_t *l);
 ^
/tmp/mod_python-3.5.0/src/include/util.h:33:1: error: unknown type name 'PyObject'
 PyObject *tuple_from_finfo(apr_finfo_t *f);
 ^
/tmp/mod_python-3.5.0/src/include/util.h:34:1: error: unknown type name 'PyObject'
 PyObject *tuple_from_apr_uri(apr_uri_t *u);
 ^
/tmp/mod_python-3.5.0/src/include/util.h:37:1: error: unknown type name 'PyMemberDef'
 PyMemberDef *find_memberdef(const PyMemberDef *mlist, const char *name);
 ^
/tmp/mod_python-3.5.0/src/include/util.h:37:1: error: unknown type name 'PyMemberDef'
/tmp/mod_python-3.5.0/src/include/util.h:38:1: error: unknown type name 'PyObject'
 PyObject *cfgtree_walk(ap_directive_t *dir);
 ^
/tmp/mod_python-3.5.0/src/include/util.h:39:1: error: unknown type name 'PyObject'
 PyObject *makesockaddr(struct apr_sockaddr_t *addr);
 ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:100:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/hlistobject.h:35:9: error: expected specifier-qualifier-list before 'PyObject_HEAD'
         PyObject_HEAD
         ^
/tmp/mod_python-3.5.0/src/include/hlistobject.h:39:5: warning: return type defaults to 'int' [enabled by default]
     PyAPI_DATA(PyTypeObject) MpHList_Type;
     ^
/tmp/mod_python-3.5.0/src/include/hlistobject.h: In function 'PyAPI_DATA':
/tmp/mod_python-3.5.0/src/include/hlistobject.h:39:30: error: expected declaration specifiers before 'MpHList_Type'
     PyAPI_DATA(PyTypeObject) MpHList_Type;
                              ^
/tmp/mod_python-3.5.0/src/include/hlistobject.h:43:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *)MpHList_FromHLEntry (hl_entry *hle);
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:101:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/tableobject.h:38:9: error: unknown type name 'PyObject_VAR_HEAD'
         apr_table_t     *table;
         ^
/tmp/mod_python-3.5.0/src/include/tableobject.h:38:25: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
         apr_table_t     *table;
                         ^
/tmp/mod_python-3.5.0/src/include/tableobject.h:40:7: error: storage class specified for parameter 'tableobject'
     } tableobject;
       ^
/tmp/mod_python-3.5.0/src/include/tableobject.h:42:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpTable_Type;
     ^
/tmp/mod_python-3.5.0/src/include/tableobject.h:43:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpTableIter_Type;
     ^
/tmp/mod_python-3.5.0/src/include/tableobject.h:47:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpTable_FromTable (apr_table_t *t);
     ^
/tmp/mod_python-3.5.0/src/include/tableobject.h:48:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpTable_New (void);
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:102:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/serverobject.h:33:9: error: unknown type name 'PyObject_HEAD'
         PyObject       *dict;
         ^
/tmp/mod_python-3.5.0/src/include/serverobject.h:33:24: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
         PyObject       *dict;
                        ^
/tmp/mod_python-3.5.0/src/include/serverobject.h:36:7: error: storage class specified for parameter 'serverobject'
     } serverobject;
       ^
/tmp/mod_python-3.5.0/src/include/serverobject.h:38:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpServer_Type;
     ^
/tmp/mod_python-3.5.0/src/include/serverobject.h:42:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpServer_FromServer (server_rec *s);
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:103:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/connobject.h:43:9: error: unknown type name 'PyObject_HEAD'
         conn_rec     *conn;
         ^
/tmp/mod_python-3.5.0/src/include/connobject.h:43:22: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
         conn_rec     *conn;
                      ^
/tmp/mod_python-3.5.0/src/include/connobject.h:47:7: error: storage class specified for parameter 'connobject'
     } connobject;
       ^
/tmp/mod_python-3.5.0/src/include/connobject.h:49:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpConn_Type;
     ^
/tmp/mod_python-3.5.0/src/include/connobject.h:53:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpConn_FromConn (conn_rec *c);
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:104:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/_apachemodule.h:31:1: error: unknown type name 'PyObject'
 PyObject *get_ServerReturn(void);
 ^
/tmp/mod_python-3.5.0/src/include/_apachemodule.h:32:1: error: unknown type name 'PyMODINIT_FUNC'
 PyMODINIT_FUNC init_apache(void);
 ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:105:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/requestobject.h:33:9: error: unknown type name 'PyObject_HEAD'
         PyObject       * dict;
         ^
/tmp/mod_python-3.5.0/src/include/requestobject.h:33:24: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
         PyObject       * dict;
                        ^
/tmp/mod_python-3.5.0/src/include/requestobject.h:54:7: error: storage class specified for parameter 'requestobject'
     } requestobject;
       ^
/tmp/mod_python-3.5.0/src/include/requestobject.h:56:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpRequest_Type;
     ^
/tmp/mod_python-3.5.0/src/include/requestobject.h:60:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpRequest_FromRequest (request_rec *r);
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:106:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/filterobject.h:33:9: error: unknown type name 'PyObject_HEAD'
         ap_filter_t        *f;
         ^
/tmp/mod_python-3.5.0/src/include/filterobject.h:33:28: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
         ap_filter_t        *f;
                            ^
/tmp/mod_python-3.5.0/src/include/filterobject.h:55:7: error: storage class specified for parameter 'filterobject'
     } filterobject;
       ^
/tmp/mod_python-3.5.0/src/include/filterobject.h:57:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpFilter_Type;
     ^
/tmp/mod_python-3.5.0/src/include/filterobject.h:61:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *)
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:107:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/finfoobject.h:33:9: error: unknown type name 'PyObject_HEAD'
         apr_pool_t      *pool;
         ^
/tmp/mod_python-3.5.0/src/include/finfoobject.h:33:25: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
         apr_pool_t      *pool;
                         ^
/tmp/mod_python-3.5.0/src/include/finfoobject.h:35:7: error: storage class specified for parameter 'finfoobject'
     } finfoobject;
       ^
/tmp/mod_python-3.5.0/src/include/finfoobject.h:37:5: error: expected declaration specifiers before 'PyAPI_DATA'
     PyAPI_DATA(PyTypeObject) MpFinfo_Type;
     ^
/tmp/mod_python-3.5.0/src/include/finfoobject.h:41:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpFinfo_FromFinfo (apr_finfo_t *f);
     ^
/tmp/mod_python-3.5.0/src/include/finfoobject.h:42:5: error: expected declaration specifiers before 'PyAPI_FUNC'
     PyAPI_FUNC(PyObject *) MpFinfo_New (void);
     ^
In file included from mod_python.c:28:0:
/tmp/mod_python-3.5.0/src/include/mod_python.h:159:27: error: storage class specified for parameter 'mp_git_sha'
 extern const char * const mp_git_sha;
                           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:160:18: error: storage class specified for parameter 'mp_version_major'
 extern const int mp_version_major;
                  ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:161:18: error: storage class specified for parameter 'mp_version_minor'
 extern const int mp_version_minor;
                  ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:162:18: error: storage class specified for parameter 'mp_version_patch'
 extern const int mp_version_patch;
                  ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:163:27: error: storage class specified for parameter 'mp_version_string'
 extern const char * const mp_version_string;
                           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:164:27: error: storage class specified for parameter 'mp_version_component'
 extern const char * const mp_version_component;
                           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:169:5: error: unknown type name 'PyInterpreterState'
     PyInterpreterState *interp;
     ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:170:5: error: unknown type name 'PyObject'
     PyObject *obcallback;
     ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:171:3: error: storage class specified for parameter 'interpreterdata'
 } interpreterdata;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:179:3: error: storage class specified for parameter 'py_global_config'
 } py_global_config;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:192:3: error: storage class specified for parameter 'py_config'
 } py_config;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:199:5: error: unknown type name 'PyObject'
     PyObject     *handler;
     ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:201:5: error: unknown type name 'PyObject'
     PyObject     *data;
     ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:202:3: error: storage class specified for parameter 'cleanup_info'
 } cleanup_info;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:207:5: error: expected specifier-qualifier-list before 'requestobject'
     requestobject *request_obj;
     ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:215:3: error: storage class specified for parameter 'py_req_config'
 } py_req_config;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:222:3: error: storage class specified for parameter 'python_filter_ctx'
 } python_filter_ctx;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:233:3: error: storage class specified for parameter 'py_handler'
 } py_handler;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:236:1: error: unknown type name 'PyObject'
 PyObject* python_interpreter_name(void);
 ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:237:1: error: expected declaration specifiers before 'requestobject'
 requestobject *python_get_request_object(request_rec *req, const char *phase);
 ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:238:1: error: unknown type name 'PyObject'
 PyObject *_apache_module_init();
 ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:240:1: error: unknown type name 'PyInterpreterState'
 APR_DECLARE_OPTIONAL_FN(PyInterpreterState *, mp_acquire_interpreter, (const char *));
 ^
In file included from /usr/include/httpd/http_core.h:31:0,
                 from /tmp/mod_python-3.5.0/src/include/mod_python.h:53,
                 from mod_python.c:28:
/usr/include/apr-1/apr_optional.h:42:36: error: storage class specified for parameter 'apr_OFN_mp_acquire_interpreter_t'
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:240:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyInterpreterState *, mp_acquire_interpreter, (const char *));
 ^
/usr/include/apr-1/apr_optional.h:42:36: error: storage class specified for parameter 'apr_OFN_mp_release_interpreter_t'
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:241:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(void, mp_release_interpreter, ());
 ^
In file included from mod_python.c:28:0:
/tmp/mod_python-3.5.0/src/include/mod_python.h:242:1: error: unknown type name 'PyObject'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_request_object, (request_rec *));
 ^
In file included from /usr/include/httpd/http_core.h:31:0,
                 from /tmp/mod_python-3.5.0/src/include/mod_python.h:53,
                 from mod_python.c:28:
/usr/include/apr-1/apr_optional.h:42:36: error: storage class specified for parameter 'apr_OFN_mp_get_request_object_t'
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:242:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_request_object, (request_rec *));
 ^
In file included from mod_python.c:28:0:
/tmp/mod_python-3.5.0/src/include/mod_python.h:243:1: error: unknown type name 'PyObject'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_server_object, (server_rec *));
 ^
In file included from /usr/include/httpd/http_core.h:31:0,
                 from /tmp/mod_python-3.5.0/src/include/mod_python.h:53,
                 from mod_python.c:28:
/usr/include/apr-1/apr_optional.h:42:36: error: storage class specified for parameter 'apr_OFN_mp_get_server_object_t'
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:243:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_server_object, (server_rec *));
 ^
In file included from mod_python.c:28:0:
/tmp/mod_python-3.5.0/src/include/mod_python.h:244:1: error: unknown type name 'PyObject'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_connection_object, (conn_rec *));
 ^
In file included from /usr/include/httpd/http_core.h:31:0,
                 from /tmp/mod_python-3.5.0/src/include/mod_python.h:53,
                 from mod_python.c:28:
/usr/include/apr-1/apr_optional.h:42:36: error: storage class specified for parameter 'apr_OFN_mp_get_connection_object_t'
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:244:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_connection_object, (conn_rec *));
 ^
mod_python.c:30:1: error: unknown type name 'PyThreadState'
 static PyThreadState* global_tstate;
 ^
mod_python.c:30:23: error: storage class specified for parameter 'global_tstate'
 static PyThreadState* global_tstate;
                       ^
mod_python.c:33:20: error: storage class specified for parameter 'main_server'
 static server_rec *main_server = NULL;
                    ^
mod_python.c:33:1: error: parameter 'main_server' is initialized
 static server_rec *main_server = NULL;
 ^
mod_python.c:36:20: error: storage class specified for parameter 'interpreters'
 static apr_hash_t *interpreters = NULL;
                    ^
mod_python.c:36:1: error: parameter 'interpreters' is initialized
 static apr_hash_t *interpreters = NULL;
 ^
mod_python.c:37:20: error: storage class specified for parameter 'interp_pool'
 static apr_pool_t *interp_pool = NULL;
                    ^
mod_python.c:37:1: error: parameter 'interp_pool' is initialized
 static apr_pool_t *interp_pool = NULL;
 ^
mod_python.c:38:33: error: expected declaration specifiers or '...' before 'interpreterdata'
 static void release_interpreter(interpreterdata *idata);
                                 ^
mod_python.c:40:1: error: parameter 'child_init_pool' is initialized
 apr_pool_t *child_init_pool = NULL;
 ^
mod_python.c:43:59: error: storage class specified for parameter 'optfn_register_include_handler'
 static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *optfn_register_include_handler;
                                                           ^
mod_python.c:44:59: error: storage class specified for parameter 'optfn_ssi_get_tag_and_value'
 static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value)    *optfn_ssi_get_tag_and_value;
                                                           ^
mod_python.c:45:59: error: storage class specified for parameter 'optfn_ssi_parse_string'
 static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string)         *optfn_ssi_parse_string;
                                                           ^
mod_python.c:56:1: error: unknown type name 'PyObject'
 static PyObject * make_obcallback(const char *name)
 ^
mod_python.c:57:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:161:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 static interpreterdata *save_interpreter(const char *name, PyThreadState *tstate)
                        ^
mod_python.c:184:1: error: unknown type name 'PyObject'
 PyObject *python_interpreter_name()
 ^
mod_python.c:185:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:220:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 static interpreterdata *get_interpreter(const char *name)
                        ^
mod_python.c:292:33: error: expected declaration specifiers or '...' before 'interpreterdata'
 static void release_interpreter(interpreterdata *idata)
                                 ^
mod_python.c:317:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:395:64: error: expected declaration specifiers or '...' before 'py_global_config'
 static apr_status_t init_mutexes(server_rec *s, apr_pool_t *p, py_global_config *glb)
                                                                ^
mod_python.c:548:66: error: expected declaration specifiers or '...' before 'py_global_config'
 static apr_status_t reinit_mutexes(server_rec *s, apr_pool_t *p, py_global_config *glb)
                                                                  ^
mod_python.c:596:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 static py_global_config *python_create_global_config(server_rec *s)
                         ^
mod_python.c:625:1: error: unknown type name 'PyInterpreterState'
 PyInterpreterState *mp_acquire_interpreter(const char *name)
 ^
mod_python.c:626:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:642:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:653:1: error: unknown type name 'PyObject'
 PyObject *mp_get_request_object(request_rec *req)
 ^
mod_python.c:654:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:669:1: error: unknown type name 'PyObject'
 PyObject *mp_get_server_object(server_rec *srv)
 ^
mod_python.c:670:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:681:1: error: unknown type name 'PyObject'
 PyObject *mp_get_connection_object(conn_rec *conn)
 ^
mod_python.c:682:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:694:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:812:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 static py_config *python_create_config(apr_pool_t *p)
                  ^
mod_python.c:839:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:854:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:871:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:884:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:969:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:981:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1001:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1117:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1148:61: error: expected declaration specifiers or '...' before 'py_config'
 static const char *python_directive_handler(cmd_parms *cmd, py_config* conf,
                                                             ^
mod_python.c:1209:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1224:21: error: storage class specified for parameter 'python_cleanup_handler'
 static apr_status_t python_cleanup_handler(void *data);
                     ^
mod_python.c:1233:1: error: expected declaration specifiers before 'requestobject'
 requestobject *python_get_request_object(request_rec *req, const char *phase)
 ^
mod_python.c:1282:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1341:39: error: expected declaration specifiers or '...' before 'py_config'
                                       py_config *conf, hl_entry *hle,
                                       ^
mod_python.c:1342:39: error: expected declaration specifiers or '...' before 'py_handler'
                                       py_handler *fh)
                                       ^
mod_python.c:1418:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1640:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1678:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1772:57: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                   apr_size_t readbytes) {
                                                         ^
mod_python.c:1881:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1894:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:1917:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                   apr_bucket_brigade *bb) {
                                                           ^
mod_python.c:2207:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:2227:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                         const char *val) {
                                                          ^
mod_python.c:2246:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                const char *val) {
                                                                 ^
mod_python.c:2264:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                          int val) {
                                                   ^
mod_python.c:2283:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                              int val) {
                                                       ^
mod_python.c:2302:79: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                       void *mconfig, int val) {
                                                                               ^
mod_python.c:2321:79: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                       void *mconfig, int val) {
                                                                               ^
mod_python.c:2333:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                               void *mconfig, int val) {
                                                                       ^
mod_python.c:2354:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:2393:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                             int val) {
                                                      ^
mod_python.c:2405:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                  const char *val) {
                                                                   ^
mod_python.c:2409:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                  const char *val) {
                                                                   ^
mod_python.c:2413:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                 const char *val) {
                                                                  ^
mod_python.c:2417:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                   const char *val) {
                                                                    ^
mod_python.c:2421:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                      const char *val) {
                                                                       ^
mod_python.c:2427:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                 const char *val) {
                                                                  ^
mod_python.c:2431:61: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                            const char *val) {
                                                             ^
mod_python.c:2435:73: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                        const char *val) {
                                                                         ^
mod_python.c:2439:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                const char *val) {
                                                                 ^
mod_python.c:2443:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                  const char *val) {
                                                                   ^
mod_python.c:2486:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                           const char *val) {
                                                                            ^
mod_python.c:2495:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                 const char *val) {
                                                                  ^
mod_python.c:2502:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                const char *val) {
                                                                 ^
mod_python.c:2506:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                               const char *val) {
                                                                ^
mod_python.c:2510:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                const char *handler, const char *name) {
                                                                                       ^
mod_python.c:2546:88: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
                                                 const char *handler, const char *name) {
                                                                                        ^
mod_python.c:2587:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:2606:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:2727:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonConnectionHandler(conn_rec *con) {
                                                   ^
mod_python.c:2730:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonAccessHandler(request_rec *req) {
                                                  ^
mod_python.c:2733:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonAuthenHandler(request_rec *req) {
                                                  ^
mod_python.c:2736:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonAuthzHandler(request_rec *req) {
                                                 ^
mod_python.c:2739:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonFixupHandler(request_rec *req) {
                                                 ^
mod_python.c:2742:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonHandler(request_rec *req) {
                                            ^
mod_python.c:2755:56: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonHeaderParserHandler(request_rec *req) {
                                                        ^
mod_python.c:2766:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonLogHandler(request_rec *req) {
                                               ^
mod_python.c:2769:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonPostReadRequestHandler(request_rec *req) {
                                                           ^
mod_python.c:2780:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonTransHandler(request_rec *req) {
                                                 ^
mod_python.c:2783:56: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonMapToStorageHandler(request_rec *req) {
                                                        ^
mod_python.c:2793:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 static int PythonTypeHandler(request_rec *req) {
                                                ^
mod_python.c:2798:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
mod_python.c:2868:1: error: parameter 'python_commands' is initialized
 command_rec python_commands[] =
 ^
mod_python.c:2870:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: error: field name not in record or union initializer
mod_python.c:2870:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2871:32: error: 'directive_PythonAccessHandler' undeclared (first use in this function)
         "PythonAccessHandler", directive_PythonAccessHandler, NULL, OR_ALL,
                                ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2871:32: note: each undeclared identifier is reported only once for each function it appears in
         "PythonAccessHandler", directive_PythonAccessHandler, NULL, OR_ALL,
                                ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2870:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2870:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2870:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: error: field name not in record or union initializer
mod_python.c:2873:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2874:32: error: 'directive_PythonAuthenHandler' undeclared (first use in this function)
         "PythonAuthenHandler", directive_PythonAuthenHandler, NULL, OR_ALL,
                                ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2873:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2873:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2873:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: error: field name not in record or union initializer
mod_python.c:2876:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2877:29: error: 'directive_PythonAutoReload' undeclared (first use in this function)
         "PythonAutoReload", directive_PythonAutoReload, NULL, OR_ALL,
                             ^
/usr/include/httpd/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG'
     { directive, { .flag=func }, mconfig, where, FLAG, help }
                          ^
mod_python.c:2876:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2876:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2876:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: error: field name not in record or union initializer
mod_python.c:2879:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2880:31: error: 'directive_PythonAuthzHandler' undeclared (first use in this function)
         "PythonAuthzHandler", directive_PythonAuthzHandler, NULL, OR_ALL,
                               ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2879:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2879:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2879:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: error: field name not in record or union initializer
mod_python.c:2882:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2883:33: error: 'directive_PythonCleanupHandler' undeclared (first use in this function)
         "PythonCleanupHandler", directive_PythonCleanupHandler, NULL, OR_ALL,
                                 ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2882:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2882:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2882:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: error: field name not in record or union initializer
mod_python.c:2885:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2886:36: error: 'directive_PythonConnectionHandler' undeclared (first use in this function)
         "PythonConnectionHandler", directive_PythonConnectionHandler, NULL, RSRC_CONF,
                                    ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2885:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2885:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2885:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: error: field name not in record or union initializer
mod_python.c:2888:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2889:24: error: 'directive_PythonDebug' undeclared (first use in this function)
         "PythonDebug", directive_PythonDebug, NULL, OR_ALL,
                        ^
/usr/include/httpd/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG'
     { directive, { .flag=func }, mconfig, where, FLAG, help }
                          ^
mod_python.c:2888:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2888:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2888:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: error: field name not in record or union initializer
mod_python.c:2891:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2892:28: error: 'directive_PythonEnablePdb' undeclared (first use in this function)
         "PythonEnablePdb", directive_PythonEnablePdb, NULL, OR_ALL,
                            ^
/usr/include/httpd/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG'
     { directive, { .flag=func }, mconfig, where, FLAG, help }
                          ^
mod_python.c:2891:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2891:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2891:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: error: field name not in record or union initializer
mod_python.c:2894:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2895:31: error: 'directive_PythonFixupHandler' undeclared (first use in this function)
         "PythonFixupHandler", directive_PythonFixupHandler, NULL, OR_ALL,
                               ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2894:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2894:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2894:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: error: field name not in record or union initializer
mod_python.c:2897:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2898:26: error: 'directive_PythonHandler' undeclared (first use in this function)
         "PythonHandler", directive_PythonHandler, NULL, OR_ALL,
                          ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2897:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2897:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2897:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: error: field name not in record or union initializer
mod_python.c:2900:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2901:38: error: 'directive_PythonHeaderParserHandler' undeclared (first use in this function)
         "PythonHeaderParserHandler", directive_PythonHeaderParserHandler, NULL, OR_ALL,
                                      ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2900:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2900:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2900:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_TAKE2(
     ^
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: error: field name not in record or union initializer
mod_python.c:2903:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2904:25: error: 'directive_PythonImport' undeclared (first use in this function)
         "PythonImport", directive_PythonImport, NULL, RSRC_CONF,
                         ^
/usr/include/httpd/http_config.h:135:27: note: in definition of macro 'AP_INIT_TAKE2'
     { directive, { .take2=func }, mconfig, where, TAKE2, help }
                           ^
mod_python.c:2903:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_TAKE2(
     ^
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2903:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2903:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: error: field name not in record or union initializer
mod_python.c:2906:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2907:30: error: 'directive_PythonInitHandler' undeclared (first use in this function)
         "PythonInitHandler", directive_PythonInitHandler, NULL, OR_ALL,
                              ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2906:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2906:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2906:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: error: field name not in record or union initializer
mod_python.c:2909:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2910:37: error: 'directive_PythonInterpPerDirective' undeclared (first use in this function)
         "PythonInterpPerDirective", directive_PythonInterpPerDirective, NULL, OR_ALL,
                                     ^
/usr/include/httpd/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG'
     { directive, { .flag=func }, mconfig, where, FLAG, help }
                          ^
mod_python.c:2909:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2909:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2909:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: error: field name not in record or union initializer
mod_python.c:2912:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2913:37: error: 'directive_PythonInterpPerDirectory' undeclared (first use in this function)
         "PythonInterpPerDirectory", directive_PythonInterpPerDirectory, NULL, OR_ALL,
                                     ^
/usr/include/httpd/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG'
     { directive, { .flag=func }, mconfig, where, FLAG, help }
                          ^
mod_python.c:2912:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2912:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2912:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_TAKE1(
     ^
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: error: field name not in record or union initializer
mod_python.c:2915:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2916:30: error: 'directive_PythonInterpreter' undeclared (first use in this function)
         "PythonInterpreter", directive_PythonInterpreter, NULL, OR_ALL,
                              ^
/usr/include/httpd/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1'
     { directive, { .take1=func }, mconfig, where, TAKE1, help }
                           ^
mod_python.c:2915:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_TAKE1(
     ^
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2915:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2915:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: error: field name not in record or union initializer
mod_python.c:2918:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2919:29: error: 'directive_PythonLogHandler' undeclared (first use in this function)
         "PythonLogHandler", directive_PythonLogHandler, NULL, OR_ALL,
                             ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2918:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2918:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2918:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: error: field name not in record or union initializer
mod_python.c:2921:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2922:32: error: 'directive_PythonHandlerModule' undeclared (first use in this function)
         "PythonHandlerModule", directive_PythonHandlerModule, NULL, OR_ALL,
                                ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2921:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2921:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2921:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: error: field name not in record or union initializer
mod_python.c:2924:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2925:27: error: 'directive_PythonOptimize' undeclared (first use in this function)
         "PythonOptimize", directive_PythonOptimize, NULL, RSRC_CONF,
                           ^
/usr/include/httpd/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG'
     { directive, { .flag=func }, mconfig, where, FLAG, help }
                          ^
mod_python.c:2924:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_FLAG(
     ^
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2924:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2924:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_TAKE12(
     ^
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: error: field name not in record or union initializer
mod_python.c:2927:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2928:25: error: 'directive_PythonOption' undeclared (first use in this function)
         "PythonOption", directive_PythonOption, NULL, OR_ALL,
                         ^
/usr/include/httpd/http_config.h:138:27: note: in definition of macro 'AP_INIT_TAKE12'
     { directive, { .take2=func }, mconfig, where, TAKE12, help }
                           ^
mod_python.c:2927:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_TAKE12(
     ^
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2927:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2927:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_TAKE1(
     ^
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: error: field name not in record or union initializer
mod_python.c:2930:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2931:23: error: 'directive_PythonPath' undeclared (first use in this function)
         "PythonPath", directive_PythonPath, NULL, OR_ALL,
                       ^
/usr/include/httpd/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1'
     { directive, { .take1=func }, mconfig, where, TAKE1, help }
                           ^
mod_python.c:2930:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_TAKE1(
     ^
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2930:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2930:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: error: field name not in record or union initializer
mod_python.c:2933:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2934:41: error: 'directive_PythonPostReadRequestHandler' undeclared (first use in this function)
         "PythonPostReadRequestHandler", directive_PythonPostReadRequestHandler,
                                         ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2933:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2933:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2933:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: error: field name not in record or union initializer
mod_python.c:2937:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2938:31: error: 'directive_PythonTransHandler' undeclared (first use in this function)
         "PythonTransHandler", directive_PythonTransHandler, NULL, RSRC_CONF,
                               ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2937:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2937:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2937:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: error: field name not in record or union initializer
mod_python.c:2940:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2941:30: error: 'directive_PythonTypeHandler' undeclared (first use in this function)
         "PythonTypeHandler", directive_PythonTypeHandler, NULL, OR_ALL,
                              ^
/usr/include/httpd/http_config.h:123:30: note: in definition of macro 'AP_INIT_RAW_ARGS'
     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
                              ^
mod_python.c:2940:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_RAW_ARGS(
     ^
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2940:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2940:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_TAKE12(
     ^
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: error: field name not in record or union initializer
mod_python.c:2943:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2944:30: error: 'directive_PythonInputFilter' undeclared (first use in this function)
         "PythonInputFilter", directive_PythonInputFilter, NULL, RSRC_CONF|ACCESS_CONF,
                              ^
/usr/include/httpd/http_config.h:138:27: note: in definition of macro 'AP_INIT_TAKE12'
     { directive, { .take2=func }, mconfig, where, TAKE12, help }
                           ^
mod_python.c:2943:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_TAKE12(
     ^
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2943:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2943:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: braces around scalar initializer [enabled by default]
     AP_INIT_TAKE12(
     ^
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: initialization from incompatible pointer type [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: braces around scalar initializer [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: error: field name not in record or union initializer
mod_python.c:2946:5: error: (near initialization for 'python_commands')
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:52:0,
                 from mod_python.c:28:
mod_python.c:2947:31: error: 'directive_PythonOutputFilter' undeclared (first use in this function)
         "PythonOutputFilter", directive_PythonOutputFilter, NULL, RSRC_CONF|ACCESS_CONF,
                               ^
/usr/include/httpd/http_config.h:138:27: note: in definition of macro 'AP_INIT_TAKE12'
     { directive, { .take2=func }, mconfig, where, TAKE12, help }
                           ^
mod_python.c:2946:5: warning: excess elements in scalar initializer [enabled by default]
     AP_INIT_TAKE12(
     ^
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2946:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2946:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2949:5: warning: braces around scalar initializer [enabled by default]
     {NULL}
     ^
mod_python.c:2949:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2949:5: warning: excess elements in scalar initializer [enabled by default]
mod_python.c:2949:5: warning: (near initialization for 'python_commands') [enabled by default]
mod_python.c:2953:1: error: parameter 'python_module' is initialized
 module python_module =
 ^
mod_python.c:2956:5: error: 'python_create_dir_config' undeclared (first use in this function)
     python_create_dir_config,      /* per-directory config creator */
     ^
mod_python.c:2957:5: error: 'python_merge_config' undeclared (first use in this function)
     python_merge_config,           /* dir config merger */
     ^
mod_python.c:2958:5: error: 'python_create_srv_config' undeclared (first use in this function)
     python_create_srv_config,      /* server config creator */
     ^
mod_python.c:2961:5: error: 'python_register_hooks' undeclared (first use in this function)
     python_register_hooks          /* register hooks */
     ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:100:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/hlistobject.h:39:5: warning: type of 'PyTypeObject' defaults to 'int' [enabled by default]
     PyAPI_DATA(PyTypeObject) MpHList_Type;
     ^
mod_python.c:2953:8: error: declaration for parameter 'python_module' but no such parameter
 module python_module =
        ^
mod_python.c:2868:13: error: declaration for parameter 'python_commands' but no such parameter
 command_rec python_commands[] =
             ^
mod_python.c:1224:21: error: declaration for parameter 'python_cleanup_handler' but no such parameter
 static apr_status_t python_cleanup_handler(void *data);
                     ^
mod_python.c:45:59: error: declaration for parameter 'optfn_ssi_parse_string' but no such parameter
 static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string)         *optfn_ssi_parse_string;
                                                           ^
mod_python.c:44:59: error: declaration for parameter 'optfn_ssi_get_tag_and_value' but no such parameter
 static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value)    *optfn_ssi_get_tag_and_value;
                                                           ^
mod_python.c:43:59: error: declaration for parameter 'optfn_register_include_handler' but no such parameter
 static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *optfn_register_include_handler;
                                                           ^
mod_python.c:40:13: error: declaration for parameter 'child_init_pool' but no such parameter
 apr_pool_t *child_init_pool = NULL;
             ^
mod_python.c:37:20: error: declaration for parameter 'interp_pool' but no such parameter
 static apr_pool_t *interp_pool = NULL;
                    ^
mod_python.c:36:20: error: declaration for parameter 'interpreters' but no such parameter
 static apr_hash_t *interpreters = NULL;
                    ^
mod_python.c:33:20: error: declaration for parameter 'main_server' but no such parameter
 static server_rec *main_server = NULL;
                    ^
mod_python.c:30:23: error: declaration for parameter 'global_tstate' but no such parameter
 static PyThreadState* global_tstate;
                       ^
In file included from /usr/include/httpd/http_core.h:31:0,
                 from /tmp/mod_python-3.5.0/src/include/mod_python.h:53,
                 from mod_python.c:28:
/usr/include/apr-1/apr_optional.h:42:36: error: declaration for parameter 'apr_OFN_mp_get_connection_object_t' but no such parameter
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:244:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_connection_object, (conn_rec *));
 ^
/usr/include/apr-1/apr_optional.h:42:36: error: declaration for parameter 'apr_OFN_mp_get_server_object_t' but no such parameter
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:243:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_server_object, (server_rec *));
 ^
/usr/include/apr-1/apr_optional.h:42:36: error: declaration for parameter 'apr_OFN_mp_get_request_object_t' but no such parameter
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:242:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_request_object, (request_rec *));
 ^
/usr/include/apr-1/apr_optional.h:42:36: error: declaration for parameter 'apr_OFN_mp_release_interpreter_t' but no such parameter
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:241:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(void, mp_release_interpreter, ());
 ^
/usr/include/apr-1/apr_optional.h:42:36: error: declaration for parameter 'apr_OFN_mp_acquire_interpreter_t' but no such parameter
 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
                                    ^
/usr/include/apr-1/apr_optional.h:51:14: note: in expansion of macro 'APR_OPTIONAL_FN_TYPE'
 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:240:1: note: in expansion of macro 'APR_DECLARE_OPTIONAL_FN'
 APR_DECLARE_OPTIONAL_FN(PyInterpreterState *, mp_acquire_interpreter, (const char *));
 ^
In file included from mod_python.c:28:0:
/tmp/mod_python-3.5.0/src/include/mod_python.h:238:11: error: declaration for parameter '_apache_module_init' but no such parameter
 PyObject *_apache_module_init();
           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:236:11: error: declaration for parameter 'python_interpreter_name' but no such parameter
 PyObject* python_interpreter_name(void);
           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:235:14: error: declaration for parameter 'python_cleanup' but no such parameter
 apr_status_t python_cleanup(void *data);
              ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:233:3: error: declaration for parameter 'py_handler' but no such parameter
 } py_handler;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:222:3: error: declaration for parameter 'python_filter_ctx' but no such parameter
 } python_filter_ctx;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:215:3: error: declaration for parameter 'py_req_config' but no such parameter
 } py_req_config;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:202:3: error: declaration for parameter 'cleanup_info' but no such parameter
 } cleanup_info;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:192:3: error: declaration for parameter 'py_config' but no such parameter
 } py_config;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:179:3: error: declaration for parameter 'py_global_config' but no such parameter
 } py_global_config;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:171:3: error: declaration for parameter 'interpreterdata' but no such parameter
 } interpreterdata;
   ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:164:27: error: declaration for parameter 'mp_version_component' but no such parameter
 extern const char * const mp_version_component;
                           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:163:27: error: declaration for parameter 'mp_version_string' but no such parameter
 extern const char * const mp_version_string;
                           ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:162:18: error: declaration for parameter 'mp_version_patch' but no such parameter
 extern const int mp_version_patch;
                  ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:161:18: error: declaration for parameter 'mp_version_minor' but no such parameter
 extern const int mp_version_minor;
                  ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:160:18: error: declaration for parameter 'mp_version_major' but no such parameter
 extern const int mp_version_major;
                  ^
/tmp/mod_python-3.5.0/src/include/mod_python.h:159:27: error: declaration for parameter 'mp_git_sha' but no such parameter
 extern const char * const mp_git_sha;
                           ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:107:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/finfoobject.h:35:7: error: declaration for parameter 'finfoobject' but no such parameter
     } finfoobject;
       ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:106:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/filterobject.h:55:7: error: declaration for parameter 'filterobject' but no such parameter
     } filterobject;
       ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:105:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/requestobject.h:54:7: error: declaration for parameter 'requestobject' but no such parameter
     } requestobject;
       ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:104:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/_apachemodule.h:32:16: error: declaration for parameter 'init_apache' but no such parameter
 PyMODINIT_FUNC init_apache(void);
                ^
/tmp/mod_python-3.5.0/src/include/_apachemodule.h:31:11: error: declaration for parameter 'get_ServerReturn' but no such parameter
 PyObject *get_ServerReturn(void);
           ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:103:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/connobject.h:47:7: error: declaration for parameter 'connobject' but no such parameter
     } connobject;
       ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:102:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/serverobject.h:36:7: error: declaration for parameter 'serverobject' but no such parameter
     } serverobject;
       ^
In file included from /tmp/mod_python-3.5.0/src/include/mod_python.h:101:0,
                 from mod_python.c:28:
/tmp/mod_python-3.5.0/src/include/tableobject.h:40:7: error: declaration for parameter 'tableobject' but no such parameter
     } tableobject;
       ^
mod_python.c:2962:1: error: expected '{' at end of input
 };
 ^
mod_python.c:2962:1: warning: control reaches end of non-void function [-Wreturn-type]
 };
 ^
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make[1]: Leaving directory `/tmp/mod_python-3.5.0/src'
make: *** [do_dso] Error 2

I rarely compile things, so not even sure where to start. I'm pretty sure I've verified all required dependencies. Any help would be appreciated.

lampp install mod_python module error

root@localhost:~/mod_python-master# make
make[1]: Entering directory `/root/mod_python-master/src'

Building mod_python.so.

/opt/lampp/bin/apxs -I/root/mod_python-master/src/include -I/usr/include/python2.7 -DNDEBUG -D_FORTIFY_SOURCE=2 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c version.c include/_apachemodule.h include/filterobject.h include/hlist.h include/mod_python.h include/psp_flex.h include/psp_parser.h include/requestobject.h include/tableobject.h include/connobject.h include/finfoobject.h include/hlistobject.h include/mp_version.h include/_pspmodule.h include/psp_string.h include/serverobject.h include/util.h -L/usr/lib -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil
/opt/lampp/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -I/opt/lampp/include/c-client -I/opt/lampp/include/libpng -I/opt/lampp/include/freetype2 -O3 -fPIC -L/opt/lampp/lib -I/opt/lampp/include -I/opt/lampp/include/ncurses -D_REENTRANT -D_GNU_SOURCE -pthread -I/opt/lampp/include -I/opt/lampp/include/apr-1 -I/opt/lampp/include/apr-1 -I/opt/lampp/include -I/root/mod_python-master/src/include -I/usr/include/python2.7 -DNDEBUG -D_FORTIFY_SOURCE=2 -c -o mod_python.lo mod_python.c && touch mod_python.slo
/opt/lampp/build/libtool: 1555: /opt/lampp/build/libtool: preserve_args+= --silent: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= gcc: not found
/opt/lampp/build/libtool: 2419: /opt/lampp/build/libtool: later+= -prefer-pic: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -std=gnu99: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/c-client: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/libpng: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/freetype2: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -O3: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -fPIC: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -L/opt/lampp/lib: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/ncurses: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -D_REENTRANT: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -D_GNU_SOURCE: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -pthread: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/apr-1: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/apr-1: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/root/mod_python-master/src/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/usr/include/python2.7: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -DNDEBUG: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -D_FORTIFY_SOURCE=2: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -c: not found
libtool: compile: you must specify a compilation command
libtool: compile: Try libtool --help --mode=compile' for more information. apxs:Error: Command failed with rc=65536 . make[1]: *** [mod_python.so] Error 1 make[1]: Leaving directory/root/mod_python-master/src'
make: *** [do_dso] Error 2

import_module

Hello,
As far as I understood the correct way to import a module bd.py in mod_python is:
import mod_python ; bd = mod_python.apache.import_module('bd')
But then I observe some inconsistencies.
For instance if I modify bd.py, then changes are not always visible when I reload the script importing
the module. I guess because the module is not reloaded.
Did I miss something?

ImportError: No module named _apache

After install mod_python 3.5, I encounter an error when I run the mptest.py in command line.
Traceback (most recent call last):
File "mptest.py", line 2, in
from mod_python import apache
File "/usr/lib64/python2.6/site-packages/mod_python/apache.py", line 30, in
import _apache
ImportError: No module named _apache

I encounter "No data received" error when I access http://192.168.14.100/htdocs/test/mptest.py, but http://192.168.14.100/htdocs/test is OK.

The content of mptest.py is just like the example in the doc:
from mod_python import apache
def handler(req):
req.content_type = 'text/plain'
req.write("Hello World mod_python test!")
return apache.OK

and the mod_python version prints out:
[huskier@server test]$ mod_python version

mod_python: 3.5.0-54d42b1
'/usr/lib64/httpd/modules/mod_python.so'

python: 2.6.6 (r266:84292, Jun 18 2012, 09:57:52) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
'/usr/bin/python'

httpd: 2.2.15
'/usr/sbin/httpd'

apr: 1.3.9
platform: Linux-2.6.32-71.el6.x86_64-x86_64-with-redhat-6.0-Carbon

The content in httpd.conf file is as following:
LoadModule python_module modules/mod_python.so

<Directory /var/www/html/htdocs/test>
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On

Any ideas?

Thanks!

3.5.0-462d30a - make_obcallback: could not import mod_python.apache

When loading the mpinfo test page (and all other pages served by mod_python) I am encountering the following error in my Apache error.log file:

[Tue Mar 13 00:58:15.446436 2018] [:error] [pid 10283] make_obcallback: could not import mod_python.apache.\n
ImportError: No module named mod_python.apache
[Tue Mar 13 00:58:15.446479 2018] [:error] [pid 10283] make_obcallback: Python path being used "['/usr/lib64/python27.zip', '/usr/lib64/python2.7/', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload']".
[Tue Mar 13 00:58:15.446484 2018] [:error] [pid 10283] get_interpreter: no interpreter callback found.

The Python path is missing the directory where mod_python is installed (/usr/lib64/python2.7/site-packages) so it looks like site.py file is not being loaded prior to the import attempt. The page loads fine so the error is not a show stopper - somewhere before the error the module must be loaded successfully.

mod_python version: 3.5.0-462d30a
OS: CentOS Linux release 7.4 (AWS ami-b63ae0ce - us-west-2)
Python version: 2.7.5 (stock with OS)
Apache version: 2.4.6 (stock with OS - prefork)

I can eliminate the error by adding a symbolic link in /usr/lib64/python2.7:

ln -s ./site-packages/mod_python mod_python

or adding PYTHONPATH to /etc/sysconfig/httpd:

PYTHONPATH=/usr/lib64/python2.7/site-packages

Neither approach seems ideal. Is there a better way to prevent this error?

I have also duplicated the error with CentOS 6.9 / Apache 2.2.15 / Python 2.6.6.

If helpful, the error is not generated when I tried mod_python version 3.4.1-f311fae.

mod_python authentication handlers and cgi scripts

I ran into a problem with trying to wrap a cgi script with a set of mod_python authentication handlers.

I've been using the the set of authentication handlers for a while to wrap a set of subversion repos. This has worked well, but now I need to extend the authentication/authorization to a set of git repos, and it appears that mod_python is conflicting with the cgi handler that git uses.

I can either get the authentication handlers to work, or, I can get the git-http-backend script to work, but not both.

Fallback content handler blocked by mod_python

I'm working with an application, Foreman, which serves ruby-generated content using passenger. Working on handling some input similar to the way the intercept_form_submit_module Apache module works.

If I don't specify anything, passenger handles the content.

If I specify a location, I can do preprocessing and the content is still generated by passenger. this works fine with intercept_form_submit_module and mod_perl. The handler in this case just returns an OK.

<Location /users/login>
  PerlFixupHandler myApache::myModule
</Location>

If I do this with mod_python, I get a 404 Not Found error.

<Location /users/login>
  PythonFixupHandler my_apache.my_module
</Location>

It seems like something in mod_python prevents the processing from continuing.

Interestingly, when I enable the rewrite engine, it works as expected.

<Location /users/login>
  PythonFixupHandler my_apache.my_module
  RewriteEngine on
</Location>

Is there something going on behind the scenes that requires the rewrite engine or is it just fixing something in the configuration?

Enable install for python2 and python3 at the same time.

I just picked up the Gentoo/Linux package and bumped it to version 3.5.0.

Is there a possibility to install mod_python for python2 and 3 in parallel?

I mean there are plenty of projects in python2 not yet fit for python3 and
development for python3 stalls due mod_python not installed for python3.

Gentoo supports multiple python installs by default, all to be solved is the
apache module namespace and the .so names.

Something like
LoadModule python_module modules/mod_python.so
LoadModule python3_module modules/mod_python3.so
and
<Directory /srv/python2_stuff>
AddHandler python-program .py

<Directory /srv/python3_stuff>
AddHandler python3-program .py

Would be awesome.

Python3: SyntaxError occured in psp.py

SyntaxError occured using Python3:

import psp.py file.

# test_psp.py
from psp import PSP

pass

run.

$ python --version
Python 3.6.1

$ pwd
/path/to/lib/python

$ python mod_python/test_psp.py 
Traceback (most recent call last):
  File "mod_python/test_psp.py", line 1, in <module>
    from psp import PSP
  File "/path/to/lib/python/mod_python/psp.py", line 280
    raise et, ev, etb
            ^
SyntaxError: invalid syntax

Code isn't C89

The current mod_python code isn't compliant with C89. Among other things, this prevents it from building with VS2008 on Windows with Python 2.7.

The main issues seemed to be variables declared after statements in a block. For example, from requestobject.c:

static PyObject *req_build_wsgi_env(requestobject *self)
{

    request_rec *r = self->request_rec;
    apr_table_t *e = r->subprocess_env;
    PyObject *env, *v;
    const char *val;
    int i, j;

    env = PyDict_New();
    if (!env)
        return NULL;

    int rc = set_wsgi_path_info(self);
    ...

Failed when compiling mod_python

HI, I'm new here, I'm trying to run make and got bellow error.
Machine: OpenIndiana 151a8 x86_64, Illumos gcc 4.4.4, python 2.6, httpd 2.4.6

Building

./configure --with-apxs=/usr/httpd/bin/apxs --with-python=/usr/bin/python

gmake

gmake install

Performing DSO installation.

/usr/bin/ginstall -c -d /usr/httpd/modules
/usr/bin/ginstall -c src/mod_python.so /usr/httpd/modules
gmake[1]: Leaving directory /usr/share/src/mod_python-master' gmake install_py_lib gmake[1]: Entering directory/usr/share/src/mod_python-master'
cd dist && gmake install_py_lib
gmake[2]: Entering directory /usr/share/src/mod_python-master/dist' gmake[3]: Entering directory/usr/share/src/mod_python-master/src'
gmake[3]: psp_parser.c' is up to date. gmake[3]: Leaving directory/usr/share/src/mod_python-master/src'
if test -z "" ; then
/usr/bin/python setup.py install --optimize 2 --force ;
else
/usr/bin/python setup.py install --optimize 2 --force --root ;
fi
running install
running build
running build_py
copying /usr/share/src/mod_python-master/lib/python/mod_python/version.py -> bui ld/lib.solaris-2.11-i86pc-2.6/mod_python
running build_ext
running install_lib
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/cgihandler.py -> /usr/lib/py thon2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/httpdconf.py -> /usr/lib/pyt hon2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/_psp.so -> /usr/lib/python2. 6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/wsgi.py -> /usr/lib/python2. 6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/cache.py -> /usr/lib/python2 .6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/version.py -> /usr/lib/pytho n2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/python22.py -> /usr/lib/pyth on2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/init.py -> /usr/lib/pyth on2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/Session.py -> /usr/lib/pytho n2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/Cookie.py -> /usr/lib/python 2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/util.py -> /usr/lib/python2. 6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/publisher.py -> /usr/lib/pyt hon2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/psp.py -> /usr/lib/python2.6 /site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/apache.py -> /usr/lib/python 2.6/site-packages/mod_python
copying build/lib.solaris-2.11-i86pc-2.6/mod_python/testhandler.py -> /usr/lib/p ython2.6/site-packages/mod_python
byte-compiling /usr/lib/python2.6/site-packages/mod_python/cgihandler.py to cgih andler.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/httpdconf.py to httpd conf.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/wsgi.py to wsgi.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/cache.py to cache.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/version.py to version .pyc
SyntaxError: ('EOL while scanning string literal', ('/usr/lib/python2.6/site-pac kages/mod_python/version.py', 3, 47, 'version = "./version.sh: line 8: git: not found\n'))

byte-compiling /usr/lib/python2.6/site-packages/mod_python/python22.py to python 22.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/init.py to __init __.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/Session.py to Session .pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/Cookie.py to Cookie.p yc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/util.py to util.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/publisher.py to pub sher.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/psp.py to psp.pyc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/apache.py to apache yc
byte-compiling /usr/lib/python2.6/site-packages/mod_python/testhandler.py to t thandler.pyc
writing byte-compilation script '/tmp/tmpoSuEOE.py'
/usr/bin/python -OO /tmp/tmpoSuEOE.py
SyntaxError: ('EOL while scanning string literal', ('/usr/lib/python2.6/site-p kages/mod_python/version.py', 3, 47, 'version = "./version.sh: line 8: git: no found\n'))

removing /tmp/tmpoSuEOE.py
running install_egg_info
Removing /usr/lib/python2.6/site-packages/mod_python-.version.sh.line.8_.git not.found_3.4.0_-py2.6.egg-info
Writing /usr/lib/python2.6/site-packages/mod_python-.version.sh.line.8_.git_ ot.found_3.4.0_-py2.6.egg-info
gmake[2]: Leaving directory /usr/share/src/mod_python-master/dist' gmake[1]: Leaving directory/usr/share/src/mod_python-master'
cd scripts && gmake install
gmake[1]: Entering directory /usr/share/src/mod_python-master/scripts' /usr/bin/ginstall -c -m 0755 mod_python /usr/local/bin/mod_python /usr/bin/ginstall: cannot create regular file/usr/local/bin/mod_python': No ch file or directory
gmake[1]: *** [install] Error 1
gmake[1]: Leaving directory `/usr/share/src/mod_python-master/scripts'
gmake: *** [install] Error 2

Appreciate your help.

Build failed with Python 2.7.6 (cross compil) for Apache 2.4.7

byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/python22.py to python22.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/httpdconf.py to httpdconf.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/cache.py to cache.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/Session.py to Session.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/publisher.py to publisher.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/testhandler.py to testhandler.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/cgihandler.py to cgihandler.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/init.py to init.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/util.py to util.pyc
byte-compiling /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/apache.py to apache.pyc
writing byte-compilation script '/tmp/tmpJnPbnJ.py'
/raid/data/module/apache/sys/bin/python -OO /tmp/tmpJnPbnJ.py
File "/raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python/version.py", line 3
version = "
^
SyntaxError: EOL while scanning string literal

removing /tmp/tmpJnPbnJ.py
running install_egg_info
Writing /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python-git.the.filemanager.with.GNU.Interactive.Tools_.is.now.called.gitfm.If.you.are.looking.for.git.Linus.Torvald_s.content.tracker_go.to.http_git.or.cz_..If.it.is.already.installed_.see.git_7_.This.transition.script.will.be.removed.in.a.later.release.3.5.0-py2.7.egg-info
error: /raid/data/module/apache/sys/lib/python2.7/site-packages/mod_python-git.the.filemanager.with.GNU.Interactive.Tools
.is.now.called.gitfm.If.you.are.looking.for.git.Linus.Torvald_s.content.tracker_go.to.http_git.or.cz_..If.it.is.already.installed_.see.git_7_._This.transition.script.will.be.removed.in.a.later.release.3.5.0-py2.7.egg-info: File name too long
make[1]: *** [install_py_lib] Error 1
make[1]: Leaving directory `/raid/SRC/mod_python-master/dist'
make: *** [install_py_lib] Error 2

if any an has answer ???

fatal: Not a valid object name HEAD

Mac OS X 10.8.5
Xcode 5.0
Python 3.3

./configure --with-python=/usr/local/bin/python3

make with 3 warnings, then when I run sudo make install:

byte-compiling /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mod_python/version.py to version.cpython-33.pyc
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mod_python/version.py", line 3
version = "fatal: Not a valid object name HEAD
^
SyntaxError: EOL while scanning string literal

byte-compiling /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mod_python/wsgi.py to wsgi.cpython-33.pyc
writing byte-compilation script '/tmp/tmp2hty0w.py'
/usr/local/bin/python3 -OO /tmp/tmp2hty0w.py
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mod_python/version.py", line 3
version = "fatal: Not a valid object name HEAD
^
SyntaxError: EOL while scanning string literal

removing /tmp/tmp2hty0w.py
running install_egg_info
Removing /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mod_python-fatal_.Not.a.valid.object.name.HEAD_3.5.0_-py3.3.egg-info
Writing /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mod_python-fatal_.Not.a.valid.object.name.HEAD_3.5.0_-py3.3.egg-info
cd scripts && make install
/usr/bin/install -c -m 0755 mod_python /usr/local/bin/mod_python

make test:

make[1]: Nothing to be done for all'. make[2]:psp_parser.c' is up to date.
/usr/local/bin/python3 setup.py build
running build
running build_py
copying /Users/davis/Downloads/mod_python-3.5.x/lib/python/mod_python/version.py -> build/lib.macosx-10.6-intel-3.3/mod_python
running build_ext

Now run sudo make install
(or, if you only want to perform a partial install,
you can use make install_dso and make install_py_lib)

cd test && make test
/usr/local/bin/python3 test.py
Cannot import mod_python.version. Either you didn't run the ./configure script, or you're running this script in a Win32 environment, in which case you have to make it by hand.

See full output: https://gist.github.com/notdavis/7217093

Can we please let mod_python rest in peace?

There is absolutely no good reason to use it nowadays.

  • It's Apache-specific and code written for it will never work in any other webserver without major rewrites or possibly a rather nasty WSGI<=>mod_python emulation layer
  • WSGI is the de-factor standard
  • mod_python usually results in PHP-style URLs which do not belong into any modern application. Routing is the way to go.

Please note that this is in no way meant to offend any of the initial developers. Before WSGI, mod_python was a great thing to avoid dealing with CGI. But today.... well, see above.

HTTP GET arguments causing errors with handler function input arguments

I have found two errors which occurred with HTTP GET arguments that get passed to a handler function in a Python handler script. They were added to the server error log and caused "500 Internal Server Error" responses as expected. Relevant snippet of error log with details:

[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher: Traceback (most recent call last):
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/apache.py", line 398, in HandlerDispatch\n    result = obj(req)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/publisher.py", line 222, in handler\n    published = publish_object(req, object)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/publisher.py", line 446, in publish_object\n    return publish_object(req, util.apply_fs_data(obj, req.form, req=req))
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 642, in apply_fs_data\n    return object(**args)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher: TypeError: a() missing 1 required positional argument: 'x'
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher: Traceback (most recent call last):
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/apache.py", line 398, in HandlerDispatch\n    result = obj(req)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/publisher.py", line 222, in handler\n    published = publish_object(req, object)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/publisher.py", line 445, in publish_object\n    req.form = util.FieldStorage(req, keep_blank_values=1)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 250, in __init__\n    self.add_field(pair[0], pair[1])
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 398, in add_field\n    item = StringField(value)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 159, in __new__\n    return bytes.__new__(self, value)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher: TypeError: string argument without an encoding
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher: Traceback (most recent call last):
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/apache.py", line 398, in HandlerDispatch\n    result = obj(req)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/publisher.py", line 222, in handler\n    published = publish_object(req, object)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/publisher.py", line 445, in publish_object\n    req.form = util.FieldStorage(req, keep_blank_values=1)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 250, in __init__\n    self.add_field(pair[0], pair[1])
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 398, in add_field\n    item = StringField(value)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher:   File "/usr/local/lib/python3.4/site-packages/mod_python/util.py", line 159, in __new__\n    return bytes.__new__(self, value)
[<date>] [:error] [<pid, tid>] [<client>] PythonHandler mod_python.publisher: TypeError: string argument without an encoding

Details:

  • The first error section (lines 1-6) states TypeError: a() missing 1 required positional argument: 'x'. This occurs when a HTTP GET argument (in this case "x") that is an argument of the request handler function (in this case "a") is not given in the request but is a positional argument of the handler function. "mod_python" does not give the null value None when this argument is not present in the request but is positional, which would be a useful feature but isn't essential as these errors can be avoided by making the argument have a default value of None instead (if optional).
  • The other more major error is shown on lines 7-14 and 15-22 stating TypeError: string argument without an encoding. This occurs when a HTTP GET argument (in this case "x") is provided but for some reason is invalid and "has no encoding". I don't understand this issue but it prevents server code from working with HTTP GET arguments so is an important issue.

error try to cross compile for Thecus NAS implementation

using Apache 2.4.6 and Python 2.7.5 and Git source

make[1]: Entering directory `/raid/SRC/mod_python/src'

Compiling for DSO.

/raid/data/module/apache/sys/bin/apxs -I/raid/SRC/mod_python/src/include -I/raid/data/module/apache/sys/include/python2.7 -DNDEBUG -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c -L/raid/data/module/apache/sys/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil
/raid/data/module/apache/sys/share/build-1/libtool --silent --mode=compile i686-nptl-linux-gnu-gcc -std=gnu99 -prefer-pic -O2 -I/raid/data/module/apache/sys/include -DBIG_SECURITY_HOLE -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/raid/data/module/apache/sys/include -I/raid/data/module/apache/sys/include -I/raid/data/module/apache/sys/include -I/raid/data/module/apache/sys/include -I/raid/SRC/mod_python/src/include -I/raid/data/module/apache/sys/include/python2.7 -DNDEBUG -c -o mod_python.lo mod_python.c && touch mod_python.slo
mod_python.c: In function 'init_mutexes':
mod_python.c:564:30: error: 'unixd_config' undeclared (first use in this function)
mod_python.c:564:30: note: each undeclared identifier is reported only once for each function it appears in
mod_python.c:565:17: warning: implicit declaration of function 'unixd_set_global_mutex_perms'
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make[1]: Leaving directory `/raid/SRC/mod_python/src'
make: *** [do_dso] Error 2

any idea ??? thanks for your help

mod_python.so: undefined symbol: sincos Action 'configtest' failed.

I wanted to have a working python3 with Apache.
But I don't get it working. What am I doing wrong?

Platform: Linux-3.2.0-4-amd64 Debian-7.8 (3.2.65)
Apache-Version: 2.2.22
Python-Version: 3.5.0a2
mod_python version : 3.5.0-9d223c3

Compiled Python3.5 with CFLAGSFORSHARED="-fPIC" CCSHARED="-fPIC" CCSHARED="-fPIC"
Compiled mod_python from git-Source with: ./configure --with-apxs=/usr/bin/apxs2 --with-python=/usr/local/bin/python3.5 --with-mutex-dir=/tmp --with-max-locks=32

Apache has no errorlogs concerning the issue.
When testing with 'make test':

apache2: Syntax error on line 48 of /root/Downloads/mod_python/test/conf/test.conf: Cannot load /root/Downloads/mod_python/src/mod_python.so into server: /root/Downloads/mod_python/src/mod_python.so: undefined symbol: sincos
Stopping Apache...

...over and over again.

By installing from package: apt-get install libapache2-mod-python everything works, beacuse apache is using python2.7. But this is not what i wanted ...

How to tell Apache that he's not allowed to use Python 2.7 instead Python3.5 has to be used!
I red that the compiled mod_python is deciding which Python is used ... but how can i tell the packet manager that 'libapache2-mod-python' shall be installed for 3.5

EDIT: So this is the current install ๐Ÿ‘Ž
[Sun Mar 29 20:36:21 2015] [notice] Apache/2.2.22 (Debian) mod_python/3.3.1 Python/2.7.3 configured -- resuming normal operations

I hope someone can help me.
Best

Allow None as value for req.args.

From the mailing list, post (with patch) by Ron Gomes:

We use mod_python to rewrite URLs internally based on request criteria. As part of our processing, in our request handler we grab and then remove any request query parameters by setting

req.args = None

so that they will be invisible to later phases.

A change was necessary to src/requestobject.c in order to make this work since, as delivered, that line causes an exception to be thrown because the code only allows Python strings to be assigned to req.args.

Assigning an empty string would work but the semantics of that are slightly different and are indistinguishable from an explictly-empty query string.

Bad multiline string formatting in "version.py"

I get this in "version.py":

"""

THIS FILE IS AUTO-GENERATED BY setup.py

version = "fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
3.5.0-"
"""

This multiline string is not syntactically correct.

Install and package errors (fairly minor but causes server code to fail)

In installation procedures, during command sudo make install, this syntax error appeared:

writing byte-compilation script '/tmp/tmp3_fwvisj.py'
/usr/local/bin/python3.4 -OO /tmp/tmp3_fwvisj.py
  File "/usr/local/lib/python3.4/site-packages/mod_python/version.py", line 3
    version = "fatal: Not a git repository (or any of the parent directories): .git
                                                                                  ^
SyntaxError: EOL while scanning string literal
removing /tmp/tmp3_fwvisj.py
running install_egg_info
Writing /usr/local/lib/python3.4/site-packages/mod_python-fatal_.Not.a.git.repository._or.any.of.the.parent.directories_..git_3.5.0_-py3.4.egg-info
make[2]: Leaving directory '/home/pi/Temporary/mod_python-3.5.0/dist'

(error description on lines 3-6 of terminal stdout quote). However this error did not cause any other obvious issues and the install seemed to work correctly. I have noticed though that it caused the egg-info file to have a weird name too (line 9). The other filenames of the mod_python package including the folder were not affected.

Also during command make, this confusing message (line 3 of quote) occurred:

pi@XXX ~/Temporary/mod_python-3.5.0 $ make
make[1]: Entering directory '/home/pi/Temporary/mod_python-3.5.0/src'
fatal: Not a git repository (or any of the parent directories): .git

Building mod_python.so.

It shows an error with a fatal: prefix hinting that it may be a serious issue however caused no problems with the command.

Later on, running the "testing" part of the installation steps, I ran into a proper (but simple) problem caused by the first errors. The file "version.py" in the mod_python python package had a syntax error caused by the "fatal: Not a git repository..." error that was placed in front of the version number. This caused the mod_python module to fail whenever it was imported, so the test page on the server failed. However I found the simple issue and removed the message before the version number in the code, which fixed the problem. This is still an issue though as it needs to be fixed in the compiler code.

Note: I was using version 3.5.0 of mod_python downloaded from the official website and unpacked from the .tgz compressed folder. NOT a git repository, and the installing code should not require it to be!

mod_python 3.4.0 alpha available for testing, please help!

Anyone reading this can test and provide feedback as a comment. Your help is VERY much appreciated!

Instructions:

  • Get mod_python.
  $ git clone https://github.com/grisha/mod_python.git
  $ git checkout -b 3.4.x origin/3.4.x
  • Compile and run tests:
  $ ./configure
  $ make
  $ sudo make install
  $ make test
  • If tests produce errors, please include those as part of your feedback.
  • Please remember to include the output of
  $ mod_python version

That's it!

undefined symbol: mp_version_component

Thanks for your suggestion yesterday on getting mod_python to compile/install. Hoping there might be some insight on this new issue. I am not sure why I am having so many issues, Ive set up mod_python half a dozen times in the past without issue. This time, not so much.

After yum reinstalling httpd-devel and python-devel dependencies, mod_python installed, but now I can not get apache to start; displaying the following error:

[*NEXT* root@puppet 1 /etc/httpd/conf.modules.d]# systemctl status httpd -l
โ— httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-01-04 12:09:09 CST; 1s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 25987 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 25985 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 25985 (code=exited, status=1/FAILURE)

Jan 04 12:09:09 puppet httpd[25985]: [Thu Jan 04 12:09:09.046522 2018] [so:warn] [pid 25985] AH01574: module ssl_module is already loaded, skipping
Jan 04 12:09:09 puppet httpd[25985]: [Thu Jan 04 12:09:09.046543 2018] [so:warn] [pid 25985] AH01574: module systemd_module is already loaded, skipping
Jan 04 12:09:09 puppet httpd[25985]: [Thu Jan 04 12:09:09.046594 2018] [so:warn] [pid 25985] AH01574: module cgi_module is already loaded, skipping
Jan 04 12:09:09 puppet httpd[25985]: httpd: Syntax error on line 41 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.modules.d/01-mod_python.conf: Cannot load modules/mod_python.so into server: /etc/httpd/modules/mod_python.so: undefined symbol: mp_version_component
Jan 04 12:09:09 puppet systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 04 12:09:09 puppet kill[25987]: kill: cannot find process ""
Jan 04 12:09:09 puppet systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 04 12:09:09 puppet systemd[1]: Failed to start The Apache HTTP Server.
Jan 04 12:09:09 puppet systemd[1]: Unit httpd.service entered failed state.

No other log file shows much of anything. Dr. Google doesn't really get me anywhere and I didnt find this error in any previous issues on here.

httpd.conf

[*NEXT* root@puppet 130 /var/log/httpd]# cat /etc/httpd/conf/httpd.conf
# Security
ServerTokens OS
ServerSignature On
TraceEnable On

ServerName "puppet.lab.beer.town"
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
LimitRequestFieldSize 8190


User apache
Group apache

AccessFileName .htaccess
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</FilesMatch>

<Directory />
  Options Indexes FollowSymLinks
  AllowOverride All
</Directory>

HostnameLookups Off
ErrorLog "/var/log/httpd/error_log"
LogLevel debug
EnableSendfile On

#Listen 80

#LoadModule python_module modules/mod_python.so

Include "/etc/httpd/conf.modules.d/*.load"
Include "/etc/httpd/conf.modules.d/*.conf"
Include "/etc/httpd/conf/ports.conf"

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded

IncludeOptional "/etc/httpd/conf.d/*.conf"

01-mod_python.conf

[*NEXT* root@puppet 0 /var/log/httpd]# cat /etc/httpd/conf.modules.d/01-mod_python.conf
LoadModule python_module modules/mod_python.so

Not really sure what else to put in here, thats about all the logs and info I can find. Any help would really be appreciated, been fighting this thing for a few days.

Thanks.

GIT required when installing from the tarball

Version is calculated incorrectly, installed version will mismatch and you get stuff like this:

"""
/usr/local/lib/python3.3/site-packages/mod_python-fatal_.Not.a.git.repository._or.any.parent.up.to.mount.point._tmp_Stopping.at.filesystem.boundary.GIT_DISCOVERY_ACROSS_FILESYSTEM.not.set.3.5.0-py3.3.egg-info
"""

Symbol not found: _PyBytes_Type

I'm trying to compile and install mod_python on Mac OS X Darwin Kernel Version 15.0.0
I get
Cannot load modules/mod_python.so into server: dlopen(/usr/local/apache2/modules/mod_python.so, 10): Symbol not found: _PyBytes_Type\n Referenced from: /usr/local/apache2/modules/mod_python.so\n Expected in: flat namespace\n in /usr/local/apache2/modules/mod_python.so

WSGI handler not updating status code

I've been having trouble getting my wsgi application (in this case, Django) to change the status code of the Apache response, and I think it might due to a bug with mod_python. I wrote a simple wsgi handler to confirm: no matter what status string is passed into start_response, the status remains unchanged from '200 OK'.

I got an inspection of the mp_request object being used by the handler, right after start_response is called. Note that status_line is changed but status isn't. Poking around in requestobject.c, I noticed only status_line is updated, I wonder if this has anything to do with it?

I was able to fix this for myself by hacking the WSGI handler to manually adjust req.status property:

# in wsgi.py, line 67...

## Run the app

response = None
try:
    response = app(env, req.wsgi_start_response)
    req.status = int(req.status_line.split(' ', 1)[0])        # added this
    [req.write(token) for token in response]

Version info: Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_python/3.5.0- Python/2.7.7

Take a look at this and see if you can replicate it. Maybe it's just a weird quirk of the somewhat-legacy configuration of the university server I'm on.

PyExc_SystemError

Environment:

OS: Linux

Python: 3.4.5

Apache: 2.4.3

Details:

I have compiled mod_python and install it partially. However , i use the following command:

./apachectl start

Error occurs as this:

Cannot load modules/mod_python.so into server, undefined symbol: PyExc_SystemError

Appreciate for any help :-๏ผ‰

Mod_python error: "PythonHandler roundup.cgi.apache"

Now mptest works fine, but when I use mod_python to configure roundup bug tracker, I've got the following error in browers [I tried Chrome, Firefox, and IE]:

Mod_python error: "PythonHandler roundup.cgi.apache"
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/mod_python/apache.py", line 398, in HandlerDispatch
result = obj(req)
File "/usr/lib/python2.6/site-packages/roundup/cgi/apache.py", line 135, in handler
_client.main()
File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 362, in main
self.inner_main()
File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 550, in inner_main
self.write_html(html)
File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 1211, in write_html
if self.env['REQUEST_METHOD'] == 'HEAD':
KeyError: 'REQUEST_METHOD'

I've also tried to google the internet, but nothing useful available for this kind of error.

The apache error log gives:
[Tue Nov 05 10:24:37 2013] [notice] mod_python: (Re)importing module 'roundup.cgi.apache'
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: Traceback (most recent call last):, referer: http://119.78.238.228/roundup/
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: File "/usr/lib64/python2.6/site-packages/mod_python/apache.py", line 398, in HandlerDispatch\n result = obj(req), referer: http://119.78.238.228/roundup/
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: File "/usr/lib/python2.6/site-packages/roundup/cgi/apache.py", line 135, in handler\n _client.main(), referer: http://119.78.238.228/roundup/
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 362, in main\n self.inner_main(), referer: http://119.78.238.228/roundup/
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 550, in inner_main\n self.write_html(html), referer: http://119.78.238.228/roundup/
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 1211, in write_html\n if self.env['REQUEST_METHOD'] == 'HEAD':, referer: http://119.78.238.228/roundup/
[Tue Nov 05 02:24:38 2013] [error] [client 119.78.238.228] PythonHandler roundup.cgi.apache: KeyError: 'REQUEST_METHOD', referer: http://119.78.238.228/roundup/

Thanks!

BASH dependency

When compiling mod_python on Solaris, I get this error:

"""
[jcea@stargate-host mod_python-3.5.0]$ make
make[1]: Entering directory '/tmp/z/mod_python-3.5.0/src'
/bin/sh: syntax error at line 1: `MP_GIT_SHA=$' unexpected
Makefile:67: recipe for target 'version.c' failed
make[1]: *** [version.c] Error 2
make[1]: Leaving directory '/tmp/z/mod_python-3.5.0/src'
Makefile:35: recipe for target 'do_dso' failed
make: *** [do_dso] Error 2
"""

Adding "SHELL=/bin/bash" to the Makefile, solves the issue.

An error will occur if the cookie contains $, in Cookie.py

An error will occur if the cookie contains $.

argument of type 'NoneType' is not iterable

File /usr/lib/python2.7/dist-packages/mod_python/Cookie.py,line 383, in get_cookies
  return Class.parse(cookies, **kw)
  File /usr/lib/python2.7/dist-packages/mod_python/Cookie.py,line 122, in parse
  dict = _parse_cookie(str, Class, **kw)
  File /usr/lib/python2.7/dist-packages/mod_python/Cookie.py,line 347, in _parse_cookie
  if key[0]!='$' and names is None or key in names:

Apparent memory leak

Running latest git/master + the MPM module loader patch, against python 2.6.9 and Apache 2.4.9, all tests succeed except:

FAIL: test_memory (main.PerRequestTestCase)

Traceback (most recent call last):
File "test.py", line 2834, in test_memory
self.fail("Memory before: %s, memory after: %s" % (before, after))
AssertionError: Memory before: 77677, memory after: 78205


Bug in mod_python comman line.

Hi! Just add this at line 87 in the command line utility mp_comments = [], otherwise you can't create publisher projects with mod_python ( cmd_create() fails to call mod_python.httpdconf.write_basic_config with a "firstly-referenced variable" error)

PyCObject_FromVoidPtr segfault on Suse

Reported by @feisenko in #4

mod_python:  3.4.0-f0dcd6e
             '/usr/local/apache2/modules/mod_python.so'

python:      2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC]
             '/usr/bin/python'

httpd:       2.4.6
             '/usr/local/apache2/bin/httpd'

apr:         1.4.8
platform:    Linux-2.6.37.6-24-pae-i686-with-SuSE-11.4-i586

Testing req.document_root() got frozen.
Debugging httpd showed a problem with PyCObject_FromVoidPtr (or how mod_python uses it).

Program received signal SIGSEGV, Segmentation fault.
0xb4751e8f in ?? () from /usr/lib/libpython2.7.so.1.0
(gdb) bt
#0  0xb4751e8f in ?? () from /usr/lib/libpython2.7.so.1.0
#1  0xb47522b2 in PyErr_WarnEx () from /usr/lib/libpython2.7.so.1.0
#2  0xb47248b0 in ?? () from /usr/lib/libpython2.7.so.1.0
#3  0xb47248ca in PyCObject_FromVoidPtr () from /usr/lib/libpython2.7.so.1.0
#4  0xb4882899 in save_interpreter (name=0x8d38c70 "wotan4.local.local", istate=<value optimized out>) at mod_python.c:193
#5  0xb4882a95 in get_interpreter (name=0x8d38c70 "wotan4.local.local") at mod_python.c:269
#6  0xb4886cf4 in python_handler (req=0x90ed8d0, phase=0xb4888135 "PythonHandler") at mod_python.c:1508
#7  0x0809d2e6 in ap_run_handler (r=0x90ed8d0) at config.c:169
#8  0x0809d681 in ap_invoke_handler (r=0x90ed8d0) at config.c:432
#9  0x08102d52 in ap_process_async_request (r=0x90ed8d0) at http_request.c:317
#10 0x08102e8d in ap_process_request (r=0x90ed8d0) at http_request.c:363
#11 0x080ff390 in ap_process_http_sync_connection (c=0x90d5a08) at http_core.c:190
#12 ap_process_http_connection (c=0x90d5a08) at http_core.c:231
#13 0x080a6296 in ap_run_process_connection (c=0x90d5a08) at connection.c:41
#14 0x081add62 in child_main (child_num_arg=<value optimized out>) at prefork.c:704
#15 0x081adf45 in make_child (s=0x826f088, slot=0) at prefork.c:746
#16 0x081aec76 in prefork_run (_pconf=0x823e0a8, plog=0x827b788, s=0x826f088) at prefork.c:956
#17 0x08083b34 in ap_run_mpm (pconf=0x823e0a8, plog=0x827b788, s=0x826f088) at mpm_common.c:98
#18 0x0807dbf0 in main (argc=4, argv=0xbffff554) at main.c:777

Upgrading to python 2.7.3 made it work.

mod_python:  3.4.0-f0dcd6e
             '/usr/local/apache2/modules/mod_python.so'

python:      2.7.3 (default, Sep 28 2013, 20:32:52) [GCC 4.5.1 20101208 [gcc-4_5-branch revision 167585]]
             '/usr/bin/python'

httpd:       2.4.6
             '/usr/local/apache2/bin/httpd'

apr:         1.4.8
platform:    Linux-2.6.37.6-24-pae-i686-with-SuSE-11.4-i586

Testing still shows an error, but a real application ( check_mk dashboard ) shows no problem.

  * Testing internally (status messages go to error_log)
    $ curl --verbose --header 'Host: test_internal' http://127.0.0.1:57963/tests.py
F
======================================================================
ERROR: test_psp_error (__main__.PerRequestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 2023, in test_psp_error
    rsp = self.vhost_get("test_psp_error", path="/psptest_main.psp")
  File "test.py", line 429, in vhost_get
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

Build failed : fatal: relocations remain against allocatable but non-writable sections : une idรฉe ? an idea ?

uname -a
SunOS methpr 5.10 Generic_148888-01 sun4v sparc sun4v

echo $PATH
/usr/sbin:/usr/bin:/usr/local/bin:/etc:/EXP_SYS/etc/ga/scripts:/EXP_SYS/etc:/EXP_SYS/UTI:/METHPR/EXP_SYS/etc:/METHPR/EXP_SYS/uti:/opt/VRTSvxfs/sbin:/EXP_SYS/etc/ga/scripts:/usr/openwin/bin:/usr/ccs/bin

./configure --with-apxs=/METHPR/tmp/apache/bin/apxs --with-python=/METHPR/produits/python/bin/python

make

.../...
*** Warning: Linking the shared library mod_python.la against the non-libtool
*** objects _eprintf.o _floatdidf.o _muldi3.o is not portable!
Text relocation remains referenced
against symbol offset in file
.text (section) 0x1510 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o)
.text (section) 0x1514 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o)

.../...

__filbuf 0x33fc /METHPR/produits/python/lib/python2.6/config/libpython2.6.a(fileobject.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
*** Error code 1
make: Fatal error: Command failed for target mod_python.so' Current working directory /METHPR/data/mod_python-3.3.1/src *** Error code 1 The following command caused the error: cd src && make make: Fatal error: Command failed for targetdo_dso'

Python 3: "String argument without an encoding" error with non-empty query string

Output:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/lib64/python3.4/site-packages/mod_python/apache.py", line 398, in HandlerDispatch
result = obj(req)

File "/usr/lib64/python3.4/site-packages/mod_python/publisher.py", line 222, in handler
published = publish_object(req, object)

File "/usr/lib64/python3.4/site-packages/mod_python/publisher.py", line 445, in publish_object
req.form = util.FieldStorage(req, keep_blank_values=1)

File "/usr/lib64/python3.4/site-packages/mod_python/util.py", line 250, in init
self.add_field(pair[0], pair[1])

File "/usr/lib64/python3.4/site-packages/mod_python/util.py", line 398, in add_field
item = StringField(value)

File "/usr/lib64/python3.4/site-packages/mod_python/util.py", line 159, in new
return bytes.new(self, value)

TypeError: string argument without an encoding

Problem with DAV svn

Hi. I am not sure if its a problem with modpython or mod_dav_svn, but I can't get them to work. I have tried with mod_wsgi and other auth/authz providers and it works fine.

Here is my configuration:

<Location /svn/test>
  DAV svn
  SVNPath /var/db/svn/test

  AddHandler mod_python .py
  PythonAuthenHandler AuthHandler

  AuthBasicAuthoritative off
  AuthType Basic
  AuthUserFile /dev/null
  AuthName "Subversion repository"
  Require valid-user
</Location>

The only related log entry I am getting with Apache LogLevel debug is:

[Mon Jan 13 12:04:59 2014] [info] [client 127.0.0.1] Module bug? Request filename is missing for URI

Any ideas?

Thanks!

mod_python 3.4.1 alpha available for testing!

Anyone reading this can test and provide feedback as a comment. Your help is VERY much appreciated!

Instructions:

  • Get mod_python.
  $ git clone https://github.com/grisha/mod_python.git
  $ git checkout -b 3.4.x origin/3.4.x
  • Compile and run tests:
  $ ./configure
  $ make
  $ sudo make install
  $ make test
  • If tests produce errors, please include those as part of your feedback.
  • Please remember to include the output of
  $ mod_python version

That's it!

make test has a failure on Centos 7

I just downloaded the main branch and built it against Centos 7 and one of the make test tests failed.

FAIL: test_memory (main.PerRequestTestCase)

Traceback (most recent call last):
File "test.py", line 2834, in test_memory
self.fail("Memory before: %s, memory after: %s" % (before, after))
AssertionError: Memory before: 78023, memory after: 78551


Ran 72 tests in 14.998s

FAILED (failures=1)
F Stopping Apache...
/usr/sbin/httpd -k stop -f /home/mark/mod_python/test/conf/test.conf

FAIL: testPerRequestTests (main.PerInstanceTestCase)

Traceback (most recent call last):
File "test.py", line 3041, in testPerRequestTests
self.failUnless(result.wasSuccessful())
AssertionError: False is not true


Ran 7 tests in 41.089s

PyEval_SaveThread: NULL tstate

On apache httpd2 2.2.15 on CentOS release 6.5 (Final)
I am getting

mod_python: Creating 32 session mutexes based on 256 max processes and 0 max threads.
[Sun Sep 27 03:28:04 2015] [notice] mod_python: using mutex_directory /var/run/mod_python/
Fatal Python error: PyEval_SaveThread: NULL tstate
[Sun Sep 27 03:28:04 2015] [notice] seg fault or similar nasty error detected in the parent process

Is there any way to resolve it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.