xampp
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | xampp [2012/01/27 00:14] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== xampp ====== | ||
+ | How to add Python onto a xampp installation. | ||
+ | |||
+ | Got this from [[http:// | ||
+ | |||
+ | ===== Configuring the server ===== | ||
+ | |||
+ | In the httpd.conf file for your apache installation (part of xampp) add the following all the way at the bottom. In my case the httpd.conf can be found here: C: | ||
+ | |||
+ | <file apache httpd.conf> | ||
+ | # | ||
+ | # For Python | ||
+ | # | ||
+ | AddHandler cgi-script .py | ||
+ | ScriptInterpreterSource Registry-Strict | ||
+ | </ | ||
+ | |||
+ | ===== Configuring the python script ===== | ||
+ | |||
+ | Then in the top of the python script on your server, it already knows it should be python, but it doesn’t know yet where the python program is. So as the very first line in your python scripts on the server you have to say where python is installed. In my case that looks like this: | ||
+ | |||
+ | <file python> | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | as opposed to: | ||
+ | <file python> | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | ===== Enabling index.py ===== | ||
+ | |||
+ | Of course it’s nice to have index.py files work just like index.php ones as well. So I added index.py to the following bit in the httpd.conf | ||
+ | |||
+ | <file apache httpd.conf> | ||
+ | # | ||
+ | # DirectoryIndex: | ||
+ | # is requested. | ||
+ | # | ||
+ | < | ||
+ | DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml index.py | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | or update the local directory' | ||
+ | |||
+ | <file apache .htaccess> | ||
+ | DirectoryIndex index.php index.html index.py | ||
+ | </ |
xampp.txt · Last modified: 2023/04/12 20:44 by 127.0.0.1