Help for python configure with xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Help for python configure with xampp

Postby kenshin716 » 07. June 2009 06:43

i'm a student in China, and now want to study python.

but there is some problem in development environment built.

"Apache/2.2.4 (Win32) DAV/2 mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.2 Server at 127.0.0.1"
This is my development environment.

but when i open the .py files , the file's source code will appear in the browser.

the python.py file's source code:

Code: Select all
from mod_python import apache
def handler(req):
   req.content_type = "text/html"
   req.write("<html><head></head><body>")
   req.write("<h1>Python is running with mod_python...</h1>")
   return apache.OK


Some configuration information:

#httpd.conf
LoadModule python_module modules/mod_python.so
Include conf/extra/httpd-python.conf

#httpd-python.conf
LoadModule python_module modules/mod_python.so

<Directory "/htdocs/python">
AddHandler mod_python .py
PythonHandler python
PythonDebug On
</Directory>

Thank you for your help , and sorry for my poor english.
kenshin716
 
Posts: 2
Joined: 07. June 2009 06:26

Re: Help for python configure with xampp

Postby Wiedmann » 07. June 2009 09:12

Code: Select all
#httpd.conf
LoadModule python_module modules/mod_python.so
Include conf/extra/httpd-python.conf

#httpd-python.conf
LoadModule python_module modules/mod_python.so

Don't load the python_module twice.

Code: Select all
<Directory "/htdocs/python">

You really have this directory?

But when i open the .py files , the file's source code will appear in the browser.

Your .py files are in the above directory?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Help for python configure with xampp

Postby kenshin716 » 07. June 2009 15:31

@Wiedmann

thank you for your help.
now i know the problem.
But in fact, I do not know where the file path was wrong.

with a .htaccess file , the problem has been resolved.
thank you again.
kenshin716
 
Posts: 2
Joined: 07. June 2009 06:26

Re: Help for python configure with xampp

Postby pranky27 » 19. November 2009 19:35

Hello all,

Please check this link: How to configure cron on Xampp on windows.

http://www.pankajdangi.com/2009/05/cron ... ampp-wamp/

Cheers :)
Pranky
pranky27
 
Posts: 1
Joined: 19. November 2009 19:34


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests