MySQL, file upload, file size

2002-03-01 Thread Gregor Mosheh, B.S.

I'm using file upload fields, and submitting the MIME-encoded version of the
file contents to a MySQL database. If I try to upload a file larger than
about 500kB, the DB insertion fails and I get this in the Apache error_log:

DBD::mysql::st execute failed: MySQL server has gone away at
/usr/local/apache-dev/ultraform-lib/UltraForm2.pm line 496,
 chunk 3772.

When I connect to the server and use \s, the uptime and connection ID show
no indication that the MySQL server crashed or otherwise "went away".

What steps do I take to solve this?





Re: PerlSendHeader

2001-11-20 Thread Gregor Mosheh


Thanks, Tom. Yep, this does the job just fine and allows me to send
the Content-type later:
   print "HTTP/1.1 OK\n";

Is ignoring PerlSendHeader considered a feature? ;)

-gm


On Tue, 20 Nov 2001, Tom Mornini wrote:
> This took me a LONG time to deal with when I was new to mod_perl...
> 
> Apache::Registry tries to be smart regardless of PerlSendHeader.
> 
> If it doesn't see "HTTP/1.x OK" first, out come the headers.
> 
> Two options:
> $r->response(200);
> $r->send_http_header('text/html')
> 
> or print the HTTP line...
> 
> On Tuesday, November 20, 2001, at 04:17 PM, Gregor Mosheh wrote:
> 
> >
> > I need mod_perl to not send the Content-type header when a program is
> > run. Despite the "Off" value of the "PerlSendHeader" variable in
> > httpd.conf, the header is still being sent.
> >
> > This test program still sends an extraneous Content-type header:
> >print "Content-type: text/html\n\n";
> >print "Hello World\n";
> >
> > Here's the relevant portion of the httpd.conf:
> > # mod_perl initialization
> > PerlRequire /usr/local/apache-dev/ultraform-lib/startup.pl
> > PerlModule Apache::DBI DBD::mysql
> > #PerlSetEnv key value
> > PerlTaintCheck Off
> > PerlWarn On
> > PerlFreshRestart On
> > PerlSetVar UndefOnReload On
> > PerlSendHeader Off
> > 
> > AllowOverride None
> > Options ExecCGI
> > Order allow,deny
> > Allow from all
> > SetHandler perl-script
> > PerlHandler Apache::Registry
> > PerlSendHeader Off
> > 
> >
> >
> >
> > --
> > Gregor Mosheh, B.S. http://www.blackangel.net/
> >
> >As we enjoy great advantages from inventions of others, we
> >should be glad of an opportunity to serve others by any
> >invention of ours; and this we should do freely and generously.
> >   -- Benjamin Franklin
> >
> >
> >
> --
> -- Tom Mornini
> -- InfoMania Printing & Prepress
> 


--
Gregor Mosheh, B.S. http://www.blackangel.net/

   As we enjoy great advantages from inventions of others, we
   should be glad of an opportunity to serve others by any
   invention of ours; and this we should do freely and generously.
  -- Benjamin Franklin






PerlSendHeader

2001-11-20 Thread Gregor Mosheh


I need mod_perl to not send the Content-type header when a program is
run. Despite the "Off" value of the "PerlSendHeader" variable in
httpd.conf, the header is still being sent.

This test program still sends an extraneous Content-type header:
   print "Content-type: text/html\n\n";
   print "Hello World\n";

Here's the relevant portion of the httpd.conf:
# mod_perl initialization
PerlRequire /usr/local/apache-dev/ultraform-lib/startup.pl
PerlModule Apache::DBI DBD::mysql
#PerlSetEnv key value
PerlTaintCheck Off
PerlWarn On
PerlFreshRestart On
PerlSetVar UndefOnReload On
PerlSendHeader Off

AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader Off




--
Gregor Mosheh, B.S. http://www.blackangel.net/

   As we enjoy great advantages from inventions of others, we
   should be glad of an opportunity to serve others by any
   invention of ours; and this we should do freely and generously.
  -- Benjamin Franklin






Hangs / Out of memory

2001-04-05 Thread Gregor Mosheh, Programmer


VERSIONS
The problem exists with various combinations. The ones I'm currently
testing are:
Apache 1.3.12+mod_perl 1.17+perl 5.5.3
Apache 1.3.14+mod_perl 1.3.24+Perl 5.6.0

PROBLEM / SYMPTOMS

The combination of Apache 1.3.12 + mod_perl 1.27 + perl 5.5.3 is working
beautifully on our existing server, which is running Solaris 2.6.

This same combination, as well as combinations of newer versions of each
package, does not work on the new server, which is running Solaris 2.8

Very often, but not with 100% reliability, a mod_perl program will either
A) generate an "Out of memory!/Callback called exit." error in the
error_log or B) simply hang without generating any messages at all. 
Whichever failure mode happens (or if it works), it sticks with for
several hours at a time. e.g. If it hangs now, I can hit it in a moment
and be assured that it will hang again and not work or generate the
message. 

I followed the advice in the mod_perl_traps, regarding
PERL_EMERGENCY_SBRK, and it made absolutely no difference at all.


This is driving myself and my co-workers crazy, cuz it's delaying our
migration to the new server. Ideas?

--
Gregor Mosheh, B.S.
Programmer, CargoTel