Skip to main content

Python2.7 on cPanel Error message

Comments

5 comments

  • cPanelMichael
    No such file or directory: /home/username/public_html/2numbers.py

    Hello, Could you let us know the entries you've added to the .htaccess file in the public_html directory, and verify that you copied the .py file to that location? Thank you.
    0
  • Vasanthjan
    .htaccess file entries Options +ExecCGI AddHandler cgi-script .py File permission for 2numbers.py -> 0755 Website Link: domain.tld/2numbers.py I can't get this point Michael: verify that you copied the .py file to that location?
    0
  • cPanelMichael
    I can't get this point Michael: verify that you copied the .py file to that location?

    For instance, did you copy the "2numbers.py" file from your cgi-bin to your public_html directory? Thank you.
    0
  • Vasanthjan
    Both are different code Michael #!/usr/bin/python2.7 import time import datetime print("Current date and time: ", datetime.datetime.now()) print("Current year: ", datetime.date.today().strftime("%Y")) print("Month of year: ", datetime.date.today().strftime("%B")) print("Week number of the year: ", datetime.date.today().strftime("%W")) print("Weekday of the week: ", datetime.date.today().strftime("%w")) print("Day of year: ", datetime.date.today().strftime("%j")) print("Day of the month : ", datetime.date.today().strftime("%d")) print("Day of week: ", datetime.date.today().strftime("%A")) the above code is used on 2numbers.py code which is used on cgi-bin just a print statement.
    0
  • cPanelMichael
    Hello, Feel free to open a support ticket using the link in my signature so we can take a closer look. Thank you.
    0

Please sign in to leave a comment.