Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Errors Errors Errors!  (Read 347 times)
0 Members and 1 Guest are viewing this topic.
ramida
New Member
*

Karma: 0
Offline Offline

Posts: 0


« on: June 17, 2005, 04:02:00 PM »

Hi there,

Three weeks have passed and we can't get this BS (I mean CS) running.

An ERROR occurred while trying to continue:
Config file [/afs/unity.ncsu.edu/project/www/ncsu/forest_resources/wps/cgi-bin/calendarscript/config.txt] could not be opened for writing!

ERROR:

CGISession: Session file [/afs/unity.ncsu.edu/project/www/ncsu/forest_resources/wps/cgi-bin/calendarscript/session/1569063419.txt] could not be opened for writing!

ALL INSTALLATION STEPS HAVE BEEN FOLLOWED.
(1) FTPed in ASCII mode
(2) CHMOD 777 for calendarscript folder and its subfolders/files
(3) CHMOD 755 for calendar.pl and calendar_admin.pl
(4) Changed #!/usr/bin/perl to #!/usr/local/bin/perl as advised by our help desk staff


Here's our web administrator's help response:

>  Hi,
>  
>  I need your help very badly. Kindly verify if the following CHMOD value is
>  allowed on the following directory:
>  
>  /wps/cgi-bin/calendarscript/.......777

Audimar,

As the server is configured, the cgi scripts can be read, but can not write back to that directory. Is that what you are trying to do? If so, the writable datra directory should not be the same as the cgi directory as a malicious script could rewrite your code on the fly.

>  
>  
>  
>  I'm still getting this error:
>  
>  "The server encountered an internal error or misconfiguration and was unable
>  to complete your request.
>  The error was: Premature end of script headers:
>  /afs/unity.ncsu.edu/project/www/ncsu/forest_resources/wps/cgi-bin/calendar_admin.pl"

This usually means that either the script is not outputting proper HTML

OR

the path to the perl binary is the script is incorrect.

Line 1 in the script is listed as :

#!/usr/bin/perl

and it should be :

#!/usr/local/bin/perl

There is no perl binary at /usr/bin/perl

Hope that helps.

Regards,
Tom

Tom Karches
NCSU Information Technology -- Web Services
twk@ncsu.edu


Logged

ramida
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: June 17, 2005, 04:19:00 PM »


** ALL INSTALLATION STEPS HAVE BEEN FOLLOWED.
(1) FTPed in ASCII mode
(2) CHMOD 777 for calendarscript folder and its subfolders/files **

Not all servers allow files or directories to be chmod to 777. Check your host's CGI FAQ's or ask their support.

** ERROR:
CGISession: Session file [/afs/unity.ncsu.edu/project/www/ncsu/forest_resources/wps/cgi-bin/calendarscript/session/1569063419.txt] could not be opened for writing! **

Sounds like a permissions error.


** As the server is configured, the cgi scripts can be read, but can not write back to that directory. Is that what you are trying to do? If so, the writable data directory should not be the same as the cgi directory  **

Well that explains it! You'll have to move the rest of the files elsewhere on the server (ie. outside the cgi-bin directory) and set the $BASE_DIR variable in the calendar.pl calendar_admin.pl and debug.pl file (if used) to the absolute path of where you've decided to place those other files.


BTW. In most cases permissions of 777 is not required. 666 (or 766, depending on the server set up) should be all that is required for the directories /calendarscript/ and below and the files they contain. In fact I've never had to set permissions for them at all after FTPing them. The default permissions the files and directories received when uploaded worked fine without alteration on every host I've installed the script on.

JFYI

Dan O.

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

Logged
ramida
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #2 on: June 20, 2005, 08:08:00 AM »

Hi Dan,

Finally got everything working -- not because I moved the calendarscrip folder outside of the cgi-bin directory. Below is my reply to our Help Desk:

"Hi Tom,

Thanks for your help.

I tried to move the writeable data outside of the cgi-bin directory, set the proper permission using an FTP client program's CHMOD, but still got the nasty "cannot open for writing" errors.

It turned out that the problem was simple but subtle -- setting permissions using the "fs sa" command, NOT CHMOD using an FTP program! Our web space is on an Andrew File Server (AFS).

Everything is working now -- thanks again!

Regards, Audimar"

~~~~~~~~~~~~~

I'm sure you'll get something from the above experience to mention in your documentation.

Regards, ramida

------------------
ramida

Logged

ramida
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: June 20, 2005, 12:26:00 PM »

** setting permissions using the "fs sa" command, NOT CHMOD using an FTP program! Our web space is on an Andrew File Server (AFS)... I'm sure you'll get something from the above experience to mention in your documentation. **

Matt (CalendarScript's author) might make note of it although I don't know how popular such a web server is. I myself have never heard of it before.

Does it not start that in your host's CGI FAQ's? I would think that would be a better place to make note of server specific requirements rather than every single CGI script ever made. JMO

Glad to hear you finally found the cause, incorrect permissions as the server reported.

Dan O.

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

Logged
Pages: [1]   Go Up
Print
Jump to: