PDA

View Full Version : Formmail / Perl Problems : Internal Server Error



specimen
06-13-2007, 02:58 PM
The formmail.pl script that was working fine for my client is no longer working. I get the "Internal Server Error" message. I tried updating the script, thinking the paths to PERL or sendmail may have changed. In the process I also tried nms_formmail to no avail. I made sure the files were saved in Unix format, set the permissions to 755 and used FTP to upload/download.

I don't know how long ago the form stopped working.

First off, can anyone verify I have the correct paths to Perl and sendmail?
#!/usr/bin/perl -wT
$mailprog = '/bin/sendmail -i -t';

After looking at a lot of messages in the forum and elsewhere, I see these as other potential places to look for sendmail?
$mailprog = '/usr/lib/sendmail -oi -t';
$mailprog = '/usr/bin/sendmail -oi -t';
$mailprog = '/usr/sbin/sendmail -oi -t';

Here's my config settings:
#!/usr/bin/perl
$mailprog = '/bin/sendmail -i -t';
@referers = ('tedboerner.com','69.36.173.158');
@recipients = &fill_recipients(@referers);
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_U SER_AGENT');

One final note, the call to the form is done from Flash (getURL) which has always worked here and on other host providers:
getURL("http://www.tedboerner.com/cgi-bin/formmail/FormMail.pl", "_blank", "POST");

I've verified the path to FormMail.pl is correct.

Thanks for any help. I'm not really a Perl programmer but can follow it fairly well and be precise.

-Dave

wildjokerdesign
06-13-2007, 03:09 PM
If the NMS version is not working then I doubt it has to do with your paths. :) The error you are getting is not normaly a path issue. Have you contacted WestHost about this via the support ticket system? Are you able to get any perl script to run on the account. Almost sounds like perl was "uninstalled" perhaps. Before contacting WH you can check in your Site Apps to make sure that Perl is installed.

wildjokerdesign
06-13-2007, 03:13 PM
Oh yes... your paths are fine. :) Sorry should have confirmed that for you in the first post. You can always confirm such paths by logging into your account via FTP and going to the path to check that it is valid.

wildjokerdesign
06-13-2007, 03:16 PM
Is this the primary domain on the account or is it perhaps a secondary domain? If it is a secondary domain and is not under the main domains public www root then you would have made changes to your httpd.conf to get this to work in the first place... if that is the case have you checked that those manual changes are still intact?

Just trying to think of things that may have happened, :)

wildjokerdesign
06-13-2007, 03:22 PM
BTW: You should think about removeing the openBack function. There is nothing more annoying then haveing the web page resize the main browser window for me. I like it the size I set it at. ;)

specimen
06-13-2007, 04:19 PM
Haven't contacted WH support yet, wanted to see if it was obvious to anyone first. :) I'll check on Perl somehow getting "uninstalled". We haven't touched this for years, it was working fine. I'm trying to find out when it actually stopped working. Thanks for the tips. -d

If the NMS version is not working then I doubt it has to do with your paths. :) The error you are getting is not normaly a path issue. Have you contacted WestHost about this via the support ticket system? Are you able to get any perl script to run on the account. Almost sounds like perl was "uninstalled" perhaps. Before contacting WH you can check in your Site Apps to make sure that Perl is installed.

specimen
06-13-2007, 04:22 PM
OK, good, thanks. I can't seem to get FTP to show me the bin/usr directory so I couldn't verify that. I did verify that the path to the script was what I thought. I get a permisison error when trying to get further back on the hierarchy from "www/". -d


Oh yes... your paths are fine. :) Sorry should have confirmed that for you in the first post. You can always confirm such paths by logging into your account via FTP and going to the path to check that it is valid.

specimen
06-13-2007, 04:27 PM
Yeah, I know, at least you can resize it after it opens ;) Actually I could talk hours about presenting information to people on computers, including what "rules" to follow and break, the legacy of the Internet's development, especially the book page presentation metaphor, but that's probably left better to other places. Thanks for your comments. -d

BTW: You should think about removeing the openBack function. There is nothing more annoying then haveing the web page resize the main browser window for me. I like it the size I set it at. ;)

specimen
06-13-2007, 04:29 PM
Let's see. It's the primary domain and I don't remember making any changes to httpd.conf (I don't even know what that is or where it is.) Thanks. -d

Is this the primary domain on the account or is it perhaps a secondary domain? If it is a secondary domain and is not under the main domains public www root then you would have made changes to your httpd.conf to get this to work in the first place... if that is the case have you checked that those manual changes are still intact?

Just trying to think of things that may have happened, :)

specimen
06-13-2007, 05:46 PM
Let's see. It's the primary domain and I don't remember making any changes to httpd.conf (I don't even know what that is or where it is.) Thanks. -d
FIXED!!!
There was a ".admin.redirect.sh" file in the cgi-bin which wasn't working. Westhost fixed it. The only question I have is where did that file come from and who and why was it put there?

Thanks Shawn for all your quick replies!
-dave

wildjokerdesign
06-13-2007, 08:59 PM
".admin.redirect.sh" is a WH installed file and used to access the Site Manager. :) Glade that WH got it worked out for you.

It is odd that you can not go further back up the tree then www. You shoudl be able to go all the way to the root of your VPS. The absolute path from your VPS root to your public www root is /var/www/html. You might want to ask WH about that.

rolling
06-14-2007, 02:41 AM
The .admin.redirect.sh file is an executable file which controls access to your site manager. The only reason I can see it causing you troubles was if your account was moved onto a different server and it was not updated. However, I do not understand why this stopped your formmail from working.

As Shawn said, you should be able to access any directory from root (/) down PROVIDED that you are logged in as the primary account holder (probably tedboerner). If you are logged in as a user, then your site administrator will have determined which directories you have access to.