Cgi/perl

perlplan

New Member
Messages
2
Reaction score
0
Points
0
Hi,

I installed a simple hello world Perl script, set the permissions and cannot get the script to work. It works on PC windows/apache setup at home, but it is a windows enviroment. I have checked the error logs and could not find that I had accessed the script even though in the raw logs I get
66.249.71.237 - - [15/Dec/2009:22:11:25 -0500] "GET /cgi/helloworld.cgi HTTP/1.1" 404 3395 "-" "Mediapartners-Google"...I've searched the forums and have found nothing of value there.

Anyone have any ideas? Help would be greatly appreciated!!!:dunno:
 

jacob3

New Member
Messages
3
Reaction score
0
Points
0
Hi perlplan :)
It works for me with perms set to 755.
Perhaps you got the path wrong /cgi/helloworld.cgi

On my X10server (chopin), it's /cgi-bin/helloworld.cgi

Try that ?? :bigok:
 

extrerem-cgi

New Member
Messages
6
Reaction score
0
Points
0
on the server use this code :D

#!/usr/bin/perl
use strict;
use warnings;
print "Content-type: text/html\n\n";
print "Hello, World...\n";



on the appache server :D you must install a perl exe with the appache :D

the set up must be :D to usr file :D

or just chage the
#!/usr/bin/perl
to the file that the perl is like this

#!/perl/bin/perl


hope it work .....and if you need more help i will be glad to do that when i am online :D yours
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
http://perlplan.x10hosting.com/cgi-bin/helloworld.cgi accesses the CGI script but results in a 500 error. What do the error logs say?

When a script works under Windows but not a Unix flavor, it's almost always a matter of permissions or line endings. The Unix family and MS OS family use different line ending representations: LF for Unix, CR LF for MS. If you develop on a MS platform, you have to make sure the uploaded file follows Unix line ending discipline. One way of doing this is FTPing the file in ASCII, rather than binary, mode.
 

c0ldf1r3

New Member
Messages
1
Reaction score
0
Points
0
...
#!/usr/bin/perl
use strict;
use warnings;
print "Content-type: text/html\n\n";
print "Hello, World...\n";
...
... When a script works under Windows but not a Unix flavor, it's almost always a matter of permissions or line endings. The Unix family and MS OS family use different line ending representations: LF for Unix, CR LF for MS. If you develop on a MS platform, you have to make sure the uploaded file follows Unix line ending discipline. One way of doing this is FTPing the file in ASCII, rather than binary, mode.
make sure that the file premision is ... 755
Still good advice! Beginners join all the time, with the same problems (like me). Thanks to the old-timers! :)
 
Top