Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 3rd, 2005, 8:04 PM   #1
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
perl/cgi noob!

from a tutorial:
Quote:
catlow:/u1/j/jbc> mkdir /w1/l/lies/begperl
catlow:/u1/j/jbc> chmod 755 /w1/l/lies/begperl
catlow:/u1/j/jbc> cp hello.pl /w1/l/lies/begperl
catlow:/u1/j/jbc> cd /w1/l/lies/begperl
catlow:/w1/l/lies/begperl> mv hello.pl hello.cgi
Did you follow that? First I used the Unix "mkdir" command to create a new directory called "begperl" in my Web space, which in my particular case is located at "/w1/l/lies". (Trivia: The Unix mkdir command is the only one I can think of that is actually longer than the equivalent DOS command, "md".) I chmodded the directory to permissions 755, then used the "cp" command to copy hello.pl from my home directory to the new directory in my Web space. Then I used the "cd" command to change to that directory, and used the "mv" command to change the file's name from "hello.pl" to "hello.cgi", so the Web server will know that it's a CGI script.
all i want to do is chmod hello.cgi. how do i perform unix commands in windows? thanks!
theguy0000 is offline   Reply With Quote
Old Sep 3rd, 2005, 9:38 PM   #2
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Unix commands don't exist in Windows, lol.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Sep 3rd, 2005, 10:28 PM   #3
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
well yeah i kind of figured that lol

but anyway, i have http://fatcats.xemoc.net/walnuts.cgi and i cant view it. how would i do this? i upload via FTP using IE
theguy0000 is offline   Reply With Quote
Old Sep 3rd, 2005, 11:00 PM   #4
aznluvsmc
Hobbyist Programmer
 
Join Date: Aug 2005
Posts: 137
Rep Power: 3 aznluvsmc is on a distinguished road
Check your server error logs. It will state exactly what the problem is. Most of the time this Internal Server Error is generated by an error in your script but in this case it can't seem to find the ErrorDocument file to show so it could also be a misconfiguration on the server.
aznluvsmc is offline   Reply With Quote
Old Sep 4th, 2005, 3:29 AM   #5
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
Quote:
Originally Posted by iignotus
Unix commands don't exist in Windows, lol.
You can download Bash for Windows, which gives you a lot of unix capability in Windows. Not as good as the real thing, though.
Arevos is offline   Reply With Quote
Old Sep 4th, 2005, 3:33 AM   #6
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 3 Polyphemus_ is on a distinguished road
Quote:
Originally Posted by Arevos
You can download Bash for Windows, which gives you a lot of unix capability in Windows. Not as good as the real thing, though.
or cygwin, i believe..
Polyphemus_ is offline   Reply With Quote
Old Sep 4th, 2005, 9:03 AM   #7
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
i don't think there's an error in my script...
print "Content-type: text/html\n\n";
print <<"Walnuts";
Some stuff
I want to have printed...
Walnuts
Eof

it works perfectly when i run it from command prompt on my computer.

edit: ahh i forgot #!/usr/local/bin/perl
theguy0000 is offline   Reply With Quote
Old Sep 4th, 2005, 11:03 AM   #8
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Quote:
Originally Posted by Arevos
You can download Bash for Windows, which gives you a lot of unix capability in Windows. Not as good as the real thing, though.
Quote:
Originally Posted by Polyphemus_
or cygwin, i believe..
Unix
Commands
Like
chmod
Don't
Exist on
Windows.

They simply don't have any use or direct equivalents on any Windows filesystem.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC