Re: Where to store uploads
I handle files with a db pointer. Works really good for me. I house all of the files on a "static" server and put pointers in the DB. Then I just update the DB with new pointers or remove pointers as needed. When looking up a file I request the DB file pointer then use that info to grab it from the static server. Works like a charm. -bop On Jul 3, 2007, at 9:34 AM, Clinton Gormley wrote: On Tue, 2007-07-03 at 10:26 -0400, Perrin Harkins wrote: On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: 1) In the DB, store the name of the server to which your file has been uploaded I try to avoid files in the DB. It always ends in tears. Sorry - I meant, store this in the DB: - ID: 1234 - type:image/jpeg - path:12/34/1234.jpg - server: images1.domain.com So that your program would construct a URL pointing to the correct server, or a translation layer would forward the request to the correct server 2) Store your upload in a shared partition (eg on a SAN, NFS, iSCSI/OCFS2) That's ok if you need them on every server. Many applications just upload a file and process it on one server, so they don't need this. Sure - I was thinking primarily of image hosting. thanks Clint - Perrin
ModPerl on Apache 2.2 not suitable for Windows platform
Hi all, This is a summarised follow-up on my earlier post detailing my concerns with modperl on Apache2.2 (with the latest installations of ActivePerl + modperl) not being to restart gracefully. In other words, during a restart it crashed and stopped. I have received similar observations from Randy Kobes. If there is someone who figured a way to resolve, hope to hear from you. In the meantime, modperl on Apache 2.2 (in Win32 environment) seems to be more stable so far. Hope this helps.
Re: First time being here, Need Big help here!
In the sentence "> Do note that modperl1" is that mod_perl 1.x or is that an extra 'el'? i assume mod_perl 2 works with apache 2.x On Mon, 09 Jul 2007 11:11:13 +0800 [EMAIL PROTECTED] wrote: > I doubt. Apache2 is a major overhaul. You're better off installing > apache2 or 2.2 from scratch. > > Do note that modperl1 is not compatible with apache 2. > > Xin Chen wrote: > > Can I just update from apache1.3 to apache 2, and modperl 2 ? I will > > try this. > > Thanks! > > > > Foo JH wrote: > > > >> I'm not too good with Debian either, but since you're installing a > >> new OS, my guess is you can also choose the version of the > >> applications as well. > >> > >> Try installing Apache 2 or 2.2 with modperl 2, instead of Apache 1.3 > >> + modperl. The latter is running on legacy support now. > >> > >> Xin Chen wrote: > >> > >>> Hi All, > >>> > >>> Finally I find this place, I think it is the right place for me to > >>> solve this issue, here it is: > >>> > >>> My system: VMware Virtual System: > >>> > >>> brainzvm:~# uname -a > >>> Linux brainzvm 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 > >>> GNU/Linux > >>> apache-perl 1.3 web server > >>> Debian Linux > >>> > >>> I got the following errors when I was trying to setup a debian web > >>> server. > >>> > >>> [Thu Jul 5 18:53:42 2007] [error] Undefined subroutine > >>> &MusicBrainz::Server::Handlers::WS::1::Auth::handler called.\n > >>> Cache MISS on istagger-192.168.11.1 at > >>> > /home/httpd/musicbrainz/mb_server/cgi-bin/MusicBrainz/Server/Handlers.pm > >>> line 274 > >>> [Thu Jul 5 18:53:43 2007] [error] Can't locate > >>> Apache/AuthDigest/API.pm in @INC (@INC contains: > >>> /home/httpd/musicbrainz/mb_server/cgi-bin /etc/perl > >>> /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 > >>> /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 > >>> /usr/local/lib/site_perl /usr/local/lib/perl/5.8.7 > >>> /usr/local/share/perl/5.8.7 . /etc/apache-perl/ > >>> /etc/apache-perl/lib/perl) at > >>> > /home/httpd/musicbrainz/mb_server/cgi-bin/MusicBrainz/Server/Handlers/W > S/1/Auth.pm > >>> line 32.\nBEGIN failed--compilation aborted at > >>> > /home/httpd/musicbrainz/mb_server/cgi-bin/MusicBrainz/Server/Handlers/W > S/1/Auth.pm > >>> line 32.\nCompilation failed in require at (eval 239) line 3.\n > >>> > >>> Then I tried to install Apache::AuthDigest. > >>> #cpan > >>> #install Apache::AuthDigest > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1121: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1140: > >>> error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' > >>> token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1141: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1142: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1143: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1147: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1149: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1150: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1155: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1156: > >>> error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' > >>> token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1157: > >>> error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' > >>> token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1160: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1161: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1165: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1170: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1173: > >>> error: expected declaration specifiers or '...' before 'server_rec' > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1174: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1175: > >>> error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' > >>> token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1267: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1269: > >>> error: expected ')' before '*' token > >>> /usr/lib/perl5/auto/Apache/include/modules/perl/m
Re: First time being here, Need Big help here!
Don't understand what you mean. To rephrase myself: Apache 1.3 uses modperl 1 Apache 2.0 and 2.2 uses modperl 2 Does this help? [EMAIL PROTECTED] wrote: In the sentence "> Do note that modperl1" is that mod_perl 1.x or is that an extra 'el'? i assume mod_perl 2 works with apache 2.x On Mon, 09 Jul 2007 11:11:13 +0800 [EMAIL PROTECTED] wrote: I doubt. Apache2 is a major overhaul. You're better off installing apache2 or 2.2 from scratch. Do note that modperl1 is not compatible with apache 2
DBI and threaded MPM
http://perl.apache.org/docs/2.0/user/performance/mpm.html#Work_with_DataBases_under_Threaded_MPM I'm looking into a problem we're experiencing (lots of netword connections) and I think the answer lies with Apache::DBI and the version of mod_perl we're using. A few questions, does anyone know of the state of DBI::Pool? If anyone is using threaded MPM and Apache::DBI, how are they dealing with sharing the the connection within the threads? I'm looking at Thread::Sociable (preference) and threads::shared and I'm looking for tips and/or defacto stds used at the time of writing. Any tips would be great while I continue playing with threads and searching for other info. CIA -Ants - Yahoo! Answers - Get better answers from someone who knows. Tryit now.
Re: DBI and threaded MPM
On Jul 9, 2007, at 9:12 AM, Anthony Gardner wrote: http://perl.apache.org/docs/2.0/user/performance/ mpm.html#Work_with_DataBases_under_Threaded_MPM I'm looking into a problem we're experiencing (lots of netword connections) and I think the answer lies with Apache::DBI and the version of mod_perl we're using. A few questions, does anyone know of the state of DBI::Pool? If anyone is using threaded MPM and Apache::DBI, how are they dealing with sharing the the connection within the threads? I'm looking at Thread::Sociable (preference) and threads::shared and I'm looking for tips and/or defacto stds used at the time of writing. Any tips would be great while I continue playing with threads and searching for other info. Some people here ( not including me though ) are using connect_cached in DBI , and bypassing Apache::DBI altogether. you might want to try that. correct me if i'm wrong.. but i believe you want to not share dbi connections between threads. wouldn't you need a factory class to toss you a fresh connect ? if you want to do true connection pooling, you'd be best off with something like sqlrelay or pgpool. the apache::dbi/dbi cached don't really pool; they just override connects for established connections on their process and reuse them. things like sqlrelay/pgpool will let you use 50 db connections for 150 server processes ( by blocking a lot, yes ) // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | CEO/Founder SyndiClick Networks | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Founder/CTO/CVO | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Re: DBI and threaded MPM
On 7/9/07, Anthony Gardner <[EMAIL PROTECTED]> wrote: I'm looking into a problem we're experiencing (lots of netword connections) and I think the answer lies with Apache::DBI and the version of mod_perl we're using. Can you explain a little more about what the problem is and why you think it involves Apache::DBI? A few questions, does anyone know of the state of DBI::Pool? There is no working version of it, but Stas did write some code which someone else could pick up if they were interested. If anyone is using threaded MPM and Apache::DBI, how are they dealing with sharing the the connection within the threads? No one is doing that. It is not possible without doing some work on every DBD module that is going to be supported. I'm looking at Thread::Sociable (preference) and threads::shared and They won't work because DBD modules carry around XS structures which don't know anything about perl threads. That's the problem DBI::Pool was trying to address. May I ask why you're using a threaded MPM? Unless you're running on Windows, you should probably avoid it. The threaded MPM uses a lot more memory than the prefork one. - Perrin
Re: First time being here, Need Big help here!
Xin, I have run Apache with Debian and I do recommend (if it's not too late) to uninstall Apache 1.3 and modperl 1 before installing Apache 2.x and modperl 2. They seem to install in different directories, but if you're not too attached to the old version, it'll save you headaches later (i.e., finding files, etc.) Ray Foo JH wrote: Don't understand what you mean. To rephrase myself: Apache 1.3 uses modperl 1 Apache 2.0 and 2.2 uses modperl 2 Does this help? [EMAIL PROTECTED] wrote: In the sentence "> Do note that modperl1" is that mod_perl 1.x or is that an extra 'el'? i assume mod_perl 2 works with apache 2.x On Mon, 09 Jul 2007 11:11:13 +0800 [EMAIL PROTECTED] wrote: I doubt. Apache2 is a major overhaul. You're better off installing apache2 or 2.2 from scratch. Do note that modperl1 is not compatible with apache 2
Re: First time being here, Need Big help here!
Yes - thanks. On Mon, 09 Jul 2007 17:26:15 +0800 [EMAIL PROTECTED] wrote: > Don't understand what you mean. To rephrase myself: > > Apache 1.3 uses modperl 1 > Apache 2.0 and 2.2 uses modperl 2 > > Does this help? > > [EMAIL PROTECTED] wrote: > > In the sentence "> Do note that modperl1" is that mod_perl 1.x or is > that an > > extra 'el'? i assume mod_perl 2 works with apache 2.x > > > > > > On Mon, 09 Jul 2007 11:11:13 +0800 [EMAIL PROTECTED] wrote: > > > >> I doubt. Apache2 is a major overhaul. You're better off installing > >> apache2 or 2.2 from scratch. > >> > >> Do note that modperl1 is not compatible with apache 2 > >