Gossamer Forum
Home : Products : Others : Fileman :

Getting SYNTAX ERRORS in the call to CGI.pm

Quote Reply
Getting SYNTAX ERRORS in the call to CGI.pm
Hi, I´m figuring out how to install this script.
I´ve edited only the %config hash and uploaded the script, and NOTHING!
I´m using BSD/OS on a vserver schema, but with a physical copy of perl v 5.004.
I´m getting syntax errors from the call to the CGI.pm library itself, and in any and every line that calls one of its features.
Also the vars pragma line returns a syntax error.
Yes, I have other scripts working along with the CGI.pm and they work well.
I really will appreciate any hint you can give me, and ask you please email me with your answer, ´cause I´m looking bad with a costumer.

Best Regards,
Sphynxx
Quote Reply
Re: Getting SYNTAX ERRORS in the call to CGI.pm In reply to
Hello sphynxx:

It sounds like your path to perl might be wrong. Remember that line that starts out like #!/usr/local/bin/perl. You have to set the path correctly. Maybe what you have as the path to perl is perl 4 and not perl 5. If this does not solve the problem, can you post your url so that I can take a look at it.

Hope that helps
Sun

------------------
-------------------- Gossamer Threads Inc. ----------------------
Sun Djaja Email: sun@gossamer-threads.com
Internet Consultant
http://www.gossamer-threads.com

Quote Reply
Re: Getting SYNTAX ERRORS in the call to CGI.pm In reply to
this is it

#!/usr/local/bin/perl5
#


# Required Libraries
# --------------------------------------------------------
# use strict; # File uploads don't work with use strict in place, although script compiles with use strict.
use vars qw(%config $in);
use CGI qw (:cgi);
$in=new CGI;

# Configuartion
# --------------------------------------------------------
%config = (
root_dir => '/usr/local/etc/httpd/htdocs/neyra/',
logfile => '/usr/local/etc/httpd/htdocs/neyra/cpl/fileman/fileman.log',
password_dir => '/usr/local/etc/httpd/htdocs/neyra/cpl/fileman/pass/',
root_url => 'http://www.neyra.com.ar',
script_url => 'http://www.neyra.com.ar/cpl/fileman/fileman.cgi',
icondir_url => 'http://192.41.38.36/icons',
use_flock => 1,
allowed_space => 5000,
max_upload => 1000,
show_size => 1,
show_date => 1,
show_perm => 1,
show_icon => 0,
show_pass => 1,
version => '1.0'
);

# %icons = (
# 'gif jpg jpeg bmp' => 'image2.gif',
# 'txt' => 'quill.gif',
# 'cgi pl' => 'script.gif',
# 'zip gz tar' => 'uuencoded.gif',
# 'htm html shtm shtml' => 'world1.gif',
# 'wav au mid mod' => 'sound1.gif',
# folder => 'folder.gif',
# parent => 'back.gif',
# unknown => 'unknown.gif'
# );
# --------------------------------------------------------
HELP!!! I have a wife and 34 kids to feed!!! =)
Thanks for your fast answer.
Quote Reply
Re: Getting SYNTAX ERRORS in the call to CGI.pm In reply to
Hello sphynxx:

I think one of the problem you have is that you left trailing slashes here:

root_dir => '/usr/local/etc/httpd/htdocs/neyra/',
password_dir => '/usr/local/etc/httpd/htdocs/neyra/cpl/fileman/pass/',

maybe you should try this:

root_dir => '/usr/local/etc/httpd/htdocs/neyra',
password_dir => '/usr/local/etc/httpd/htdocs/neyra/cpl/fileman/pass',

please give this a try and another thing with this:


# %icons = (
# 'gif jpg jpeg bmp' => 'image2.gif',
# 'txt' => 'quill.gif',
# 'cgi pl' => 'script.gif',
# 'zip gz tar' => 'uuencoded.gif',
# 'htm html shtm shtml' => 'world1.gif',
# 'wav au mid mod' => 'sound1.gif',
# folder => 'folder.gif',
# parent => 'back.gif',
# unknown => 'unknown.gif'
# );

I am not too sure why you did this but you are commenting out these lines which I do not think you want to do.

If this does not help, I would really appreciate it if you could supply me with a URL and not the config parameters for fileman. This way I can ascertain what the problem is.

Cheers
Sun


------------------
-------------------- Gossamer Threads Inc. ----------------------
Sun Djaja Email: sun@gossamer-threads.com
Internet Consultant
http://www.gossamer-threads.com

Quote Reply
Re: Getting SYNTAX ERRORS in the call to CGI.pm In reply to
It did it.
Thanks a lot!

You´re doing a great job, and your scripts are fantastic. I can´t wait to get them all working. You´ll get many recommendations from me to my costumers. Smile

Best Regards,
Andrés

(you´re authorized to quote this text if you like it)



[This message has been edited by sphynxx (edited August 28, 1999).]