Does someone know a good, easy and safe way to install Python script support with Cpanel?
It seems python is not a function out of the box.
![]()
Does someone know a good, easy and safe way to install Python script support with Cpanel?
It seems python is not a function out of the box.
![]()
Hi,
Is python installed on the machine ? It must be as cPanel install Python support when it installs itself.. but in case it's corrupt, you can manually install it using "yum install python*" command. This will install Python & all it's required dependencies.. Hope that helps..
Regards,
Viraj
http://www.host.co.in
DEDICATED HOSTING|WINDOWS VPS|LINUX VPS |WINDOWS HOSTING
CPANEL HOSTING|RESELLER HOSTING|SEMI-DEDICATED HOSTING
Phone:0253-2342932|Mobile:+91-9860900069
Support/Billing/Sales:24x7x365 sales@host.co.in | support@host.co.in
You mean Cpanel supports Python out of the box?
This is a new server which came with Cpanel im not sure if Python should be working. When i run "whereis python" it goes show python to be there but when y try to run a python script on an account it doesnt work. It just loads the python script instead of executing it. So I supposed maybe it doesnt work out of the box.
Ok sorry for that.
So Cpanel doesnt support it out of the box or you mean or it doesn support it at all and will cause conflicts?
Becasue i see hosts offering mod python support and they also use Cpanel.
Thanks
We don't support it out of the box and it borders on possibly being outside our realm of support. However, it will work in a cPanel/WHM environment if done properly. In fact, one of our presenters is using mod_python as an example of how to add custom modules via EasyApache 3 at this month's conference.
Did you ever get this going? I had it all working but somehow can't seem to build apache with mod_python atm. Its not an option :S
I tried but could not do it. I also did not found any documentation at all about this. I thought people where not using python but some are. There is not much request for it but its always nice to have the option. Im without it for now because nobody seems to be able to do this without breaking the server. So its a risk i cannot take right now.
You should be able to install mod_python as you would for a normal Apache installation so long as you do it from source and carefully read through and understand how Easyapache will affect it:
http://www.cpanel.net/support/docs/ea/ea3/index.html
One thing to be careful of - it's probably not a good idea to change the python version that is installed with cPanel as it could possible cause problems elsewhere. If you need to do that, it might be sensible to install it in a different path (e.g. /opt).
A much simpler alternative might be to use FastCGI which is supported as a module in Easyapache and run python scripts through that.
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Well the strange thing is, that I had it up and running in the past, via easyapache (I am 95% sure).
But then it was a mod i could just 'select' and it would go all fine.
So what has changed?
I just had a look at my httpd.conf from now and one from before, and the diference is the loadmodule lines.
The current one is missing:
LoadModule python_module modules/mod_python.so
Cannot load /usr/local/apache/modules/mod_python.so into server: /usr/local/apache/modules/mod_python.so: cannot open shared object file: No such file or directory
So somehow, this module has now gone? Without me knowing about it.
If you compiled mod_python manually then you have to store the module outside of /usr/local/apache as easyapache creates the /modules directory anew and only adds back the modules it compiles for the build.
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Further investigation shows me that the mod_python.so is in the apache.backup , /usr/local/apache.backup_archive/20080609.1213007536/modules/ . This gives me the idea that in the past I was able to compile apache with python via easy apache (I was 95% sure, seems to be corrent)
You could always create a custom opt mod for EA3 for Python as was discussed at the cPanel Conference: http://www.cpanel.net/conference/08/files/EA3Build.pdf