Kelvin...Congrats on your CGI success! Yes, it is a simple but easy to forget fact that the physical location of your documents on the server is not the same as the URL... if you're document root (set in your httpd.conf file) is "/var/www/" and inside it you have a folder called "myStuff" then the URL will be http://localhost/myStuff and NOT http://localhost/var/www/myStuff (simple but tricky the first few times......still, important to remember)
and to Sven, I don't believe that SMTP supports read receipts (or delivery confirmation) but I may be wrong...(anybody?) This is where the evil transparent tracking gif's come into play. But they require that you use the even more evil HTML email which I don't recommend under any circumstances despite the fact that marketing folks just love it. The downside is that not everybody can read HTML email and you generally have to send both a plaintext and HTML versions which make even a short message about 30k. BUT, assuming you MUST have delivery confirmation, the trick is to use HTML email and do the following: 1) Create a CGI on a web server that accepts an email address as a parameter and delivers a single pixel transparent gif to the client while recording the email address in a DB or text-file (or whatever) 2) embed a customized link to this CGI from the email you're sending (<img src="http://myserver/mySneakyCGI.cgi?email=recipientAddress@;somedomain.com"> ) (remember to URL encode the address) your CGI might look something like this: #!/usr/bin/perl -w use CGI qw/:standard/; open(LOG,">>pathToLog.txt"); #write a timestamp and the email address to our log file write LOG scalar(localtime()) . "\t" . param("email"); close(LOG); #now send our image open(IMG,"pathToImgFile.gif"); #if you're on Windoze make sure you specify binmode #(otherwise your image will get mangled) binmode(IMG); #send our mime-type to the browser #(so it doesn't get confused) print "Content-Type: image/gif\r\n\r\n"; binmode(STDOUT); #use binmode for our output filehandle, too print <IMG>; #print the whole image file to the browser close(IMG); #clean up ####THE END######## (Can somebody show me how this would look using DBI instead of text files?) DISCLAIMER: I haven't tried to run this...it probably doesn't work as-is. Now your log file knows when the email was read, and by who (and how many times!) and your poor unsuspecting user is none the wiser. mwuhahah! NOTE: you could easily use a name, or customerID or whatever you like in your query string that you send to the CGI. just remember to use your perl powers for good, instead of evil. Good luck. -Peter -----Original Message----- From: Kelvin McWha [mailto:kelvin.mcwha@;btinternet.com] Sent: Tuesday, November 12, 2002 8:15 AM To: 'zentara'; [EMAIL PROTECTED] Subject: RE: Unable to run cgi script Got it, after spending two days on just this problem I have found the answer with the help of David T_G and David Kirol and others, many thanks. And the answer was Setting ScriptAlias /cgi-bin /home/kelvin/cgi-bin/ Means that I still need http://localhost/ But I don't now need /home/Kelvin So the final path is http://localhost/cgi-bin/myscript.cgi Simple eh! thanks again Kelvin Ps just spotted that Scott suggested this within one of his answers yesterday > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:Linux@;onion.perl.org] On Behalf Of > zentara > Sent: 12 November 2002 14:15 > To: [EMAIL PROTECTED] > Subject: Re: Unable to run cgi script > > On Mon, 11 Nov 2002 12:27:25 -0000, [EMAIL PROTECTED] (Kelvin > McWha) wrote: > > >System is > >SuSe 8.1 stand-a-lone > >Apache 1.3 > > > >Have got Apache running OK and tested it in standalone mode using > >http://localhost > >which shows the appropriate test page > > Can you get http://localhost/~kevin to run? > > In SuSE 8.1 you need to enabled user home dirs. > > Look at /etc/sysconfig/apache and see if you have home directories > enabled. > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]