Gossamer Forum
Home : Products : Others : Fileman :

Please HELP: Error File- core???

Quote Reply
Please HELP: Error File- core???
The script has been installed and is working properly except for one thing. Whenever I execute a command like File Upload or Make Dir - it executes and does what it's supposed to but it also lists a huge amount of error data on the web page under the File Manager screen. It would make sense if it wasn't executing correctly and it was simply listing the errors that it occurred, but this amount of data is huge! Plus like I said the intended action is being carried out appropriately. Also it is creating a file called core (no extension) and this file got so big (125 meg) that I lost access to my FTP server temporarily. Support told me that their was a file being created by this CGI Script that was 125 meg, and it needed to be deleted. I've tried debugging the script, but I'm afraid that I'm not that experienced with Perl - Could someone please help me out.
BTW - I'm using a Unix server (hosting service is Netcom). Thanx in advance,


------------------
-------------
Mike Cacc
Quote Reply
Re: Please HELP: Error File- core??? In reply to
Hi Mike,

Sorry for the late reply.. I'll take a look into it!

Alex
Quote Reply
Re: Please HELP: Error File- core??? In reply to
Thanx Alex - but I somehow corrected the problem. It may have been due to the fact that I was using a directory right off of my root (htdocs). For instnce...
/htdocs/mydir
When I re-setup the Script I made the fileman manage files in folder that was 2 directories off of my root. For instance...
/htdocs/mydir1/mydir2
No more errors! It could have something to do with my file structure through Netcom. I may not be able to give 777 access to a folder directly off of htdocs... who knows!
Anyway it works perfect now and I must tell you - I love it. Thanx so much for making this script available.

------------------
-------------
Mike Cacc
Quote Reply
Re: Please HELP: Error File- core??? In reply to
The reason could also be a bug in the "sub cgierror" section at the end of the sript. I had a similar experience when I had the path set incorrectly. If you haven't corrected this bug you may run into this again. Below is a copy of the post which explains where the bug is and the correction.
---------------------------------------------the cgi_error subroutine contains:
my ($error) = shift;
$error && print "Error Message : $_[0]\n";
However, since shift is being used, the error message is no longer at $_[0]! In any event tis a backwards way of doing this considering there is only one variable entering the subroutine. I propose:

my ($error) = @_;
$error && print "Error Message : $error\n";

which SHOWS the error message, as before the error message was never shown.

-Cheers,
RJW
Quote Reply
Re: Please HELP: Error File- core??? In reply to
oops

[This message has been edited by Benn (edited December 28, 1998).]
Quote Reply
Re: Please HELP: Error File- core??? In reply to
That will be fixed up shortly, however calling an undefined variable will not cause a core dump in perl, so that shouldn't be the cause of the problem.

Cheers,

Alex
Quote Reply
Re: Please HELP: Error File- core??? In reply to
Mike Cacc said in his original post:

"it executes and does what it's supposed to but it also lists a huge amount of error data on the web page under the File Manager screen. "

I'm positive this is caused by the original code in the sub cgierror routine. I got the exact same response when "any" error occurred. It bogged my system down so bad I would need to re-start. First, I cut the sub cgierror routine out of fileman.cgi, which fixed the problem, but obviously did not help in debugging. After correcting the code in the error routine I placed it back in fileman.cgi. Everything worked fine after that. Now if I mis-configure something I get the nicely formatted debug information one time only.

Quote Reply
Re: Please HELP: Error File- core??? In reply to
Hi

I was having the same problem - fileman getting stuck in a error loop.

I applied the code Benn suggested and now it's OK :-)

Chris
Quote Reply
Re: Please HELP: Error File- core??? In reply to
 
Quote:
That will be fixed up shortly, however calling an undefined variable will not cause a core dump in perl, so that shouldn't be the cause of the problem.

Well, I'll take that back. =) I've never seen perl cause a core dump because of an undeclared variable, but the evidence is there. I'll fix it up..

Cheers,

Alex
Quote Reply
Re: Please HELP: Error File- core??? In reply to
Well, it wasn't the $error that was causing the problem, but rather:

&log_action ("CGI ERROR: $error") if ($config{'logfile'});

in &cgierr. What happens if log_action fails? Well it calls &cgierr, which tries to log it, and loops forever. Ugh. =)

All fixed up now.

Cheers,

Alex