[Dev-C++] Re: [mod_python] plz help :-)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Khalid El-K. <kha...@ho...> - 2003-04-14 06:49:05
|
if python is installed in "c:\program files\python\"
should PYTHONPATH point to that ?
thanx
>Hi,
>have you ensured that your PYTHONPATH is set in the environment for the
>user
>that starts apache on your box?
>
>'import site' failed; use -v for traceback - means that the python
>interpreter cannot file <python-installation-dir> in the $PYTHONPATH or
>%PYTHONPATH% env.
>
>LoadModule will load the mod_python module correctly into apache, but the
>PYTHONPATH must still be set for python to run right in apache;
>hope that helps.
>Matt
>----- Original Message -----
>From: "Khalid El-Kary" <kha...@ho...>
>To: <mod...@mo...>
>Sent: Sunday, April 13, 2003 4:39 PM
>Subject: Re: [mod_python] plz help :-)
>
>
> > >Hi Khalid
> > >I am not a specialist on this exspecially not on Windoze
> > >but SEE BELOW
> > >
> > > >I followed the installation instructions as in the mod_python
> > >documentation
> > > >"A Windows Installation" section ...
> > > >
> > > >and added the following lines to httpd.conf:
> > > >
> > > ><Directory "<Your Document Root>/python">
> > > > AddHandler python-program .py
> > > > PythonHandler mptest
> > > > PythonDebug on
> > > ></Directory>
> > > >
> > > >replaced "your document root" with mine :-)
> > > >
> > > >and created a file called mptest.py under "my document root/python"
> > > >which contained:
> > > >
> > > >from mod_python import apache
> > > >
> > > >def handler(req):
> > > > req.content_type = "text/plain"
> > > > req.send_http_header()
> > > > req.write("Hello World!")
> > > > return apache.OK
> > > >
> > > >Apache starts normally and writes out the mod_python headers and an
>error
> > > >message with which it continues normally:
> > > >
> > > >'import site' failed; use -v for traceback
> > >DOESNT THIS SHOWS THAT SOMETHING WITH LOADING THE MODULE WENT
> > >WRONG, ARE THERE ANY PATHS TO BE SET SO APACHE FINDS THE
> > >mod_python ??
> >
> > in the LoadModule section:
> > LoadModule python_module modules/mod_python.dll
> >
> > in the AddModule section:
> > AddModule mod_python.c
> >
> > I think if there was a configuration error, Apache shouldn't start
>normally
> > and give an error message ... anyway do you know anything about "'import
> > site' failed; use - v for traceback" thing ?
> >
> > >
> > > >Apache/1.3.24 (win32) mod_python/2.7.6 Python/2.2.1 PHP/4.2.3 running
>...
> > >
> > >
> > >
> > > >
> > > >unfrotunately, when i request "http://servername/python/mptest.py" it
> > >gives
> > > >an "500 - internal server error" ...
> > >I THINK http://servername/python/mptest
> > >IS SUFFICIENT
> > >
> > > >note that mod_python and python installations with apache went just
>fine,
> > > >since the headers were written properly.
> > > >
> > > >Windows ME, Apache 1.3.24, mod_python 2.7.6, Python 2.2.1
> > > >
> > > >anything wrong, or any suggestions to get it running ?
> > > >
> > > >thanx in advance,
> > > >
> > > >Regards,
> > > >Khalid Al-Kary
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >_________________________________________________________________
> > > >Protect your PC - get McAfee.com VirusScan Online
> > > >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> > > >
> > > >_______________________________________________
> > > >Mod_python mailing list
> > > >Mod...@mo...
> > > >http://www.modpython.org/mailman/listinfo/mod_python
> > >
> > >
> >
> >
> > _________________________________________________________________
> > STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> >
> > _______________________________________________
> > Mod_python mailing list
> > Mod...@mo...
> > http://www.modpython.org/mailman/listinfo/mod_python
> >
>
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
|