Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Random directory creation/deletion scheduling logic problem

by Kanji (Parson)
on Nov 17, 2005 at 20:07 UTC ( #509544=note: print w/ replies, xml ) Need Help??


in reply to Random directory creation/deletion scheduling logic problem

The simplest method I can think of would be to password protect the URL using htaccess.

You can then create a login on purchase and delete it after the 24 hour window without having to worry about moving directories, etc.

For implementation, I'd start with HTTPD::UserAdmin as it let's you add meta info to htpasswd files really easily...

$auth->add($username, $password, { 'expired_after' => time + 86_400 }) # ... and then later using cron or something ... my $meta = $auth->fetch($username, 'expired_after'); $auth->delete($username) if $meta->{'expired_after'} < time;

    --k.



Comment on Re: Random directory creation/deletion scheduling logic problem
Download Code
Re^2: Random directory creation/deletion scheduling logic problem
by hmbscully (Scribe) on Nov 17, 2005 at 20:20 UTC
    This would be a great solution, but I'm not on Apache. I'm on a really old Netscape Server and as far as I know (from the one old manual I still have), there's no htaccess file in this web server. And I don't have that module and its just easier to assume I'll never have it.

    I don't want to come off as a total naysayer, these are good ideas and I appreciate them, I'm just trying to work within the restrictions that I know I have to work in.

      Netscape has support for .htacces-like functionality via it's .nsconfig files, and HTTPD::UserAdmin has support for DBM files, which .nsconfig's RequireAuth uses.

      As for not having the module:-

      It's a pure-Perl implementation, so there is zero reason you couldn't install it yourself if you're allowed to upload files, with the worst case scenario being you cut n' paste the module directly into your Perl script.

          --k.


        Thanks, I'll look into the .nsconfig solution. As for the module thing... there's just something amiss with the whole perl install on this server. Even when the unix admins install modules, sometimes they just don't work. There are three separate perl installs on this server, 2 don't work and its just a mess to figure out where to even install a module becuase the paths are a nightmare anymore. I forgot I could put a module in the code direct.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://509544]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2014-12-21 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls