Gossamer Forum
Home : General : Internet Technologies :

FORM QUERIE

Quote Reply
FORM QUERIE
i am trying to set up a .htaccess and .htpasswd file, i have also a registration page and i was wondering can the form data be converted to be entered into a txt file so that the .htaccess file can read it

im not sure which section this goes in so dnt blame me

sum1 plz post back quickly
Quote Reply
Re: [makethepain] FORM QUERIE In reply to
Couldn't you modifty my free Ace Password script? That lets you manage users. You could take codes from it, and also install the main .cgi file, so you can manage your users.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] FORM QUERIE In reply to
Would you mind if I listed a few potential problems I see with the script?
Quote Reply
Re: [Paul] FORM QUERIE In reply to
I know most of them. I just don't have time to update. I could list loads of potential problems in my free scripts ... but thats cos I wrote them such a long time. Several I have simply had to remove, cos I now realise how crap the coding was Tongue This one shouldn't be too buggy...as I have fixed most of the problems.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] FORM QUERIE In reply to
The first thing that stood out is that you left fatalsToBrowser in the code which is never a good idea as if the script fatals then any potential hackers can see some sensitive server details.

Last edited by:

Paul: Mar 20, 2003, 9:08 AM
Quote Reply
Re: [Paul] FORM QUERIE In reply to
The reason I left that in, is so they can see problems (i.e modules not found). Had quite a few people emailing me, asking why they got an error or something. I've been using it so users can report bugs to me.

Also, another thing in it, if you look closely, is where/how it reads/writes the .htaccess files. I've had a few people setting up the paths etc wrong, and its password preotected their whole site Tongue Very easy to fix, but I think I better get it fixed up in 3.5 ;)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] FORM QUERIE In reply to
You should use a custom die wrapper instead of fatalsToBrowser - that way you can control the information displayed.

local $SIG{__DIE__} = \&your_subroutine;
Quote Reply
Re: [Paul] FORM QUERIE In reply to
Interesting..I never knew that feature existed. Do you access the error with $_, or a shift ?

i.e;

$error = shift;

or

$error = $_;

That looks like a nice thing I coudl add in several of my scripts Smile (especially the formmail one)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] FORM QUERIE In reply to
Try this:

Code:
#!/usr/bin/perl
#======================================

local $SIG{__DIE__} = \&barf;
main();

sub main {
#--------------------------------------------------
# Testing 123.

die();

}

sub barf {
#--------------------------------------------------
# Oops!

print "Content-type: text/html\n\n";
print "An error occured:<br>";
print "$_[0]<br>";
print "Caller: @{[ join(', ', caller()) ]}";
exit;
}

You can change that die() to something like:

die "Yippeee!";

...to see what happens.
Quote Reply
Re: [Paul] FORM QUERIE In reply to
Sweet...I'm gonna have to play with this later today Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!