Can I run scripts located within the public_html directory?

sheying

New Member
Messages
5
Reaction score
0
Points
0
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:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
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.
 

sheying

New Member
Messages
5
Reaction score
0
Points
0
descalzo, thanks for your response. However please forgive my ignorance I think I need more details :D

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?

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:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
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.
 

sheying

New Member
Messages
5
Reaction score
0
Points
0
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!
 
Top