Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

switching servers

Status
Not open for further replies.

Zas

Programmer
Oct 4, 2002
211
US
Ok. I recently switched hosts and the new site is a wee bit different. The problem is I've been used to one set way to do Perl, and I cannot figure out what I'm doing wrong. I was using #!/usr/local/bin/perl, but it said that the path was now #!/usr/bin/perl, so I switched that on all my scripts, but I still get the exact same error. And yes all the permissions are set to 777, and it was uploaded under the correct ASCII. Any ideas?




Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@valui.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.27 Server at Port 80

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Were you using apache before this?

Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
I donot think so. Just Perl...

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Have you got a print "Content-Type: text/html\n\n"; at the start of your scripts. Apache is very unforgiving,

HTH
Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
print "Content-type:text/html\n\n";
Ya, its on there. The scripts were perfect on the other host... Now something is just wrong..


Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Try making a bare-bones script for all this testing. Something like this:
Code:
#!/usr/bin/perl

use CGI::Carp qw/fatalsToBrowser/;
use strict;
use warnings;

print "Content-type: text/html\n\n";
print &quot;<HTML><HEAD></HEAD><BODY>Script Success!</BODY></HTML>&quot;;
Use fatalsToBrowser very early in your scripts while you're testing them (but remove before production) can be very helpful. Also, do you know what kind of system you are migrating from? OS/Webserver?

----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Unfortunately, nohostinglimit.com shut down.

As for barebone.pl, or barebone.cgi, I still get the same error from those pages...

There is something different about the new server... I have no idea what to do.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
There are a couple of options and pages they let me get into:

Change Password
Subdomains
Subdomain Stats
Parked Domains
Ftp Manager
Error pages (Edit the errors recieved)
Addon Domains

File Manager
WebProtect (Password protect directories)
Raw Access Logs (file saved in a .gz)
Raw Log Manager
Download/Upload backup file
Index Manager
Disk Usage Viewer

MySQL databases
Cron jobs
MIME types
Apache handlers
Redirects
HotLink Protection

Web/Ftp Stats
Chatroom
Addon Scripts
Cgi Center
Network Tools
Agora Shopping Cart
Search Engine Submit
Frontpage Extensions
Setup Forums/Bulletin Board
Manage OpenPGP Keys
phpMyChat Room
Ip Deny Manager



If those help any...

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Ah yes!! I have located my error log. Can you please decipher this? I'll try my best, and post back if I still need help.

[2003-06-15 01:31:35]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-15 01:31:35]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-15 01:31:03]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-15 01:29:37]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-15 01:29:34]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-15 01:28:42]: error: file has no execute permission: (/home/valuico/public_html/cgi-bin/barebone.cgi)
[2003-06-15 01:28:40]: error: file has no execute permission: (/home/valuico/public_html/cgi-bin/barebone.cgi)
[2003-06-15 01:28:17]: error: file has no execute permission: (/home/valuico/public_html/cgi-bin/barebone.pl)
[2003-06-14 20:43:17]: error: file is writable by others: (/home/valuico/public_html/cgi-bin/signup.pl)
[2003-06-14 19:24:16]: error: file has no execute permission: (/home/valuico/public_html/scgi-bin/skilll.pl)
[2003-06-14 19:23:57]: error: file has no execute permission: (/home/valuico/public_html/scgi-bin/signup.pl)
[2003-06-14 19:07:04]: error: file has no execute permission: (/home/valuico/public_html/signup.pl)
[2003-06-14 19:06:05]: error: file is writable by others: (/home/valuico/public_html/cgi-bin/signup.cgi)
[2003-06-14 19:05:39]: error: file is writable by others: (/home/valuico/public_html/cgi-bin/signup.pl)
[2003-06-14 03:31:57]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-14 03:26:51]: error: file has no execute permission: (/home/valuico/public_html/scgi-bin/signup.pl)
[2003-06-14 03:26:37]: error: file has no execute permission: (/home/valuico/public_html/scgi-bin/signup.pl)
[2003-06-14 03:25:48]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-14 03:18:43]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-14 03:18:37]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-14 03:13:42]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 23:00:09]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 22:29:46]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 21:57:22]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 21:56:44]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 21:56:26]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 21:55:23]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 21:53:17]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-13 09:41:51]: error: file is writable by others: (/home/valuico/public_html/cgi-bin/login.pl)
[2003-06-12 15:01:14]: error: directory is writable by others: (/home/valuico/public_html/cgi-bin)
[2003-06-12 15:00:38]: error: file has no execute permission: (/home/valuico/public_html/cgi-bin/signup.pl)
[2003-06-12 14:59:14]: error: file has no execute permission: (/home/valuico/public_html/cgi-bin/signup.pl)
[Sun Jun 15 01:31:35 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:31:35 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:31:35 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:31:35 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:31:03 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:31:03 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:29:37 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:29:37 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:29:34 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:29:34 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:28:42 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:28:42 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:28:40 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:28:40 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.cgi
[Sun Jun 15 01:28:17 2003] [error] [client 65.27.146.10] File does not exist: /home/valuico/public_html/500.shtml
[Sun Jun 15 01:28:17 2003] [error] [client 65.27.146.10] Premature end of script headers: /home/valuico/public_html/cgi-bin/barebone.pl


Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
OK, so you've sorted out permissions, but you're still getting Premature End of Script Header errors.

Are you using Windows as a client & Notepad as a text editor?

If you can telnet or SSH on to the server, can you run the script from the command line?

Is barebone.cgi or .pl exactly as was posted by icrf?

Paul
 
Yes it- barebone is EXACTLY as posted. And yes I do make my scripts with Notepad, (Word has those annoying tags at the end signifying &quot;hey, this is stupid word, you cannot write scripts in here&quot;).

Telnet or SSH from the command line?

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Script Success!

777 doesn't work... why... how can I get it to work?
755 works perfectly... thats something completely new.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Have you a -T switch on your shebang line?
Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Look up textpad or Ultredit for editing your scripts.

Telnet & SSH are ways of logging onto the webserver to conduct an interactive command session - a lot of hosting companies don't allow this, but if yours does look into it

Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
777 makes your scripts writable to the world, which is a very bad idea and the new hosting service catches that as part of their security. Read and execute is all they need, hence, 755, and a lot of the permission errors in the log. Be sure to change your cgi-bin directory itself, too.

----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
permissions are ok. and the scripts are starting to open. but now none of my .txt files are opening. 755, 777, no permissions are fixing them. when I try to open them with open(DAT, &quot;$cid.txt&quot;); it doesn't open, and when I open them with open(DAT, &quot;>>$rdir/$lccname/$lcpass.txt&quot;);, it doesn't write.
when oh why?!

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
wrong directory.. now its working.. thanks for the help every1. ~Z

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top