Re: Trouble getting mod_perl and apache running with Apache::DBI
On Sun, 2003-08-17 at 11:41, Perrin Harkins wrote: On Fri, 2003-08-15 at 10:34, K Old wrote: What's happening is that with use Apache::DBI uncommented in either the httpd.conf or startup.pl Apache does not start. Do you have something in your code that connects to a database during startup? That could be a problem. Also, what's the point of use vars qw($dbh %session); in your startup.pl? Do you actually know what package these are being declared in? Probably not one that you will be using later in your scripts. - Perrin Hello everyone, Just wanted to post the solution I ran across so that others have a resource (and when I forget again, I'll have somewhere to look ;) My problem was that I was not declaring PerlModule Apache::DBI in httpd.conf BEFORE my PerlRequire /etc/httpd/conf/startup.pl. Also, I was doing a use Apache::DBI in my startup.pl file, which I shouldn't have done. Hope this helps someone, Kevin -- K Old [EMAIL PROTECTED] -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Trouble getting mod_perl and apache running with Apache::DBI
On Mon, 2003-08-18 at 11:33, K Old wrote: My problem was that I was not declaring PerlModule Apache::DBI in httpd.conf BEFORE my PerlRequire /etc/httpd/conf/startup.pl. Also, I was doing a use Apache::DBI in my startup.pl file, which I shouldn't have done. Sorry, that is not correct. It's fine to do PerlModule Apache::DBI or do a use Apache::DBI in startup.pl. You should not do both of them, and you should make sure you load Apache::DBI in one of these ways before loading anything that uses DBI. This is all in the Apache::DBI documentation. - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
issues compiling the DBD::mysql
Title: issues compiling the DBD::mysql I'm having issues compiling the DBD::mysqlhopefully someone will have some insight. Box - mysql 4.0.14/perl 5.8.0/modperl1.28/apache1.38/DBI 1.37 At first installing via cpan or source would bomb during perl makefile without finding the mysql_config script. I installed mysql 4.0.14 via rpmmysql_config script didn't install; although it is working properly. So then I downloaded and untare mysql-standard-4.0.14-pc-linux-i686 and found the missing script in ../mysql-standard-4.0.14-pc-linux-i686/bin/mysql_config. After copying the script into my /usr/bin/ I find the make file gets created, but the make is bombing out with the following: Using DBI 1.37 installed in /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto Writing Makefile for DBD::mysql lamp:/home/jhodge/dloads/ap_mp/DBD-mysql-2.9002 # make cc -c -I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI -I -DPERL_Y2KW-DPERL_POLLUTE_MALLOC -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOU-D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\2.9002\ -DXS_VERSION=\2.9002\ -fpic usr/local/lib/perl5/5.8.0/i686-linux/CORE dbdimp.c In file included from dbdimp.c:29: dbdimp.h:31: mysql.h: No such file or directory dbdimp.h:32: errmsg.h: No such file or directory make: *** [dbdimp.o] Error 1 lamp:/home/jhodge/dloads/ap_mp/DBD-mysql-2.9002 # perl Makefile.PL --cflags -I /bin/ -L /usr/lib/ I will use the following settings for compiling and testing: cflags (Users choice) = -I libs (Users choice) = /usr/lib/ nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testuser (default ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Unrecognized argument in LIBS ignored: '/usr/lib/' Using DBI 1.37 installed in /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto Writing Makefile for DBD::mysql lamp:/home/jhodge/dloads/ap_mp/DBD-mysql-2.9002 # make cc -c -I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI -I -DPERL_Y2KW-DPERL_POLLUTE_MALLOC -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOU-D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\2.9002\ -DXS_VERSION=\2.9002\ -fpic usr/local/lib/perl5/5.8.0/i686-linux/CORE dbdimp.c In file included from dbdimp.c:29: dbdimp.h:31: mysql.h: No such file or directory dbdimp.h:32: errmsg.h: No such file or directory make: *** [dbdimp.o] Error 1 Does anybody have any suggestions? I'm also thinking of compileing the source from mysql-standard-4.0.14-pc-linux-i686 and try to re-build mysql first. Although mysql is running, so this might be the wrong thing to do thanks, JH
Re: issues compiling the DBD::mysql
Hodge, Jeff F (ECIII) wrote: I'm having issues compiling the DBD::mysqlhopefully someone will have some insight. certainly, but at the dbi-users list, not here: http://lists.perl.org/showlist.cgi?name=dbi-users __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Coding Style Question - Using exit
Folks, In the continuing effort to make my code better, I'm trying to get rid"exit" in my scripts and clean up some things that just don't sit well (but they work). Almost 95% of my pages are served up via a template system (H::T) and the rest are a redirects. Currently I use a subroutine that all my other subs pass content to, to display my templates- at the end of this sub I call "exit" so I do not go any further. In the case where I want to redirect to a URL, I then "return" to the handler with the URL. Although it works, it doesn't seem right to me.. Example To Help Explain: sub handler {$r = shift; init_global_vals(); $back_url = determine_proper_action(); my $back_url = "";$r-headers_out-set(Location = $back_url);return Apache::REDIRECT; } "Determine proper action" is a dispatch list of all the subroutines that make up the script, including the sub where I display the templates and exit. So for almost 95% of my requests, I'm "exiting" within determine_proper_action(). Does that make sense? Is it a bad thing? Thanks -Chris
Apache::DBI
What's the diference between DBI and Apache::DBI? -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Apache::DBI
On Mon, 18 Aug 2003, wrote: Date: Mon, 18 Aug 2003 16:57:13 -0700 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Apache::DBI What's the diference between DBI and Apache::DBI? Have you bothered to read the docs at all? http://search.cpan.org/author/TIMB/DBI-1.37/DBI.pm http://search.cpan.org/author/ABH/Apache-DBI-0.92/DBI.pm ky -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
ANNOUNCE: OpenInteract 1.60 released
A new version (1.60) of OpenInteract has been released. OpenInteract is an extensible web application server built on Apache, mod_perl, the Template Toolkit and SPOPS object persistence. This release includes a handful of fairly small enhancements, including the ability to force everyone to login before seeing any part of your site. HTTP redirects (vs. using icky META tags in HTML) are also supported, and under certain circumstances we now force the Apache child into a premature death. Source: http://prdownloads.sourceforge.net/openinteract/OpenInteract-1.60.tar.gz?download Detailed changes: http://sourceforge.net/project/shownotes.php?release_id=178076 It's also winging its way around CPAN. Thanks! Chris PS: Most of these changes were actually in 1.59 but 1.60 was a release of the oops-fifteen-minutes-later variety. -- Chris Winters ([EMAIL PROTECTED]) Building enterprise-capable snack solutions since 1988. -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html