Web Hosting Talk







View Full Version : New server with plesk can't execuete perl


certify
08-02-2001, 04:37 PM
I have just got this server, I can't seems to be able to execute my all perl scripts, all the permissions are intact.

Where should I go to fix it?

Palm
08-02-2001, 04:59 PM
What error are you getting?

Give more info.

certify
08-02-2001, 05:04 PM
Check this link

http://209.217.52.118/cgi-bin/exam/sun/convert.cgi

What I've checked..
I have also enable CGI support for this domain.
All permissions are correct.
All path in config files are correct.

certify
08-02-2001, 05:17 PM
Here is my httpd.conf file looks like.

http://209.217.52.118/httpd.txt

Mirco
08-02-2001, 05:19 PM
Uncomment:

#AddHandler cgi-script .cgi

Palm
08-02-2001, 05:22 PM
Remove #

certify
08-02-2001, 05:48 PM
Ok done that and reboot the server and still the same result.

What should I do next?

davidb
08-02-2001, 06:24 PM
Is it possible the script is bad? Or some problem with perl? Run perl -c scriptname

certify
08-02-2001, 06:27 PM
I checked the server log. What does that mean?


Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi

certify
08-02-2001, 06:33 PM
Originally posted by davidb
Is it possible the script is bad? Or some problem with perl? Run perl -c scriptname

[root@cheng forum]# perl -c cp.cgi
cp.cgi syntax OK

davidb
08-02-2001, 06:36 PM
Dope, we all missed the easy answar, check error log, post what that says, it will almost always point to the problem.

certify
08-02-2001, 06:42 PM
Originally posted by davidb
Dope, we all missed the easy answar, check error log, post what that says, it will almost always point to the problem.

Here is the server logs


:07 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:15:09 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:16:10 2001] [error] [client 210.186.221.100] File does not exist: /usr/local/plesk/apache/vhosts/certifyexpress.com/httpdocs/games/crossword/images/crossword.gif
[Thu Aug 2 17:16:27 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:16:29 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:20:29 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:20:35 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:20:37 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:20:38 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:21:56 2001] [error] [client 24.29.234.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/exam/sun/convert.cgi
[Thu Aug 2 17:22:07 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:22:09 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:22:10 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi
[Thu Aug 2 17:22:12 2001] [error] [client 210.186.221.100] Premature end of script headers: /usr/local/plesk/apache/vhosts/certifyexpress.com/cgi-bin/forum/cp.cgi

davidb
08-02-2001, 08:53 PM
From the looks of it, its not a server problem, its a script problem. Was the script uploaded in the right mode?

certify
08-02-2001, 09:34 PM
Yes.

I actually tar the script from my old server and the untar to this new server.

certify
08-04-2001, 06:58 AM
Found the problem and now all my scripts are working. I notice plesk are very sensitive with perl scripts. For those who are facing this problem this i what I've done.

chmod -R 755 cgi-bin
chown -R yourftpusername:pleskcln cgi-bin

I don't know why all my script and files have to be set to 755 in cgi-bin. Anybody care to explain why? With my old RaQ3 some script can be 644 but this can all have to be set t 755.

bombino
08-04-2001, 05:18 PM
On most Unix-based servers, you *do* need to give scripts execute permission in order to execute them - no matter where they are.

certify
08-04-2001, 05:55 PM
Yes I'm fully aware of that.

But in this case script that need 777 permission also must be set to 755. Otherwise it just won't work on the new server.