Gossamer Forum
Home : Products : DBMan : Discussions :

perl db.cgi

Quote Reply
perl db.cgi
Hi,
I've been trying to implement changes to the script - facility to upload graphic etc, but getting errors.
Whenever I run perl db.cgi - get error

syntax error at db.cgi line 188, near "else"
Execution of db.cgi aborted due to compilation errors.

I've located this to line :

flock(ID, 2) or &cgierr("unable to get exclusive lock on $db_id_file_name.\nReason: $!");

I'm none the wiser, anyone help?

Cheers
G.

George Ewing
TOP HOST LTD
Quote Reply
Re: perl db.cgi In reply to
use perl -c db.cgi to get more error messages.

Also, you are probably missing a right bracket somewhere. You can de-bug scripts via applications, like EditPlus or check out the de-bugging programs at:

http://www.cgi-resources.com

Regards,

Eliot Lee
Quote Reply
Re: perl db.cgi In reply to
Thanks,
I've started using EditPlus (great prog), now getting error:
"ms/user/g/geeing/public_html/dbman/db.cgi did not produce a valid header (name without value: got line "missing right bracket at /ms/user/g/geeing/public_html/dbman/db.cgi line 1268, at end of line")
"

When I look at line 1268, I see

LINE 1264" else {
LINE 1265 print "Please enable debugging to view.";
LINE 1266 }
LINE 1267 exit -1;
LINE 1268}

Hmm, any idea's?

George Ewing
TOP HOST LTD
Quote Reply
Re: perl db.cgi In reply to
Hi,
Can you please tell me where to find EditPlus.
Thank You,
Paul

Quote Reply
Re: perl db.cgi In reply to
Generally, if someone gives me the name of the software, I do well using google.com to find it.

Try: http://www.editplus.com

Quote Reply
Re: perl db.cgi In reply to
Make sure that you have a right bracket before the else line of code. Look at lines 1263 and 1262. Most likely you have not closed the first IF condition, which is choking the script.

Regards,

Eliot Lee
Quote Reply
Re: perl db.cgi In reply to
Also EDIT PLUS has been discussed quite a few times in the support forums and links have been provided before. If you had searched the forum for Edit Plus, you would've found links to the script.

Regards,

Eliot Lee