Re: css attributes in CGI - more questions
Jimmy George wrote at Sun, 29 Sep 2002 10:38:16 +0200: LIMITED SUPPORT FOR CASCADING STYLE SHEETS from perldoc CGI where is that? I am a beginner. On a Mac. With a home page serviced by a remote ISP. No Linux contact. It's a subsection in the perl documentation of the CGI module. perldoc is a program showing the perl documentation of Perl itself and every installed module. perldoc is installed (in general - I never used it on a Mac, but it should be the same), when Perl with it's command line call perl is installed. Just go to the commandline and type perldoc CGI or perldoc perldoc to understand how perldoc works. Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Looking for the Sendmail.pm for Appache ver 1.3
Hi all, Could any one send of tell where I could find this Module. thanks in advance. Bruce
Re: How to run a process in background?
On Sun, 29 Sep 2002 at 16:40, Octavian Rasnita opined: OR:Can you give me some hints about how I should use the fork, to run the OR:process in background? have you read perldoc -f fork yet? if so, what part of that do you not understand? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to run a process in background?
On Sun, 29 Sep 2002 16:40:07 +0200, [EMAIL PROTECTED] (Octavian Rasnita) wrote: I want to make a script that is activated from a browser but it might take a long time to send all the messages using the Net::SMTP. So I think that it could be a good idea to make a background process to run it. Can you give me some hints about how I should use the fork, to run the process in background? Your biggest problem is to close the pipes to apache from the forked children, else your clients will see their browser's hang. Merlyn has a good column on this at www.stonehenge.com column 20. Here is a simple example to demonstrate the problem. Make up some long process to test this with, like while(1){sleep(1)} Then try running it as a cgi script with and without the line which closes STDOUT, STDIN, and STDERR. With it commented out, your browser will hang. ## #!/usr/bin/perl use warnings; use strict; $| = 1; # need either this or to explicitly flush stdout, etc. # before forking print Content-type: text/plain\n\n; print Going to start the fork now\n; fork exit; #try running with the following line commented out close STDOUT;close STDIN;close STDERR; exec('./fork-long-process-test-process') || warn funniness $!; #if you use system here, instead of exec, the parent process #hangs around for child to exit, even though the cgi exits. # -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What am I missing or doing wrong?
Hi all, I've taken the following example from a Perl book but it doesn't work well. It should print the content of a web page, but it prints only the first 4 kb, then the page continues opening... and even if I press the stop button after more time, it doesn't print more than 4 kb. After waiting for more time for the page to finish loading, I can see the following error in the log file, even though the page continues loading... [Mon Sep 30 17:03:56 2002] [error] [client 127.0.0.1] Premature end of script headers: test.pl [Mon Sep 30 17:04:13 2002] [error] [client 127.0.0.1] (20507)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed Here is the script file I tried: #!/perl/bin/perl -w print Content-type: text/html\n\n; use strict; use IO::Socket; use URI; my $location = 'http://localhost'; my $url = new URI($location); my $host = $url-host; my $port = $url-port || 80; my $path = $url-path || /; my $socket = new IO::Socket::INET (PeerAddr = $host, PeerPort = $port, Proto= 'tcp') or die Cannot connect to the server.\n; $socket-autoflush(1); print $socket GET $path HTTP/1.1\n, Host: $host\n\n; print while ($socket); $socket-close; Teddy's Center: http://teddy.fcc.ro/ Mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What am I missing or doing wrong?
seems to work fine for me, but i tested it on a simple web page. Try removing the line $socket-autoflush(1); -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] Sent: Monday, September 30, 2002 11:08 AM To: [EMAIL PROTECTED] Subject: What am I missing or doing wrong? Hi all, I've taken the following example from a Perl book but it doesn't work well. It should print the content of a web page, but it prints only the first 4 kb, then the page continues opening... and even if I press the stop button after more time, it doesn't print more than 4 kb. After waiting for more time for the page to finish loading, I can see the following error in the log file, even though the page continues loading... [Mon Sep 30 17:03:56 2002] [error] [client 127.0.0.1] Premature end of script headers: test.pl [Mon Sep 30 17:04:13 2002] [error] [client 127.0.0.1] (20507)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed Here is the script file I tried: #!/perl/bin/perl -w print Content-type: text/html\n\n; use strict; use IO::Socket; use URI; my $location = 'http://localhost'; my $url = new URI($location); my $host = $url-host; my $port = $url-port || 80; my $path = $url-path || /; my $socket = new IO::Socket::INET (PeerAddr = $host, PeerPort = $port, Proto= 'tcp') or die Cannot connect to the server.\n; $socket-autoflush(1); print $socket GET $path HTTP/1.1\n, Host: $host\n\n; print while ($socket); $socket-close; Teddy's Center: http://teddy.fcc.ro/ 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]
RE: What am I missing or doing wrong?
Ok, lets troubleshoot this: Try it without the URI module and see what happens then. This trim it down to: -- use IO::Socket; my $host = 'localhost'; my $socket = new IO::Socket::INET (PeerAddr = $host, PeerPort = 80, Proto= 'tcp') or die Cannot connect to the server.\n; $socket-autoflush(1) print $socket GET /index.htm HTTP/1.0\n\n; while($socket){ print } close $socket; -Original Message- From: Kipp, James Sent: Monday, September 30, 2002 10:27 AM To: 'Octavian Rasnita'; [EMAIL PROTECTED] Subject: RE: What am I missing or doing wrong? seems to work fine for me, but i tested it on a simple web page. Try removing the line $socket-autoflush(1); -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] Sent: Monday, September 30, 2002 11:08 AM To: [EMAIL PROTECTED] Subject: What am I missing or doing wrong? Hi all, I've taken the following example from a Perl book but it doesn't work well. It should print the content of a web page, but it prints only the first 4 kb, then the page continues opening... and even if I press the stop button after more time, it doesn't print more than 4 kb. After waiting for more time for the page to finish loading, I can see the following error in the log file, even though the page continues loading... [Mon Sep 30 17:03:56 2002] [error] [client 127.0.0.1] Premature end of script headers: test.pl [Mon Sep 30 17:04:13 2002] [error] [client 127.0.0.1] (20507)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed Here is the script file I tried: #!/perl/bin/perl -w print Content-type: text/html\n\n; use strict; use IO::Socket; use URI; my $location = 'http://localhost'; my $url = new URI($location); my $host = $url-host; my $port = $url-port || 80; my $path = $url-path || /; my $socket = new IO::Socket::INET (PeerAddr = $host, PeerPort = $port, Proto= 'tcp') or die Cannot connect to the server.\n; $socket-autoflush(1); print $socket GET $path HTTP/1.1\n, Host: $host\n\n; print while ($socket); $socket-close; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pop-up window with database access
On Fri, 27 Sep 2002 14:43:50 -0400, [EMAIL PROTECTED] (Jim Lundeen) wrote: Hello, I'm creating a web site for our department at my school. We have a sign-up form for a society that people can join. I want to create a MySQL database of university names and allow the user to click on a Lookup button on the sign-up form when they get to the field University Affiliation and the pop-up window would then go out and get a list of universities in the database and allow them to select the university they are with, then the selected value would be put in the correct text box on the main page form. I would guess that JavaScript is involved, but I don't know. Any help (detailed help!) would be very much appreciated by many students and professors from around the world! If you have limited perl knowledge, it will take you some time to develope this yourself, maybe a month? You might be better off buying an existing package which does this.for instance http://www.gossamer-threads.com/scripts/dbman/index.htm P.S. Avoid javascript. It will cause you headaches. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pop-up window with database access
Avoid Javascript is a pretty far-reaching statement. If you want to launch a popup window, Perl isn't going to do that, Javascript is. It only takes one or two lines of client-side code. There are easy-to-follow Javascript primers at http://javascript.internet.com and http://www.htmlgoodies.com/primers/jsp/jsp_toc.html With regard to the database functionality, Perl and MySQL are powerful tools if you have the time and inclination to learn them. Good reading: 'Learning Perl', 'Perl in a Nutshell', 'CGI Programming with Perl' and 'Programming the Perl DBI' (all O'Reilly books). There is also an O'Reilly MySQL book but I forget the name of it. Actually the documentation that comes with the MySQL distribution is quite good. http://www.mysql.com/doc/en/index.html I also like the SAMS series of SQL books ('Teach Yourself SQL in ...'). This is really a time and learning curve issue. If you don't have much time, maybe an off-the-shelf CGI is the answer. But I think you'll probably get more benefit in the long run if you go through the steps of building it yourself. HTH, Scot R. inSite -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of zentara Sent: Monday, September 30, 2002 10:02 AM To: [EMAIL PROTECTED] Subject: Re: pop-up window with database access On Fri, 27 Sep 2002 14:43:50 -0400, [EMAIL PROTECTED] (Jim Lundeen) wrote: Hello, I'm creating a web site for our department at my school. We have a sign-up form for a society that people can join. I want to create a MySQL database of university names and allow the user to click on a Lookup button on the sign-up form when they get to the field University Affiliation and the pop-up window would then go out and get a list of universities in the database and allow them to select the university they are with, then the selected value would be put in the correct text box on the main page form. I would guess that JavaScript is involved, but I don't know. Any help (detailed help!) would be very much appreciated by many students and professors from around the world! If you have limited perl knowledge, it will take you some time to develope this yourself, maybe a month? You might be better off buying an existing package which does this.for instance http://www.gossamer-threads.com/scripts/dbman/index.htm P.S. Avoid javascript. It will cause you headaches. :-) -- 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]
Re: Planning Implementing a web project
On 28 Sep 2002 at 18:58, MMKHAJAH wrote: I have a fairly good experince with Perl. I can program under strict, do some OO and connect to databases. Up until this point I didn't do any real big script. So I wonder how to plan and implement big projects ( like web protal, discussion forum ). It sounds like you need to acquaint yourself with the project development lifecycle. Check out the current series of articles at DevShed http://www.devshed.com/Talk/Practices/. Good luck, William -- Lead Developer Knowmad Services Inc. || Internet Applications Database Integration http://www.knowmad.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Has Perl extra memory!?
Hi everybody! One of my program generates a HTML formulary whose number of checkboxes fluctuates (they are named mod_0, mod_1, mod_2, mod_3...etc). Therefore I need a loop in my other program which has to read the formulary : my $count ; for ($count=0; $count = $num; $count++) { my $mod = $cgi-param(mod_.$count) ? $cgi-param(mod_.$count) : ; if ($mod ne ) .etc ($num is the number (-1) of checkboxes and it is stocked in a hidden inputin the Web page) Unfortunately it seems that Perl memorises the values of these $mod_i and doesn't always execute the script with the values that are given to it!! I have tried differents ways of declaring these parameters (our, my, local, outside or inside the loop...etc) and there has always been the same problem. Basically the first formulary you fill is well executed, and after that there is no way to tell when it'll start to bug! Sometimes it executes the formulary you have filled three or four times before! I hope someone could help me with this, this problem is poisoning my programs! Ti Bruno -- Damien Delhomme [EMAIL PROTECTED]
Re: Has Perl extra memory!?
Sounds like a mod_perl problem. If you are using Apache::Registry apache will compile your script once and just keep running it until the child process dies. This means that any global variables you pass to it will stay in scope. How is your script being called? R At 17:45 30/09/2002 +0200, Damien Delhomme wrote: Hi everybody! One of my program generates a HTML formulary whose number of checkboxes fluctuates (they are named mod_0, mod_1, mod_2, mod_3...etc). Therefore I need a loop in my other program which has to read the formulary : my $count ; for ($count=0; $count = $num; $count++) { my $mod = $cgi-param(mod_.$count) ? $cgi-param(mod_.$count) : ; if ($mod ne ) .etc ($num is the number (-1) of checkboxes and it is stocked in a hidden inputin the Web page) Unfortunately it seems that Perl memorises the values of these $mod_i and doesn't always execute the script with the values that are given to it!! I have tried differents ways of declaring these parameters (our, my, local, outside or inside the loop...etc) and there has always been the same problem. Basically the first formulary you fill is well executed, and after that there is no way to tell when it'll start to bug! Sometimes it executes the formulary you have filled three or four times before! I hope someone could help me with this, this problem is poisoning my programs! Ti Bruno -- Damien Delhomme [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pop-up window with database access
On Mon, 30 Sep 2002 10:28:51 -0500, [EMAIL PROTECTED] (Scot Robnett) wrote: Avoid Javascript is a pretty far-reaching statement. If you want to launch a popup window, Perl isn't going to do that, Javascript is. It only takes one or two lines of client-side code. There are easy-to-follow Javascript Yeah, you are right. But alot of people keep javascript disabled, so if you design your site expecting people to use it, you will be dissapointed. I've turned off pop-up javascript windows in my mozilla preferences because there are so many annoying pop-ads now. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pop-up window with database access
Define a lot of people. I use Pop-Up Stopper myself, but when there is a popup window that I *want* to see, I can CTRL-click the link. I don't have to turn Javascript off. Most browsers are preconfigured to allow Javascript and the user or the company has to explicitly turn it off. I agree that it's probably going to cover more ground if he keeps the user experience within the main browser window. 95% of the clients I deal with still have Javascript enabled. But 100% of them can see what's going on in their browser, so you have a point. I guess it depends how important the pop-up function is to the project. Perl and MySQL are quite capable of handling the back end, but they're not going to manage this function. Scot R. inSite -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of zentara Sent: Monday, September 30, 2002 11:30 AM To: [EMAIL PROTECTED] Subject: Re: pop-up window with database access On Mon, 30 Sep 2002 10:28:51 -0500, [EMAIL PROTECTED] (Scot Robnett) wrote: Avoid Javascript is a pretty far-reaching statement. If you want to launch a popup window, Perl isn't going to do that, Javascript is. It only takes one or two lines of client-side code. There are easy-to-follow Javascript Yeah, you are right. But alot of people keep javascript disabled, so if you design your site expecting people to use it, you will be dissapointed. I've turned off pop-up javascript windows in my mozilla preferences because there are so many annoying pop-ads now. -- 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]
Re: Has Perl extra memory!?
The only modules I use are : use CGI; use DBI; use HTML::Template; use Data::Dumper; (I am not the original programmer, I'm trying to make it work!) My script is called by a file .xml with : !--#exec cgi=/perl/interne/annuaire/assoces_modif.pl -- Thank you for your quick answer! - Original Message - From: Robin Cragg [EMAIL PROTECTED] To: Damien Delhomme [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 30, 2002 5:52 PM Subject: Re: Has Perl extra memory!? Sounds like a mod_perl problem. If you are using Apache::Registry apache will compile your script once and just keep running it until the child process dies. This means that any global variables you pass to it will stay in scope. How is your script being called? R At 17:45 30/09/2002 +0200, Damien Delhomme wrote: Hi everybody! One of my program generates a HTML formulary whose number of checkboxes fluctuates (they are named mod_0, mod_1, mod_2, mod_3...etc). Therefore I need a loop in my other program which has to read the formulary : my $count ; for ($count=0; $count = $num; $count++) { my $mod = $cgi-param(mod_.$count) ? $cgi-param(mod_.$count) : ; if ($mod ne ) .etc ($num is the number (-1) of checkboxes and it is stocked in a hidden inputin the Web page) Unfortunately it seems that Perl memorises the values of these $mod_i and doesn't always execute the script with the values that are given to it!! I have tried differents ways of declaring these parameters (our, my, local, outside or inside the loop...etc) and there has always been the same problem. Basically the first formulary you fill is well executed, and after that there is no way to tell when it'll start to bug! Sometimes it executes the formulary you have filled three or four times before! I hope someone could help me with this, this problem is poisoning my programs! Ti Bruno -- Damien Delhomme [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pop-up window with database access
On Mon, 30 Sep 2002 11:47:37 -0500, [EMAIL PROTECTED] (Scot Robnett) wrote: Define a lot of people. I just did a quick google search for javascript statistics, and most of the surveys show somewhere between 10% and 15 % of people have disabled javascript. I guess it depends how important the pop-up function is to the project. Perl and MySQL are quite capable of handling the back end, but they're not going to manage this function. Well you can design your page to not need javascript. Like use frames, with a small frame for you to display your pop-up data in, keep some nice logo in there otherwise. Or you can always just pop open a new browser windowit isn't as cute and a tiny window, but it will always work. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pop-up window with database access
Jim Lundeen wrote: Hello, I'm creating a web site for our department at my school. We have a sign-up form for a society that people can join. I want to create a MySQL database of university names and allow the user to click on a Lookup button on the sign-up form when they get to the field University Affiliation and the pop-up window would then go out and get a list of universities in the database and allow them to select the university they are with, then the selected value would be put in the correct text box on the main page form. I would guess that JavaScript is involved, but I don't know. Any help (detailed help!) would be very much appreciated by many students and professors from around the world! Jimmy James yeah. javascript seems like a good choice for this kind of client side pop-up window stuff. :-) i don't know how much help we can provide here unless you tell us at least what have you try. what your plan is. any problems(be specific) you encounter. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Has Perl extra memory!?
Damien Delhomme wrote at Mon, 30 Sep 2002 18:48:01 +0200: The only modules I use are : use CGI; use DBI; use HTML::Template; use Data::Dumper; (I am not the original programmer, I'm trying to make it work!) My script is called by a file .xml with : !--#exec cgi=/perl/interne/annuaire/assoces_modif.pl -- I don't know much about this xml feature, but I could imagine that it works like a calling from the command line. In this context, the CGI module will (perhaps) try to read the parameters from STDIN, what should really block your script. Excuse, but as I'm realling lacking in the xml knowledge, I just can't help you how to really solve the problem :-(( Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Has Perl extra memory!?
My script is called by a file .xml with : !--#exec cgi=/perl/interne/annuaire/assoces_modif.pl -- I don't know much about this xml feature, but I could imagine that it works like a calling from the command line. In this context, the CGI module will (perhaps) try to read the parameters from STDIN, what should really block your script. Does STDIN stand for Standard IN ? To be honest I am not familiar with it and I don't know how it could block my script. But I don't really think the fact that this is a XML file and not a HTML file is linked to the problem. In fact a lot a my scripts are called like that, and the prolem occured only with this program. Maybe the use of this loop put forward an error that I may have made in all of my scripts but which only has bad consequences in this case. I'm glad everybody answer that way, I thought I would have to wait a week before someone finally read my e-mail! I would have done it before if I had known! Ti Bruno -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Looking for the Sendmail.pm for Appache ver 1.3
http://search.cpan.org/author/MIVKOVIC/Mail-Sendmail-0.78/Sendmail.pm This has absolutely nothing to do with your Apache version. http://danconia.org Bruce Ambraal wrote: Hi all, Could any one send of tell where I could find this Module. thanks in advance. Bruce -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]