View Full Version : The simpliest perl script not working
strollin
05-09-2007, 01:26 PM
The infamous "Hello World" script won't even work!
The simple script...
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";
The file is in cgi-bin and chmod is 755
Shed some light on this please.
kaloyan
05-10-2007, 01:56 AM
The following script should work, provided that you make it executable. This could be done by changing the permissions for your script to 755 and that the file is your cgi-bin/ directory.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "
Hello World
\n";
strollin
05-10-2007, 07:15 AM
Yes you're right and that is exactly what I've been trying to get to work.
Acts like Perl doesn't exist and I don't even get an error reference in the error log file.
andrew
05-11-2007, 04:44 AM
Perl is installed and working on all our servers.
In order to execute a cgi script it have to be placed in the cgi-bin directory of your account.
Please try the following:
1. Use your cPanel -> FileManager to navigate to public_html/cgi-bin directory.
2. Create a new file and place the content of the hello world script that kaloyan provided and save the file as let's say "test.pl"
3. Set the permissions to 755 using the FileManager.
4. Access your script using your browser. In example http://yoursite.com/cgi-bin/test.pl
strollin
05-11-2007, 06:24 AM
Has been resolved ....Thanks for input
update:
I thought it had been resolved but......
No need for reply...thanks
Update 2:
My Bad.
ftp client problem....