Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Python Script not running on cPanel

Discussion in 'General Discussion' started by Vasanthjan, Aug 14, 2017.

Tags:
  1. Vasanthjan

    Vasanthjan Member

    Joined:
    Mar 8, 2017
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    On new cPanel version I'm not able to run the python script getting Internal Server Error

    Files on cPanel to preview.

    Screenshot_1.png

    Getting below error message on http://domain.com/cgi-bin/sample.py

    Errors on cPanel:

    AH01xx5: attempt to invoke directory as script: /home/scriptsbrownarc/public_html/cgi-bin/, referer: Domain Name Registration and Web Hosting | Domain.com

    Apache Handler also available:

    Screenshot_2.png

    Kindly help me out to resolve this error to run python and perl scripts on cPanel.

    SSH Output:

    Code:
    [scriptsbrownarc@panda ~]$ whereis python
    python: /usr/bin/python2.7 /usr/bin/python /usr/lib/python2.7 /usr/lib64/python2.7 /usr/include/python2.7
    [scriptsbrownarc@panda ~]$
    
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,127
    Likes Received:
    1,366
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The image you provided shows the Python script stored outside of the cgi-bin directory. Can you check to see if it opens correctly when moved within the cgi-bin directory?

    Thank you.
     
Loading...

Share This Page