Re: top for apache? [OT]
On Sat, 21 Sep 2002, Nigel Hamilton wrote: > to see the number of children and then make guestimates of > average per child memory consumption. I'm not sure what the equivalent for other operating systems is, but here's a Solaris tip for the archives... we use /usr/proc/bin/pmap to determine memory consumption: for p in `pgrep httpd`; do /usr/proc/bin/pmap -x $p | tail -1; done pmap gives you the total memory usage, amount actually resident, amount shared, and the amount not shared (private). - Kyle
Re: Error compiling mod_perl/1.27/Apache-1.3.26/Perl-5.8.0 for NativeWin32
On Sun, 22 Sep 2002, Issac Goldstand wrote: > I keep getting the following error when compiling mod_perl under MS-Dev-6.0 > > Constants.xs(158) : error C2065: 'errno' : undeclared identifier > > It's the only compilation error I'm stuck on, but I've been stuck for 2 > weeks now... Everything is natively built for Win32 from source (read: no > activestate, no binary packages) > > HELP!!! (I'm not going to include other files in this post, as I have no > idea what is needed - it's my first production Win32 Apache/Perl system and > I'm floundering a lot during compilation) > > Issac I don't have this problem with the cvs mod_perl sources - maybe try giving those a shot. -- best regards, randy kobes
Error compiling mod_perl/1.27/Apache-1.3.26/Perl-5.8.0 for Native Win32
I keep getting the following error when compiling mod_perl under MS-Dev-6.0 Constants.xs(158) : error C2065: 'errno' : undeclared identifier It's the only compilation error I'm stuck on, but I've been stuck for 2 weeks now... Everything is natively built for Win32 from source (read: no activestate, no binary packages) HELP!!! (I'm not going to include other files in this post, as I have no idea what is needed - it's my first production Win32 Apache/Perl system and I'm floundering a lot during compilation) Issac - Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, just as is mankind. --Unknown
Confused
Hi I am just messing around with Perl DBI/Apache and I can't seem to understand this problem. Right now I am just trying to write a simple CGI perl script that just displays a mysql query. I am using this code... #!/usr/bin/perl -w use DBI;use CGI qw(fatalsToBrowser); print CGI::header();print "Testing";print "Teams list"; my $dbh = DBI->connect("dbi:mysql:hello:localhost:3306", "root", "");my $sth1 = $dbh->prepare("select * from team1"); $sth1->execute();while(my $team = $sth1->fetchrow_array()){ print "$team\n";} $dbh->disconnect; -- Now when I run the file from a shell it queries the database properly and everything prints out fine. The problem is when I put this file in cgi-bin and try to execute it via www I am getting an error and this is what the apache error_log is saying... [Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] Premature end of script headers: football.pl[Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] Can't locate loadable object for module DBI in @INC (@INC contains: /usr/local/lib/perl5/5.8.0/i686-linux /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 243[Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 243.[Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] Compilation failed in require at /usr/local/apache2/cgi-bin/football.pl line 3.[Sat Sep 21 18:21:08 2002] [error] [client 10.0.0.2] BEGIN failed--compilation aborted at /usr/local/apache2/cgi-bin/football.pl line 3. Regular perl scripts (non DBI) run fine so I don't know if there is something special didn't set up. I am running the latest stable apache2 and mod_perl. I installed Apache::DBI as well and the README says "For Apache::DBI you need to enable the appropriate call-back hooks when making mod_perl: perl Makefile.PL PERL_CHILD_INIT=1 PERL_STACKED_HANDLERS=1." I tried that but the latest mod_perl doesn't recognize those parameters. Maybe that could have something to do with it? I am sorry if this is an obvious answer (IE I didn't read the FAQs thoroughly enough) but I am new to this stuff and some of that info can be overwhelming at times. Also I hope this is the right mailing list because it seems to be a mod_perl related problem Thanks, Rich [EMAIL PROTECTED]
Re: Apache::Session and user sessions
Todd W wrote: > Im looking at Apache::Session and trying to figure out what it does. It provides shared storage of a hash of data, and gives you a unique ID that you can tie to a user. > From what I > can tell, Apache::Session will only give generic sessions, of which I know > nothing about the user untill they give me information during that > particular session. It's just a storage mechanism. Typically the procedure is that one a user identified herself with some kind of login process, you put her user ID (a primary key to a database table) into the session, and keep it as a key for accessing that data. > I have a table with some basic user information (first name, last name, > address, > phone number, etc...). That's permanent data, not session data. Session data is transient. > What i did was created the two columns, and hoped it would work without > the id column being the primary key. It won't. All of the Apache::Session data is in a blob in the a_session column. It has no access to the other columns. > So now Trying to decide what to do, in a perlHeaderParserHandler Ill > just get an > id from Sys::UniqueID, send it to the browser each request in a cookie or > whatever, then use DBI::Tie to reinstate the session for each request. > (Thinking about it, that sounds easier than Apache::Session anyways) Isn't your user table referenced by a user ID? You have to connect the user ID to a browser somewhere. The normal way to do this is give the browser an ID (the session ID) and then store the relationship with Apache::Session. If you have no other transient data besides the user ID, you can skip Apache::Session and just send a user ID cookie. Make sure you have security in place to prevent people from simply entering another user ID in their cookie and gaining access to another person's information. By the way Tie::DBI is slow. Writing some kind of module for accessing your specific user table would be faster. - Perrin
Re: top for apache? [OT]
Nigel Hamilton wrote: > It would be great to have a similar tool for mod_perl/apache. The closest thing available is a combination of mod_status and Apache::Status. If you haven't tried these yet, give them a shot. They provide a good deal of information. - Perrin