Forum Moderators: coopster & phranque

Message Too Old, No Replies

A very basic question

I'm a newbie

         

kwirl

4:12 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



I have a basic question, but due to my lack of experience in this particular medium, it seems to be outside my scope. I'm sure the solution is obvious, but I'd like a pointer instead of spending hours researching when I have lots of work to do.

I'm setting up AWStats on my web server, which is hosted professionally. I have root access, but I'm using filezilla ftp to connect from my windows XP computer. How do I execute a .pl file on the server from my windows PC? I can't seem to figure it out.

Thanks if anyone can help

kwirl

4:46 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



well im using putty to telnet into the server and run from there, it works and i suck.

rocknbil

8:00 pm on Mar 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hehe. Naw everyone starts somewhere.

So you're able to log in OK? Do you have sudo su access?

Sudo su is a "pseudo" superuser. This is usually required to do any installs to the system.

Once you telnet/SSH in, you can **try** to execute sudo, type sudo su and press enter. If you're in the sudo'ers file, it will prompt you for a pass.

Whether that works or not, you need to get in the directory of the file you want to execute. You need to type the full path to it. And easy way is

locate myfile.pl

And it should print out all the paths to the files of that name on the system:

/var/www/html/cgi-bin/myfile.pl <-- EXAMPLE ONLY

Now SELECT the full path. This auto-copies into the putty buffer. Do not press ctrl-c! That is a windows command, ctrl-c will abort the current process.

To paste on the command line in the putty window, right-click with your mouse. In the following example, you'd type cd (space) then right-click to get the full command.

Now you can do one of two things
cd /var/www/html/cgi-bin/ (change to this directory)
perl myfile.pl (execute the proggie)

OR execute it from your current location

perl /var/www/html/cgi-bin/myfile.pl

Of course press enter after each.

You're likely to run into other issues, but that should keep you busy for a minute. :-)