Errors in my scripts cause apache getting strange...

2003-09-12 Thread Anton Permyakov
Hi all,

I use Apache 1.3.26, mod_perl 1
I use Apache directive

ErrorDocument 500 /error500.html

So, if any errors occure, my web-site inform it in nice form (showing page
/error500.html).

But suddenly i change something in my scripts and now, when error happens,
Apache do not give me /error500.html page, but instead of it apache gets
output like this:

Л
IkЙHё{бЕ9`▒с╩з<К╪ГжИъz4>'7ч╫г!?INдЖяn╞гЫёРЮзйеIE~G┼у!эh?Рr▌Йx╠К╘┤C
OЗх|┬╣!─<

and so on
My browser tries to save or open it (it means ContentType is not text/html)

It happens whith errors like this:

[Fri Sep 12 17:16:16 2003] [error] Can't call method "commit" on an
undefined value at /usr/local/apache-new/htdocs/lib/perl/Model/profile.pl
line 94.

it seems like usual error...

What does it mean?
Where is the reason? I want apche to show me /error500.html again on errors!

Thanks,
Anton Permyakov.




Re: Apache::Session extra record not write to Mysql db.

2003-09-02 Thread Anton Permyakov
> > > $session{'time'} = time();## this updates 'time' record
> >
> > But it doesn't update the time column in the database unless you hacked
> > the Apache::Session code to do that.
> >
>
> now i don't know why the time record gets updated. isn't it suppose to
update the one in
> a_session?

I guess 'time' field gets updated because of it is 'timestamp' type, isn't
it?
MySQL has this type for automatically updated field with current date and
time (RTFM :)).

Best wishes,
Anton Permyakov.





-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Shared memory 'copy-on-write' issue

2003-01-10 Thread Anton Permyakov
Hi all,

reading
http://perl.apache.org/docs/1.0/api/Apache/SizeLimit.html#Shared_Memory_Opti
ons
i am seeing that link about memory sharing by copy-on-write points to
http://perl.apache.org/docs/1.0/guide/index.html
and
'META: change link when site is live' stands after it.

Site is alive, how knows where should this link point to?

Thanks,
Anton Permaykov.




Forking process

2002-10-09 Thread Anton Permyakov

Hi all,

I need to start process, which would get big amount of data from another
server into my DataBase,
and while it will do it, my browser should show me progress-bar on this data
extraction.

I have mod_perl based web-server, so, i should not use fork(), as explained
in Mod_perl docs. But also i cannot invoke system(), as this proccess could
take very long time.
What i have to do?

May be best solution is using CGI-script, which allows forking without all
Apache process forking?

Thank you,

Best wishes!

Anton Permyakov   Web-Developer
[EMAIL PROTECTED]   WWW.SOLUDIUM.COM




handler invoking problems

2002-09-05 Thread Anton Permyakov

I install apache 1.3.26 / modperl 1.27 with model_rewite module, but apache
doesn't call my handler subroutine (i use Apache::PageKit) for root in my
htdocs/:
Request http://localhost/index works fine, but http://localhost/ shows me
list of directories and files in my htdocs/ directory. Why?

Here is my httpd.conf:

httpd.conf (quotation):
---
DocumentRoot "/usr/local/apache-new/htdocs"

PerlSetEnv AppConfig "/usr/local/apache-new/conf/appconfig.conf"
PerlRequire "appconfig.pl"



PerlSetVar PKIT_ROOT /usr/local/apache-new/htdocs
PerlSetVar PKIT_SERVER staging
SetHandler perl-script
PerlHandler +Apache::PageKit


use lib "/usr/local/apache-new/htdocs/lib/perl";
Apache::PageKit->startup("/usr/local/apache-new/htdocs","staging");




---

Thank you very much,
Best wishes!
----
Anton Permyakov   Web-Developer
[EMAIL PROTECTED]   WWW.SOLUDIUM.COM




Re: mod_perl + Apache::PageKit on Win32 problems

2002-08-15 Thread Anton Permyakov

Randy, thank you,
now it looks like it will work... but my project also uses following
packages i could not install with PPM:

Class::DBI
Class::DBI::Extension
Ima::DBI

There are ppd for Class::DBI and Ima::DBI, but PPM says they are not for
this build of Perl (MSWin32-x86-multi-thread).
Is it diffucult to create ppd files from tar.gz files?
Can i do it by myself?

Anton.


- Original Message -
From: "Randy Kobes" <[EMAIL PROTECTED]>
To: "Anton Permyakov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 15, 2002 1:01 PM
Subject: Re: mod_perl + Apache::PageKit on Win32 problems


> On Thu, 15 Aug 2002, Anton Permyakov wrote:
>
> > Hello everybody,
> >
> > I try to install Apache::PageKit on Win32 Apache+mod_perl. I've
> > installed all that's needed from perl-win32-bin-0.8.exe,
> > install all packages needed for Apache::PageKit and itself
> > (without PPD file, just by copying *.pm files).
> >
> > When i start Apache - it closes with error: "Memory Access Violation".
> >
> > Can anyone help? By the way - how is it possible to create
> > Apache-PageKit.ppd file (for ActiveState PPM)? What is needed
> > for this?
> >
> > Thank you,
> > Anton.
>
> It may be that some of the .pm files weren't installed in the
> expected loactions ... I just put up an Apache-PageKit ppm
> package in our repository at
>http://theoryx5.uwinnipeg.ca/ppmpackages/
> which I think includes all the required packages not
> found in ActiveState's repository. Perhaps give that a
> try to see if that helps.
>
> --
> best regards,
> randy kobes
>
>




mod_perl + Apache::PageKit on Win32 problems

2002-08-14 Thread Anton Permyakov



Hello everybody,
 
I try to install Apache::PageKit on Win32 
Apache+mod_perl.
I've installed all that's needed from 
perl-win32-bin-0.8.exe, install all packages needed for Apache::PageKit and 
itself (without PPD file, just by copying *.pm files).
 
When i start Apache - it closes with error: 
"Memory Access Violation".
 
Can anyone help?
By the way - how is it possible to create 
Apache-PageKit.ppd file (for ActiveState PPM)? What is needed for 
this?
 
Thank you,
Anton.
 


error_log [info] & [debug] lines

2002-08-12 Thread Anton Permyakov

Hello, all.

My error_log is abounded with following lines.
What does it mean, and how it impacts on Apache performance in general?
Thank you.

[Sat Aug 10 12:50:03 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed
[Sat Aug 10 12:50:03 2002] [debug] Apache.c(364): (104)Connection reset by
peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
[Sat Aug 10 12:50:04 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed
[Sat Aug 10 12:50:04 2002] [debug] Apache.c(364): (104)Connection reset by
peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
[Sat Aug 10 12:50:05 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed





error_log [info] & [debug] lines

2002-08-12 Thread Anton Permyakov

Hello, all.

My error_log is abounded with following lines.
What does it mean, and how it impacts on Apache performance in general?
Thank you.

[Sat Aug 10 12:50:03 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed
[Sat Aug 10 12:50:03 2002] [debug] Apache.c(364): (104)Connection reset by
peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
[Sat Aug 10 12:50:04 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed
[Sat Aug 10 12:50:04 2002] [debug] Apache.c(364): (104)Connection reset by
peer: mod_perl: rwrite returned -1 (fd=3, B_EOUT=8)
[Sat Aug 10 12:50:05 2002] [info] [client 24.165.240.166] (104)Connection
reset by peer: client stopped connection before rwrite completed





Re: Moving from CGI to mod_perl

2002-05-14 Thread Anton Permyakov

Thank you, Stas.

It's really good place to learn about mod_perl.

Good luck,
Anton

- Original Message -
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Anton Permyakov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 1:17 PM
Subject: Re: Moving from CGI to mod_perl


> [Please make sure to post follow-ups to the list! Thanks!]
>
> Anton Permyakov wrote:
> > Hi, all.
> >
> > I have perl CGI-script, and i wanna run it as mod_perl script.
> >
> > Is it enought to correctly edit only httpd.conf, or i've to add
something
> > special in my CGI-script? Maybe something like
> >
> > use Apache::Registry;
> >
> > or something else
> >
> > Also is it needed to write some special script like startup.pl or not?
> >
> > Thank you all, and sorry for this "easy question"...
> > In doc i could not find "How to migrate from CGI to mod_perl" - step by
step
> > easy example.
>
>
>
http://perl.apache.org/preview/modperl-docs/dst_html/docs/1.0/guide/getwet.h
tml#Porting_Existing_CGI_Scripts_to_run_under_mod_perl
>
>
> __
> 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




Moving from CGI to mod_perl

2002-05-13 Thread Anton Permyakov

Hi, all.

I have perl CGI-script, and i wanna run it as mod_perl script.

Is it enought to correctly edit only httpd.conf, or i've to add something
special in my CGI-script? Maybe something like

use Apache::Registry;

or something else

Also is it needed to write some special script like startup.pl or not?

Thank you all, and sorry for this "easy question"...
In doc i could not find "How to migrate from CGI to mod_perl" - step by step
easy example.

Good luck,
Anton Permyakov.




Re: how to pass data in internal redirects?

2002-02-28 Thread Anton Permyakov

Take a look at PageKit (www.pagekit.org) - i use it and i like it.
This is good Perl MVC framework.
Anton.

- Original Message - 
From: "F. Xavier Noria" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 26, 2002 12:09 PM
Subject: how to pass data in internal redirects?


> As an exercise studying mod_perl I am trying to see how could the MVC
> pattern be implemented.  I've thought a possible approach would be to
> write the model using normal Perl classes, and controllers and views
> with Apache modules.
> 
> I suppose that controllers would use internal redirects to call the
> views, is there a way to pass Perl data this way?  For example, in the
> hangman game in O'Reilly's book a controller would load a session from
> the cookie, process user's guest, modify the state and redirect the
> request internally to the view.  Ideally the view shouldn't read the
> data to display from the database again... could it be passed somehow by
> the first content handler?
> 
> -- fxn