Re: creating web interface for .forward on linux
Hello KeN, Friday, December 14, 2001, KeN ClarK [EMAIL PROTECTED] wrote: KC i've looked through 'learning perl' 2nd edition, and am confused. much. i KC want to create an interface for system users to update their .forward KC files in their $HOME directories. KC I want this to be a web-based interface. The webmail program I am using is KC openwebmail, and doesn't have this functionality, yet. KC I can't be any more of a beginner. I am concerned heavily about security KC also. What I envision is a page with a username and password submit KC fields. If the user exists, and if the password is correct, then it will KC let a field that user fills in their [EMAIL PROTECTED] and that writes to KC their own $HOME/.forward. Also, if they clear the field, and submit, it KC will write over any existing .forward, to disable .forwarding. KC If I can figure out the perl side of checking writing over the .forward, KC I'd like to add this to openwebmail. KC Ask away if you've question. no questions, but it's usually admnistrator job, not cgi beginner... 1. http daemon usually runs on servers with uid=nobody and group=nogroup. In correctly designed sites, httpd haven't any access to users home files. 2. if you really want to do this, you should reconfigure your http daemon. if your daemon is apache, read http://httpd.apache.org/docs-2.0/suexec.html Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Global Variables
Hello jason, Friday, November 02, 2001, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: jwc Need some help. jwc I think that I need to be using global variables. Unless Someone has a jwc better solution. jwc What I am trying to do is. I want to set a variable for such things as jwc FONT_COLOR=00 jwc BACKGROUND_COLOR=55 jwc For example: So that I do not have to go through every file and set that jwc on jwc ever line that I would like to use it on. I would like to set global jwc variable so that if I change (in this case) the colors than I only have to jwc change it in one place and be done with it. jwc Which brings me to my question. Unless you know a better way of doing it. jwc How do I set global variables take a look at perldoc -f use perldoc -f require Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic table help
Hello Keith, Monday, August 20, 2001, Keith Rachel Murphy [EMAIL PROTECTED] wrote: KRM Need a little help. I have a problem that I have been banging my KRM head on all weekend and I am more than a little frustrated. KRM Basically, I want to pull data from a database and display it in KRM the form of a table, with a row in the table for each row from KRM the database. What happens is each row from the database ends up KRM as its own seperate table. The current code portion is as KRM follows: KRM #!/usr/bin/perl -w KRM # KRM # KRM use CGI qw(:all); use CGI qw/:all *table/; KRM use DBI; KRM blah,blah,blah.. KRM ## fetch results and print print start_table({-border=5}); KRM while ( my @row = $sth-fetchrow_array() ) { KRM ($id,$first_name, $last_name, $phone_number, $street_address, $city, $state, $zip, $email) = @row; printTr({-valign=CENTER}, KRM [ KRM td(['First Name', $first_name]), KRM td(['Last Name', $last_name]), KRM td(['Phone Number', $phone_number]), KRM td(['Street Address', $street_address]), KRM td(['City', $city]), KRM td(['State', $state]), KRM td(['Zip', $zip]), KRM td(['E-Mail', $email]) KRM ] ); KRM } print end_table(); Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: antispam or something
Hello Morgan, Wednesday, August 08, 2001, Morgan Norell [EMAIL PROTECTED] wrote: MN in the mailform MN require log.pl MN and in the log.pl MN #!/usr/bin/perl -wT MN $location = unknown; MN if ($ENV{'REMOTE_ADDR'}) { MN $location = $ENV{REMOTE_ADDR}; $location = $ENV{'REMOTE_ADDR'}; MN } MN if ($ENV{REMOTE_HOST}) { if ($ENV{'REMOTE_HOST'}) { MN $location = $ENV{REMOTE_HOST}; $location = $ENV{'REMOTE_HOST'}; MN } Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newlines
Hello Sergio, Thursday, July 26, 2001, Sergio Gonzalez [EMAIL PROTECTED] wrote: SG Hi, SG I'm wondering how to make sure that when my data is written to a file, a SG proper end of line is in place after ea. intended line. it's not your job. leave it to operating system. SG code: SG ... SG # now loop and append the data to the file SG # Loop thru hash and write data SG foreach $value(values %cgidata) { SG if ($debug 0) { print Writing Values: \$value\,BR\n; } SG print FILEHANDLE \$value\,; # PRINT all data SG } SG # Here is were my question is # SG print FILEHANDLE \n; # PRINT end of line that's enough. SG ... more code ... SG should i use something like # print FILEHANDLE \r NO. SG basically i want my data to output as comma delimited, but i want the end SG of lines to be in place when i ftp the file over to a win system. again, it's not your job. you should switch ftp to ascii mode, and then transfer your text files. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to send a notification mail from Windows/NT?
Hello David, Friday, July 20, 2001, Nazary, David [EMAIL PROTECTED] wrote: ND Hi, ND When I use the following script to send mail: [...] ND I get this error message. Any ideas how I can resolve this? C:\CM\utilsc:\perl\bin\perl smtp_mailer2.pl ND The system cannot find the path specified. ND Use of uninitialized value in scalar assignment at ND c:/Perl/site/lib/Net/Domain.pm line 191. ND Use of uninitialized value in scalar assignment at ND c:/Perl/site/lib/Net/Domain.pm line 191. ND Use of uninitialized value in pattern match (m//) at ND c:/Perl/site/lib/Net/Domain.pm line 215. ND Use of uninitialized value in split at c:/Perl/site/lib/Net/Domain.pm line ND 219. looks like your perl installation damaged. try to reinstall. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: test script
Hello Bradley, Wednesday, July 11, 2001, Bradley M. Handy [EMAIL PROTECTED] wrote: BMH #!/path/to/perl BMH use CGI; print CGI-param(); BMH print I'm Working; BMH I believe the above lines of code should work just fine. your script does not print content/type, so it produces error as CGI script. #!/usr/bin/perl use CGI qw(:standard); print header; print I'm Working; Can anyone tell me what is the most basic script that I can load onto a server to test that it is working? Best wishes, Maximmailto:[EMAIL PROTECTED]
Re[2]: cgi help
Hello Michael, Sunday, June 24, 2001, Michael P. Carel [EMAIL PROTECTED] wrote: MPC Hi there, Is there any one who can help with my problem regarding MPC perl MPC cgi's. MPC I've encountering problemwith my webpages when i execute my cgi prog, MPC heres MPC my error messages in my page: [...] MPC More information about this error may be available MPC in the server error log. MPC Please help me. so, do you look at server error log? MPC yes ! but it looks weird even some simple cgi script that will show message MPC hello doesnt work. MPC here's my server error log: MPC [error] (8)Exec format error: exec of /home/httpd/cgi-bin/test.cgi MPC [error]premature end of script headers: /home/httpd/cgi-bin/test.cgi MPC and heres my samplecgi file config (/home/httpd/cgi-bin/test.cgi): MPC#!/usr/bin/perl MPCprint Content-type: text/html\n\n; MPCprint Hello World!!\n; MPCexit; 1. is your script executable? 2. do you have perl installed in /usr/bin ? from command line, type: /home/httpd/cgi-bin/test.cgi and show us, what happened. Best wishes, Maximmailto:[EMAIL PROTECTED]
Re[4]: ? embed scalars in the sql
Hello mark, Tuesday, June 26, 2001, mark crowe (JIC) [EMAIL PROTECTED] wrote: mcJ Not entirely true. Try: mcJ $string = 0.0; mcJ print $string; mcJ - prints 0.0 mcJ Now try it without the quotes around 0.0 mcJ - prints 0 let's try another approach: $s = 0.0; print $s,\n; $s+=0.1; print $s,\n; C:\TEMPperl tt.pl 0.0 0.1 mcJ So there is a difference between strings and numbers. In the $counter case mcJ it doesn't make any difference, but for the above case it could be important mcJ - 0.0 is true in a boolean evaluation, while 0 is false, for example. I mcJ will admit I have no idea how often it is important though. mcJ Incidentally, autoincrement also works for strings anyway, try: mcJ $a = a; $a++; print $a; mcJ so your example would work whether $a is being treated as a string or a mcJ number of course, string can not be numbers :) but numbers always can be converted into strings. Best wishes, Maximmailto:[EMAIL PROTECTED]