+ Reply to Thread
Results 1 to 5 of 5

Thread: Can I run scripts located within the public_html directory?

  1. #1
    sheying is offline x10Hosting Member sheying is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    5

    Can I run scripts located within the public_html directory?

    I'm new to this whole Cpanel thing. Used to host my stuff on a linux platform, where I used some Perl scripts to create htmls for my pictures. The scripts is not embedded in any webpage, they are stand alone. It also needs to get user input.

    Will I be able to do that on X10? I've been looking around (including searching the FAQ) but can't find the answer.

    TIA.

    And off my own topic: whenever I logged in to CPanel, my Site Advisor warns that "We've found the site links to xxx.xx.xx.xxx which breached our test PC". Is it something I should be concerned with?
    Last edited by sheying; 09-25-2009 at 10:28 AM.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Can I run scripts located within the public_html directory?

    Add to .htaccess :

    AddHandler cgi-script .cgi .py .pl .pm

    or whatever extensions you want treated as scripts. Include shebang line at top of script.

    Second question: No idea, but it doesn't sound good. Sounds like one of the links on one of your pages leads to a possibly questionable site.
    Nothing is always absolutely so.

  3. #3
    sheying is offline x10Hosting Member sheying is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    5

    Re: Can I run scripts located within the public_html directory?

    descalzo, thanks for your response. However please forgive my ignorance I think I need more details :D

    Quote Originally Posted by descalzo View Post
    Add to .htaccess :

    AddHandler cgi-script .cgi .py .pl .pm

    or whatever extensions you want treated as scripts. Include shebang line at top of script.
    Where do I type in the lines you mentioned? Is there a shell or anything similar to run the scripts from? Or is ".htaccess" a file? I do not see it under File Manager. Is it something I need to create myself?

    Quote Originally Posted by descalzo View Post
    Second question: No idea, but it doesn't sound good. Sounds like one of the links on one of your pages leads to a possibly questionable site.
    This is strange because so far I've only opened the account and looked around to get myself oriented. I haven't created/uploaded anything yet.
    Last edited by sheying; 09-25-2009 at 11:32 AM.

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Can I run scripts located within the public_html directory?

    Quote Originally Posted by sheying View Post
    Where do I type in the lines you mentioned? Is there a shell or anything similar to run the scripts from? Or is ".htaccess" a file? I do not see it under File Manager. Is it something I need to create myself?


    This is strange because so far I've only opened the account and looked around to get myself oriented. I haven't created/uploaded anything yet.
    1. Log into cPanel
    2. If you are already logged in, close FileManager
    3. Bottom of cPanel click on 'reset all interface settings'
    4. Open FileManager
    5. You will get a popup File Manager Directory Selection
    6. Check off "Show Hidden Files" (you can check the second option too)
    7. In your public_html directory there should/might be a file .htaccess. If not, create one
    8. Edit it and add the line(s). As your site grows and you learn more about what the file can do, you might edit it again in the future.
    Nothing is always absolutely so.

  5. #5
    sheying is offline x10Hosting Member sheying is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    5

    Re: Can I run scripts located within the public_html directory?

    Quote Originally Posted by descalzo View Post
    1. Log into cPanel
    2. If you are already logged in, close FileManager
    3. Bottom of cPanel click on 'reset all interface settings'
    4. Open FileManager
    5. You will get a popup File Manager Directory Selection
    6. Check off "Show Hidden Files" (you can check the second option too)
    7. In your public_html directory there should/might be a file .htaccess. If not, create one
    8. Edit it and add the line(s). As your site grows and you learn more about what the file can do, you might edit it again in the future.
    I'm able to see the file now. Thanks!

+ Reply to Thread

Similar Threads

  1. Disk Full
    By digitaljit in forum Free Hosting
    Replies: 2
    Last Post: 11-10-2008, 06:07 AM
  2. Introduction to Linux CLI
    By HomerJ in forum Tutorials
    Replies: 3
    Last Post: 02-26-2008, 08:53 AM
  3. Access problems with CGI Perl scripts
    By alcramer in forum Free Hosting
    Replies: 2
    Last Post: 08-26-2007, 12:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers