Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Member
    Join Date
    Mar 2008
    Posts
    195

    Default Python

    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.


  2. #2
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Cool

    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..

  3. #3
    Member
    Join Date
    Mar 2008
    Posts
    195

    Default

    Quote Originally Posted by viraj View Post
    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..
    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.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by nibb View Post
    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.
    There's a difference between running Python from the command line and running a Python script designed for a website via Apache.

    Typically Python scripts for websites require mod_python, which is not supported at this time.

  5. #5
    Member
    Join Date
    Mar 2008
    Posts
    195

    Default

    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

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by nibb View Post
    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.

  7. #7
    Member
    Join Date
    Mar 2008
    Posts
    195

    Default

    Quote Originally Posted by cPanelDavidG View Post
    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.
    Thanks, do you know someone I can pay for this?

  8. #8
    Member
    Join Date
    May 2004
    Location
    Eindhoven
    Posts
    57

    Default

    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

  9. #9
    Member
    Join Date
    Mar 2008
    Posts
    195

    Default

    Quote Originally Posted by Parcye View Post
    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.

  10. #10
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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

  11. #11
    Member
    Join Date
    May 2004
    Location
    Eindhoven
    Posts
    57

    Default

    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?

  12. #12
    Member
    Join Date
    May 2004
    Location
    Eindhoven
    Posts
    57

    Default

    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.

  13. #13
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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

  14. #14
    Member
    Join Date
    May 2004
    Location
    Eindhoven
    Posts
    57

    Default

    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)

  15. #15
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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

Similar Threads & Tags
Similar threads

  1. Python Python 2.7.1 Installation
    By sgate1 in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 08-11-2011, 07:18 PM
  2. python 2.3.x?
    By candrews in forum cPanel Developers
    Replies: 0
    Last Post: 10-09-2003, 11:10 AM
  3. Python 2.2
    By Curious Too in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-14-2003, 05:25 PM
  4. Python 2.2.1
    By Aerosmith in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-13-2003, 08:33 AM
  5. python
    By First Faze in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-12-2002, 06:59 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube