joefazee Posted October 5, 2007 Share Posted October 5, 2007 Hello, i want to run a .py file just the way we run .php file with apache, i have downloaded the windows installer for Mod_python and the Mod_python was created inside the Apache Modules directory but Apache was unable to load it. My Apache version is: 2.2.4 Python Version is: 2.5.1 mod_python: 3.3.1 After the installation this was the last message:- Important Note for Windows users, PLEASE READ!!! 1. This script does not attempt to modify Apache configuration, you must do it manually: Edit C:/Program Files/Apache Software Foundation/Apache2.2\conf\httpd.conf, find where other LoadModule lines are and add this: LoadModule python_module modules/mod_python.so 2. Now test your installation using the instructions at this link: http://www.modpython.org/live/current/doc-html/inst-testing.html I have added the LoadModule python_module modules/mod_python.so to my apache configuration file. i configure PHP and is working perfect. Quote Link to comment https://forums.phpfreaks.com/topic/71926-apache-to-run-py-file-like-php-file-mod_python/ Share on other sites More sharing options...
trq Posted October 6, 2007 Share Posted October 6, 2007 mod_python works a little differently to mod_php. You need to define a PythonHandler. See here. Quote Link to comment https://forums.phpfreaks.com/topic/71926-apache-to-run-py-file-like-php-file-mod_python/#findComment-363091 Share on other sites More sharing options...
joefazee Posted October 6, 2007 Author Share Posted October 6, 2007 The problem is Apache was unable to restart, it return an error message that, Can not the specific module, and the Mod_python is inside the modules folder inside my server root, all other modules are loaded Quote Link to comment https://forums.phpfreaks.com/topic/71926-apache-to-run-py-file-like-php-file-mod_python/#findComment-363414 Share on other sites More sharing options...
tomfmason Posted October 7, 2007 Share Posted October 7, 2007 The installer adds mod_python to your config files automatically.. I may be mistaken but I think it does it for nix distros as well. Quote Link to comment https://forums.phpfreaks.com/topic/71926-apache-to-run-py-file-like-php-file-mod_python/#findComment-363778 Share on other sites More sharing options...
darsh999 Posted October 12, 2007 Share Posted October 12, 2007 Acc. to me this problem occurs when Apache was unable to restart, it return an error message"just restart these aproxies" Quote Link to comment https://forums.phpfreaks.com/topic/71926-apache-to-run-py-file-like-php-file-mod_python/#findComment-368031 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.