[mod_python] mod_chroot & mod_python problem

John isofroni at cc.uoi.gr
Mon Feb 7 08:48:18 EST 2005


Here is and the rest of the error logs.

That error is reported in the server's log (not in the virtual host error
log as before)

make_obcallback(): could not import mod_python.apache.
make_obcallback(): could not call init.




----- Original Message ----- 
From: "John" <isofroni at cc.uoi.gr>
To: <mod_python at modpython.org>
Sent: Monday, February 07, 2005 1:25 PM
Subject: Re: [mod_python] mod_chroot & mod_python problem


> Well, i run apache manually but i cannot see any error.
>
> mod_php works well without even touch it, why not mod_python?
>
>
>
> ----- Original Message ----- 
> From: "Graham Dumpleton" <grahamd at dscpl.com.au>
> To: "John" <isofroni at cc.uoi.gr>
> Cc: <mod_python at modpython.org>
> Sent: Monday, February 07, 2005 12:22 PM
> Subject: Re: [mod_python] mod_chroot & mod_python problem
>
>
> > Can you possibly run Apache manually yourself within the context of the
> > chroot jail?
> >
> > In the code prior to that point, it does:
> >
> >      if (! ((m = PyImport_ImportModule(MODULENAME)))) {
> >          fprintf(stderr, "make_obcallback(): could not import %s.\n",
> > MODULENAME);
> >      }
> >
> >      if (! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) {
> >          fprintf(stderr, "make_obcallback(): could not call %s.\n",
> >                  INITFUNC);
> >      }
> >
> > The problem is these print to stderr and not to the log and you
> > wouldn't see the
> > error messages. If you can run httpd manually, maybe you can then see
> > stderr.
> >
> > Alternatively, you could change the code to use the log file instead.
> > In mod_python
> > 3.1.3 it has:
> >
> >      if (! ((m = PyImport_ImportModule(MODULENAME)))) {
> >          ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s,
> >                       "make_obcallback: could not import %s.\n",
> > MODULENAME);
> >          PyErr_Print();
> >      }
> >
> >      if (m && ! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL))))
> > {
> >          ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s,
> >                       "make_obcallback: could not call %s.\n",
INITFUNC);
> >          PyErr_Print();
> >      }
> >
> > This will at least give you a little bit more information.
> >
> > One could speculate though that there isn't a Python distribution
> > accessible within
> > the chroot jail, or if there is, then mod_python isn't installed into
> > it.
> >
> > Graham
> >
> > On 07/02/2005, at 8:36 PM, John wrote:
> >
> > > Hello all
> > >
> > > I am using Apache/1.3.28 (Linux/SuSE) mod_python/2.7.10 Python/2.3+
> > > PHP/4.3.3 mod_ssl/2.8.15 OpenSSL/0.9.7b mod_chroot 0.4
> > >
> > > mod_python works outside the chroot jail but when i jail the apache i
> > > receive that error in my logs
> > >
> > > python_handler: make_obcallback returned no obCallBack!
> > >
> > > Does anyone know why this happen?
> > > _______________________________________________
> > > Mod_python mailing list
> > > Mod_python at modpython.org
> > > http://mailman.modpython.org/mailman/listinfo/mod_python
> >
> >
> >
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list