westonm
Feb 20 2006, 07:18 PM
I have had a web site operational with ev1 for somewhere around 4 to 5 years. It was operational until last fall that is. Ever since the move to the plesk servers I have not been able to get any cgi scripts to run. I have tried support on several occasions and it typically will go through at least a couple of support people until someone will be able to get a script to work. I cannot get the old "hello world" to run. I appreciate the help I have gotten from ev1 support, but I still cannot get anything to work. I sent emails to ev1 support for the last two weeks and have not gotten any response. I understand the ev1 cannot debug my programs, however I go back to the fact that they did run for several years before the move and they have not run since. I want this web site back up and running. As it is now I am just paying for the service and not getting anything to run. Can someone direct me to someone that can and will help my resolve this problem.
Squire
Feb 21 2006, 04:39 AM
What sort of error messages are you getting when you attempt to run the scripts westonm? And are the scripts being stored in the normal cgi-bin or are you attempting to put them in the httpdocs path? There are too many possible causes to guess at it much.
I'll take one wild stab... In the domain's Setup, do you have mod_perl support enabled? If so, you may want to try disabling it. Having this enabled can cause older scripts or scripts that were not developed with mod_perl in mind to fail.
westonm
Feb 21 2006, 05:24 PM
Squire -
Thanks for the reply - I am getting the old Internal Server Error on any cgi script. I am running them from the cgi-bin directory. I have some stored in the httpdocs dir but am just holding them there until I can get something to run, then will start moving them back to cgi-bin. I will take a look at the setup to see about the mod_perl support - didn't know anything about that. I have been very careful to be sure I have moved files in ASCII. It seems to me that the "hello world" should run, it doesn't depend on any other programs etc. so don't know why it wouldn't work.
westonm
Feb 21 2006, 10:06 PM
Squire -
I checked the mod_perl in the setup and it was checked. It did not seem to make any difference if it is checked or unchecked. But I am getting some of the cgi scripts to run now, at least not giving me the Internal Server Error on all of them. Now I can see that some of my program paths need to be corrected. I have all of my cgi scripts in the cgi-bin directory off of the root. However the html files are under httpdocs. Should they be moved? They all seem to be running ok at this time. I am working on changing the paths in the cgi scripts to use the path with httpdocs and maybe this is the whole problem. I don't understand why none of the cgi scripts were working before but some of them are now. I guess I shouldn't question it, you would think after about 30 years of programming I would know better.
Thanks for you help, and if you could help me out a little more by explaining how I should have directories set up maybe I can get this all working again.
Squire
Feb 21 2006, 10:25 PM
Some starting to work now are almost definitely the mod_perl issue.
On the path part of it, as long as you're fairly certain you've got security in good order, you can enable perl/cgi scripts to run from inside httpdocs and below. It's a httpd.conf tweak to do this if you want to do it server-wide, one that I believe is documented in the Plesk FAQs over on the SWSoft site.
westonm
Feb 22 2006, 10:09 PM
Squire -
I hope you ae still receptive to giving me a little help - it has been a frustrating evening. I went throught all of my scripts to make sure the paths were correct. Now when I execute any of the scripts it get the Internal Server Error. Yesterday I was at least getting some of them to display a screen, it didn't have the data, but it was doing the screen. Anyway I would like to go back to step 1. I created the old hello world as follows:
#!/usr/bin/perl
print "Hello, World!n";
I put that in the cgi-bin directory, the group is psacln and the rights are rwxrxrx. The cgi-bin directory has a group of psaserv with rights rwxrxrx. I was looking at SWsoft knowledge base and they are saying the cgi-bin directory should be owned by DOMAIN_FTP_USER, group psaserv and rights of rwxr-x---. I had also changed the directoyr rights as shown here, I have tried both ways. One thing I am not sure about, I don't think the DOMAIN_FTP_USER is the owner. I think that the domain administrator is shown as the owner on the directory and the files. I am wondering if the owner is incorrect on everything, just not too sure if that is what they are saying or not. By the way on the hello script I get the Internal Server error. Any ideas?
Tex
Feb 23 2006, 11:31 AM
after reading your post i checked and saw that I was having the same problem even though I don't use cgi but I had noticed gtchat had stopped working during one of the upgrades but since it wasn't used that much i just left it alone
This is assuming all of your httpd.config's and includes as well as the domain httpd.include are all correct, which they should be by default.
1. make sure you you checked cgi and mod_perl in the domain setup, i read somewhere they said uncheck and other places said to check, i used checked option.
2. make sure the cgi scripts are owned the the domain user and group psacln
3. permission are set properly i did a 755
4. path to perl is correct mine is /usr/bin/perl
5. cd to your domains cgi-bin directory and do
# perl -pi -e 's/015$//' *.pl
your can use cgi in place of the pl and when you add any other scripts i'm pretty sure you'll have't to run the command again, there is probably a way to change/fix this but its beyond my ability
my test script
#!/usr/bin/perl
print "Content-type: text/htmlrnrn";
print "Hello, World.";
I might add that gtchat works again.
westonm
Feb 24 2006, 07:10 AM
Tex -
Thanks for your suggestions - It will be later this weekend before I will get a chance to try these, I am still a little unclear as to who should own the files and directories. It looks to me like they are presently owned by the domain administrator, and according to SWSoft's site it should be the FTP user, which is different from the domain administrator. I need to follow up on this a little more to understand. The other thing I am a little curious about, do I have the rights to shell out to execute a command line? With the utilities I have now it doesn't seem like I do. Do I need to bring in a utility that will allow me to connect to unix, and will ev1 allow this, or do I create the command in a file and run it from there? I still have a lot to learn about this web programming, but I am slowely picking up a little each day.
Squire
Feb 25 2006, 07:05 AM
QUOTE (westonm)
Tex -
I am still a little unclear as to who should own the files and directories.
The cgi-bin directory ownership should be the same as the owner for the httpdocs directory for the same domain. Same sort of thing for the file ownership, they should be the same as the owner for the files in your httpdocs directory.
HTH
serverkiller
Feb 26 2006, 11:37 PM
#!/usr/bin/perl -tw
at the top of your cgi's (either -t or -w or both). betcha it'll work.
I just went through this today with a new plesk box.
westonm
Mar 1 2006, 10:00 PM
Thanks to everyone that has responded, I have tried your suggestions and haven't had any better success. I went back to ev1 support and ask them to look into it again. They have had it a couple of days now and haven't heard anything new. If and when they come up with a solution I will post it here, if they tell me what it is -- and if it is not something really stupid that I was doing. Just kidding there, if I did something really stupid I don't mind admitting it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.