ASP Support

Discussion in 'Feedback and Suggestions' started by __z|x__, Jul 18, 2006.

  1. __z|x__

    __z|x__ New Member

    Messages:
    394
    Likes Received:
    0
    Trophy Points:
    0
    It seems that he has only got 3 PM's till now. So, if you have not yet PM'ed him, please do.

    Thanks.
     
  2. Richard

    Richard Active Member

    Messages:
    2,028
    Likes Received:
    0
    Trophy Points:
    36
    Python 101

    Just a couple of things. When using python cgi you need to import the cgi module also because you are working with web documents you need to tell what type of document header it needs to use.

    So... The code will look as follows:
    Code:
    #!/usr/bin/env python
    
    import cgi
    
    print "Content-type: text/html"
    print
    print "Hello World"
    Line 1: The shebang (#!/usr/bin/env python) - this line uses the env command some times python is not installed in /usr/bin. This command looks in several location for a python installation.

    Line 3: Import the cgi module so that it can be use via the web.

    Line 5 + 6: Here we tell the browser that the page is text and formated as html the secont print command seperates the header from the reast of the script. With out it the script fails.

    Line 7: We print Hello World

    Using python out side cgi-bin

    If you want to use python files outside cgi-bin or use the .py file extention you need to goto Apache Handlers in cPanel can add .py (or any other extention) and cgi-script in the two boxes provided. This will allow you to execute cgi files anywhere on your site (BTW: .cgi is set by default).

    For those in still think you can use ASP.net in linux http://www.mono-project.com/ASP.NET

    PS (Koshimi): I added two extra files for you to look at. One lists the environment variables the other is a simple form.

    PPS (Koshimi): Do you really want your username changed?
     
    Last edited: Aug 5, 2006
  3. noerrorsfound

    noerrorsfound New Member

    Messages:
    1,736
    Likes Received:
    1
    Trophy Points:
    0
    Re: Python 101

    Yes.
     
  4. __z|x__

    __z|x__ New Member

    Messages:
    394
    Likes Received:
    0
    Trophy Points:
    0
  5. Richard

    Richard Active Member

    Messages:
    2,028
    Likes Received:
    0
    Trophy Points:
    36
    We are waiting for a couple more people to express interest.
     
  6. Gerontology

    Gerontology New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Count me in! I've been trying to install dotnetnuke (http://www.dotnetnuke.com/) for a couple days now, and finally figured out it wasn't working because of lack of ASP.NET on the servers...
     
  7. jaygreentree

    jaygreentree New Member

    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    0
    Like I have said in my other post about asp, its not true asp when installed on linux its a very heavily modified version and most ASP/ASP.NET scripts will not work on these servers if ASP is installed. Trust me I have tried on my Linux system its not the same.
     

Share This Page