Re: Application Design for User Authentication
On 28 Aug 2002 at 11:57, Gfoo opined: G:I'm creating a web appication in Perl (and CGI). G:I' ve written code that is used to create and read sessions (by using G:cookies or GET http method) which are used after authenticating user logins G:in a database. G:The code for handing transitions and state is about 60 lines of code. I G:already have made it modular, but I'm still searching for an elegant way to G:use this code on every script. G:I have several pages (.pl scripts) that must be viewable only by logged in G:users. G:Do I need to put the same code on every page (and have the 'actual' script G:code in an if branch of the authentication code)? G:I also have thought that I can create something like a dispatcher, which G:checks if the user is authenticated and then call the actual .pl script (or G:modules subroutines) from there. G:How can someone avoid code repetition on all scripts that require G:authentication? Can I avoid having a big if ... statement to handle all G:cases? It would be nice, if only 1 to 5 lines of code were required on each G:script. Is there any suggested way of handling this situation? can you use mod_perl? intercepting the authentication step with mod_perl is very easy and will accomplish exactly what you want to do. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Application Design for User Authentication
Hi. fliptop wrote: On 28 Aug 2002 at 11:57, Gfoo opined: G:I'm creating a web appication in Perl (and CGI). skipped Where could I as a beginner read more about mod_perl? Sources in plain English appreciated. Thanx. can you use mod_perl? intercepting the authentication step with mod_perl is very easy and will accomplish exactly what you want to do. -- Yours sincerely, Oleksiy Rudenko Law offices 28-B, Andriivsky uzviz Str. 4-th floor Kyiv, 01025, Ukraine tel./fax (+380-44) 416-1312, 416-2378 E-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create an output file using Perl
Alex B. [EMAIL PROTECTED] wrote: ... --- Allen Wang [EMAIL PROTECTED] wrote: i want to generate an output file using perl open (OFILE, /tmp/aa.lst) or die Can't write $p_OutputFile: $! ; Everytime I ran it, I got the following error message. Can't write /tmp/aa.lst: No such file or directory at compare.pl line 71. ... try using: open (OFILE, + /tmp/aa.lst) or die Can't write $p_OutputFile: $! ; ^ You're allowed to put whitespace in between the mode and filename, but you can't put any before the mode. These snippets are equivalent to open OFILE, '', ' + /tmp/aa.lst' ^^^ filename ^ mode So just remove the leading space, or use the 3 argument form. open OFILE, ' /tmp/aa.lst' open OFILE, '', '/tmp/aa.lst' -- Steve perldoc -qa.j | perl -lpe '($_)=m((.*))' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Application Design for User Authentication
On Wed, 28 Aug 2002 at 15:46, Oleksiy Rudenko opined: OR:Where could I as a beginner read more about mod_perl? Sources in plain OR:English appreciated. OR:Thanx. perl.apache.org is a good place to start. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sendmail command line (without queuing)
Ok Ok, I am glad that Net::SMTP is better. I prefer it because I could use the same code in Windows and Unix and I heard that using sendmail could create some security problems, but I thought that sendmail could be more reliable, or could work faster, etc. Teddy's Center: http://teddy.fcc.ro/ Mail: [EMAIL PROTECTED] - Original Message - From: Wiggins d'Anconia [EMAIL PROTECTED] To: Octavian Rasnita [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 5:51 AM Subject: Re: sendmail command line (without queuing) Would be interesting to know which book and what reasons they stated for using sendmail directly. I would imagine most of the people on the list and myself included would advocate using the module in almost all cases. There are a couple of big reasons, mainly that understanding sendmail is a huge huge task, sendmail is probably one of the most complex software packages on the internet, using a module to direct all of its intricacies written by someone else whom probably has a better if not very good understanding of the underlying core technology, in this case sendmail, is better than trying to learn just a couple of things about sendmail to accomplish what you want, while this works in throw away scripts that only get used once or twice, for any sort of real programming (as drieux puts it) project you are going to want the robustness the module can provide in a relatively simple interface, again which the module provides. Second by using the module you remove yourself from having to keep abreast of the latest changes to SMTP and the sendmail specs, etc. which if you are into and it is a core part of your development that may be fine, but for most of us we have enough to keep track of with respect to browsers, web servers, databases, perl itself, the OS, etc. being able to just upgrade the module and leave the changes required for it to interface with sendmail to the module developer relieves one burden. Finally, when in the future your code has to get maintained by someone else, using a module as standard and well documented as most in CPAN are and in the case of Net::SMTP specifically will be much easier on that other person as there is a good chacne they are already familar with it or they can quickly get spun up on good docs. Certainly there are times when calling sendmail directly may be appropriate but in most cases, 99 out of a 100, using the module is probably going to be better in the long run. As for using Net::SMTP or any of the other mail modules is probably system dependent, and is certainly influenced by user opinion, we all have our preferences. A quick search on CPAN returns 149 :-)... http://search.cpan.org/search?mode=allquery=sendmail Remember to throw comments back to the list as well, I would love to hear what others think, does anyone disagree, should we cast aside the module and go with the direct route (other than the fact that this sends us down the evil path to the dark side, drieux?)... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.htm?
Hi all, I've seen some links that end in .htm?blabla=blublu Can you tell me what kind of html files are these? Are they Perl CGI programs that have the .htm extension? Or they are normal html files but they could get a query_string like a CGI script? Thank you for any tip. Teddy's Center: http://teddy.fcc.ro/ Mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: .htm?
-Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 1:28 AM To: [EMAIL PROTECTED] Subject: .htm? Hi all, I've seen some links that end in .htm?blabla=blublu Can you tell me what kind of html files are these? Are they Perl CGI programs that have the .htm extension? Or they are normal html files but they could get a query_string like a CGI script? Thank you for any tip. You cannot assume that there is any kind of file behind a request. For all you know, that request triggers a database lookup to generate a response. The only way to know for sure is to have access to the server's configuration so you can see exactly how a particular request would be handled. Now we can speculate, and guess that links like those probably point to some kind of ASP-like pages. Perhaps PHP, HTML::Mason, Embperl, etc. Or, they could be conventional CGI scripts with a .htm extension. Again, you simply cannot tell from the request itself. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: missing the boat on s///
$_ =~ s/$w/$i/; John Pitchko Data Services Saskatchewan Government Insurance Jerry Preston [EMAIL PROTECTED] 08/28/02 10:04am Hi!, I know this is simple, but what am I doing wrong? $_ = Who is missing the boat; $j = Jerry; $w = Who; $_ = s/$w/$j/; Thanks, Jerry
Re: missing the boat on s///
At 17:04 28/08/02, Jerry wrote: $_ = Who is missing the boat; $j = Jerry; $w = Who; $_ = s/$w/$j/; If you want the output 'Jerry is missing the boat' then you need the =~ operator rather than just = ie. $_ =~ s/$w/$j/; Mo Mo Holkar Undying King Games [EMAIL PROTECTED] Free games! at http://www.ukg.co.uk -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: missing the boat on s///
what are you trying to do ? -Original Message- From: Jerry Preston [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 12:05 PM To: Beginners CGI Perl Subject: missing the boat on s/// Hi!, I know this is simple, but what am I doing wrong? $_ = Who is missing the boat; $j = Jerry; $w = Who; $_ = s/$w/$j/; Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Application Design for User Authentication
[EMAIL PROTECTED] (Margaret) wrote in 001301c24e8e$3c255f80$[EMAIL PROTECTED]:">news:001301c24e8e$3c255f80$[EMAIL PROTECTED]: You can use the require '/usr/local/.../auth.pl'. In the auth.pl put in the code to authenticate the user and then run that subroutine from the original script and add the require statement to point to that file. Another way is to create your own object orientated module or package. I'll try to implement this and maybe go OO. thank you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting Image Links From Directory Into MySQL
Greets, I am looking for a script/command/module/subroutine (whatever) that will scan a directory of images on my file server, and then input those links into a MySQL database... Does anyone have a script/command that will do that? TIA, Will __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Application Design for User Authentication
On Wednesday, August 28, 2002, at 11:41 , Gfoo wrote: You mean configuring the server (apache) to handle authentication by calling some perl code? Will this let me have a page full of content and give the ability to the user viewing this page to POST its credentials in order to login (and return to the same page, but logged in? ) you have ruled out using .htaccess for some reason? ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use Mail::Mailer question
snip but for the life of me, I do not see this X-UIDL in my outgoing traffic - is that something on his side that his MTA is inserting??? seems like the general consensus of the results from a google search is that it is an MUA header used with pop/imap. http://mail.gnome.org/archives/balsa-list/2002-June/msg00080.html http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/1998-12/msg00037.html As far as the garbage that is put in that header, that is most likely program specific http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Image Links From Directory Into MySQL
Off the top of my hand I don't know of one, as I would more than likely home grow my own with Find::File and DBI, have you checked http://www.freshmeat.net and of course CPAN? There may be something in existence, or at least something close that you could then hack up to use your own db defs etc. http://danconia.org Will wrote: Greets, I am looking for a script/command/module/subroutine (whatever) that will scan a directory of images on my file server, and then input those links into a MySQL database... Does anyone have a script/command that will do that? TIA, Will __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]