Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Another Mojo & Premature end of script headers
admirable
Posted: Jun 5 2004, 07:47 PM
Quote Post





Group: Members
Posts: 3
Member No.: 400
Joined: 5-June 04



We just got our site on Advantagecom Networking hosting. We have a mojo cgi-bin script for the mailing and we are getting the Premature end of script headers: mojo.cgi error.

I did transfer the files using ASCII and the permissions are set to 755.

The files path is set to /home/webadmin/bvchurch.org/mojo_files.

Can you help me find out why I am getting this error.

Thanks.
PMEmail Poster
Top
Matt
Posted: Jun 9 2004, 08:55 AM
Quote Post





Group: Members
Posts: 1,103
Member No.: 342
Joined: 25-November 03



QUOTE
The files path is set to /home/webadmin/bvchurch.org/mojo_files.


Perl scripts need to be located in the site's cgi-bin directory. They will not run properly from any other issue.


To troubleshoot perl scripts follow these steps:

1) Upload your perl scripts to the site's cgi-bin directory (or subdirectory of cgi-bin). In this case, your files should be located in /home/webadmin/bvchurch.org/cgi-bin or a subdirectory of that directory.
2) Set the permissions of your perl scripts to 755.
3) If your script still does not execute properly SSH to a shell prompt and change directories to the directory your perl script is in. Execute the command:

CODE
perl -c <filename>


where <filename> is the name of your script file. If there is an error with the script itself you will get output describing the problem.

4) You can also test your perl script by running it with the command:

CODE
./filename.pl


where filename.pl is the name of your perl script file.

5) You can also check your Apache error logs for errors.


--------------------
Matt B.
Advantagecom Technical Support

Private messages are ignored unless solicited. If you have a support question, please email support@advantagecom.net, post in the appropriate section of the forum, or call if your service plan allows support by phone.
PMUsers Website
Top
admirable
Posted: Jun 10 2004, 12:39 PM
Quote Post





Group: Members
Posts: 3
Member No.: 400
Joined: 5-June 04



Ok, the files were uploaded the cgi-bin and the files were set to 755.

I did test the command in SSH and I got no errors.

How do I view the Apache error logs for errors?
PMEmail Poster
Top
Matt
Posted: Jun 16 2004, 11:44 AM
Quote Post





Group: Members
Posts: 1,103
Member No.: 342
Joined: 25-November 03



QUOTE
How do I view the Apache error logs for errors?


Error logs for each site can be found at;

/home/<siteadminusername>/<sitename>/error_log

where you would replace <siteadminusername> with the site admin user name and replace <sitename> with the name of your site. The error log located at:

/home/webadmin/bvchurch.org/error_log

The main Apache error log can be found at:

/var/log/httpd/error_log

One important things to note:

I noticed that the error_log files were deleted for bvchurch.org. Please do not ever delete the error_log or access_log files. Set up log rotation instead.

To set up log rotation:
1) Log into your HSPC control panel.
2) Click on the Site tab.
3) Click on Select Another Site
4) Click on the site for which you wish to set up log rotation.
5) Click on Website Statistics.
6) Click on the Log Files tab.
7) Click on Access_log
8) Check the box next to Log Rotation Enabled.
9) Set the other log file settings. I recommend that you use:
- Rotate the log file before removing 4 times.
- Rotate the log every week.
Note: Other options are acceptable, as long as they keep the size of
each log file at a reasonable size.
10) Check the box next to Compress the log file after rotation. (This
will save significant disk space.)
11) Click on the Save button.
12) Click on Error_log
13) Repeat steps 8 - 11.

Your web server would not start because there were some references in your apache configuration file (/etc/httpd/conf/httpd.conf) to an old web site that is no longer referenced in your control panel: bearvalley.www.bvchurch.org. The web server was complaining that the directories did not exist on your server.

I commented out the VirtualHost section for this site you were no longer using and was able to restart the web server.


--------------------
Matt B.
Advantagecom Technical Support

Private messages are ignored unless solicited. If you have a support question, please email support@advantagecom.net, post in the appropriate section of the forum, or call if your service plan allows support by phone.
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll