Re: is anybody using mp2 in production?

2003-06-10 Thread Udlei Nattis
Hi,

sorry my english

i development one big ecommerce system in mp2 and i very happy

is fast and stable



Sreeji K Das wrote:

...
...
I'd be interested in what you thought of the switch
after going live, we
were never sure (but getting there now) if we should
have started with MP2
or not, never got a chance to see MP1 in action.
   

We have found MP1 to be stable. (We had a lot of
issues with PerlFreshRestart  I had to patch MP1 to
get around this issue. Otherwise there were no
problems)
I'm not very sure about MP2. We want to play around
with MP2 on development as much as possible before
going live.
I'm also worried about the differing opinion on
perl-ithreads (especially after reading
http://groups.google.com/groups?dq=hl=enlr=ie=UTF-8threadm=b7fpt9%24q9a%241%40agate.berkeley.eduprev=/groups%3Fdq%3D%26num%3D25%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.perl.moderated%26start%3D25)
We plan to get mp2 working on development  test the
performance. Once we find it's stable on dev., it's
time to go live.
Sreeji

__
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html
 





Re: [mp2] upload file

2003-04-03 Thread Udlei Nattis
fix problem

i need change SetHandler modperl to perl-script, now upload is ok

why this happens? i need add any options in SetHandler modperl to use 
upload ?

thanks

nattis

Stas Bekman wrote:

I used of examples these 2 archives
but dont functioned
in mp1 i dont have problem

my mp2 version is last cvs version


So you have a problem with mp2. Did you upgrade your CGI.pm to the 
latest version?

__
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





[mp2] upload file

2003-04-01 Thread Udlei Nattis
hi,

i have problem for upload files
testing use CGI and CGI::Simple
look file.pm:

   $cgi = CGI-new;
   $r-print($cgi-param(test). xxx );
file .html

form action=end method=post enctype=multipart/form-data
input type=file name=image
input type=hidden name=test value=abcdef
input type=submit
/form
when i add enctype param(test) return undefined value
and wne i remove enctype param(test) print abcdef
my question is: why when i add enctype, param(test) return undefined 
value?

sorry my english ;)

thanks



Problem headers_out

2003-02-27 Thread Udlei Nattis
Hi all

Why i have problem?

   $cookie1 = new CGI::Cookie(
   -name = 'sessid', -value = $session-id());
   $r-headers_out-{'Set-Cookie'} = $cookie1;

OR

$c-headers_out-{'Set-Cookie'} = aaasdfhajsd fjhasdhfjkajkdf;

[Thu Feb 27 14:42:34 2003] [warn] pid file 
/usr/local/apache-2.0/logs/httpd.pid overwritten -- Unclean shutdown of 
previous Apache run?
[Thu Feb 27 14:42:34 2003] [notice] Apache/2.0.44 (Unix) 
mod_perl/1.99_09-dev Perl/v5.8.0 configured -- resuming normal operations
Use of uninitialized value (#1)
   (W uninitialized) An undefined value was used as if it were already
   defined.  It was interpreted as a  or a 0, but maybe it was a mistake.
   To suppress this warning assign a defined value to your variables.
  
   To help you figure out what was undefined, perl tells you what operation
   you used the undefined value in.  Note, however, that perl optimizes 
your
   program and the operation displayed in the warning may not necessarily
   appear literally in your program.  For example, that $foo is
   usually optimized into that  . $foo, and the warning will refer to
   the concatenation (.) operator, even though there is no . in your
   program.
  
[Thu Feb 27 14:42:40 2003] [error] [client 127.0.0.1] Can't locate 
object method STORE via package APR::Table at 
/export/eShop/lib/eShop/Web/Shop/index.pm line 30.

if i remove $r-headers_out-{'Set-Cookie'} = $cookie1;

i dont have proble :/

i using last cvs version and httpd-2.0.44

thanks

nattis



Re: mp2: any recommendations for template systems yet?

2003-02-21 Thread Udlei Nattis
you can use Ananke::Template

is one version of template::toolkit but very very very very fast

[]s

nattis

Josh Chamas wrote:

Perrin Harkins wrote:

On Thu, 2003-02-20 at 22:27, Carl Brewer wrote:

Do any of you have any recommendations for template systems with
mp2?  Not of the religious kind (!) but more on the lines
of what's working with mp2 at the moment?


Everything that doesn't make mod_perl API calls should work without
changes.  That means HTML::Template, Template Toolkit, Text::Template,
CGI::FastTemplate, etc.

Without wishing to start anything religious ... any suggestions
for a template system that handles sessions?


Apache::ASP, Embperl, and Mason all have session support integrated
now.  I can't vouch for their stability on mp2 yet though.
AFAIK, Apache::ASP v2.51 is working correctly on mp2 without any
special installation or configuration.
As a separate issue, but also interesting, users are reporting
success with running Apache::ASP under SpeedyCGI also which speaks
well towards its portability.
Regards,

Josh


Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checkinghttp://www.nodeworks.com






[mp2] e-Commerce

2003-01-20 Thread Udlei Nattis
hi, sorry my english ;)

modperl 2 with apache 2 thread is stable enought for start one big 
project of ecommerce?

[]s

nattis




Redirect Problem

2002-11-28 Thread Udlei Nattis
hi all,

i have one problem,
when i set one cookie and REDIRECT , cookie dont is set

in file
  $r-status(REDIRECT);
   exit;

[nattis@nattis nattis]$ lynx -mime_header 
'http://200.189.180.107:84/client/go.new?id=8.1nick=wellington'   
HTTP/1.1 302 Found
Date: Thu, 28 Nov 2002 13:35:22 GMT
Server: Apache/2.0.44-dev (Unix) mod_perl/1.99_08-dev Perl/v5.8.0
Location: frame?id=8.1type=
Content-Length: 324
Connection: close
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title302 Found/title
/headbody
h1Found/h1
pThe document has moved a href=frame?id=8.1amp;type=here/a./p
hr /
addressApache/2.0.44-dev (Unix) mod_perl/1.99_08-dev Perl/v5.8.0 
Server at 127.0.0.1Port 84/address
/body/html



if i comment
  #$r-status(REDIRECT);
   exit;

[nattis@nattis nattis]$ lynx -mime_header 
'http://200.189.180.107:84/client/go.new?id=8.1nick=wellington'
HTTP/1.1 200 OK
Date: Thu, 28 Nov 2002 13:36:30 GMT
Server: Apache/2.0.44-dev (Unix) mod_perl/1.99_08-dev Perl/v5.8.0
Set-Cookie: _session_id=c7b9948e90650cc21524aa96a9bcebeb; path=/
Location: frame?id=8.1type=
Content-Length: 0
Connection: close
Content-Type: text/plain; charset=ISO-8859-1

now cookie is set

this is one bug or correct?

bye

nattis



Re: Redirect Problem

2002-11-28 Thread Udlei Nattis
sorry

but topic Sending Cookies in REDIRECT Response not is valid for 
modperl 2.0

Cookies dont send in modperl 2.0 when i redirect page

bye

nattis

[EMAIL PROTECTED] wrote:

Hi!

On Don, Nov 28, 2002 at 11:48:19 -0200, Udlei Nattis wrote:

 

i have one problem,
when i set one cookie and REDIRECT , cookie dont is set
   


http://perl.apache.org/docs/1.0/guide/snippets.html#Sending_Cookies_in_REDIRECT_Response

Please RTFM before posting questions:

http://perl.apache.org/maillist/email-etiquette.html

 



--
aa





Prevision

2002-10-22 Thread Udlei Nattis
when will be finished modperl2?

bye

nattis




Memory problem

2002-09-04 Thread Udlei Nattis

hi,

i have one big problem

i'm using modperl 2.0 (last cvs), httpd 2.0 (last cvs), perl 5.8.0
using apache mpm = worker

when i start apache, size:
17277 nobody 8   0 13964  13M 13152 S 0.0  3.6   0:00 httpd

DBI.pm have problem, when i execute my script, DBI.pm open memorya but 
don't close
look

/usr/local/apache-2.0/bin/ab -n 10 http://127.0.0.1:84/test/module/dbi

17280 nobody 9   0 20876  20M  7412 S 4.4  5.4   0:00 httpd

try again:

17280 nobody 9   0 27396  26M  7412 S 0.0  7.1   0:00 httpd

any people have one ideia for clean this memory?

[]s

nattis




flush problem

2002-09-03 Thread Udlei Nattis

hi

i have one problem
look this source:

use strict;

$| = 1;

my ($i,$r);

 $r = shift;

$r-content_type('text/html');

while ($i  10) {
   $r-printf($i.br\n);
   $r-printf(\0);
   $i++;
   sleep 1;
}

if you try in modperl 1.27 using windows xp and ie6 (others versions is ok)
this code is ok in modperl 1.27 using windows xp and ie6
but if you try modperl 2.0 (last cvs using perl 5.8.0) and httpd-2.0
this code have one problem

code don't send flush, print only when finish
hu $| = 1 in modperl 2.0 dont run :/

sorry my english heheh

bye

nattis




Re: flush problem

2002-09-03 Thread Udlei Nattis

$r-rflush() doesnt work too

you have other idea?
bye

nattis

Stas Bekman wrote:


 Yup, this doesn't work yet. Use $r-rflush() for now.


 __
 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







Re: while - modperl 2.0/Apache 2.0

2002-07-31 Thread Udlei Nattis

hi,

this problem is stranger
when i use apache 1.3/modperl 1.27 this problem don't exist

i think problem is because thread in apache2 or modperl2

lynx dont have problem because is other instance
if you open 2 instances of mozilla you dont have problem
but if you open one mozilla and 5 tab navigator of instance
problem persist

[]s

nattis
Stas Bekman wrote:

 Stas Bekman wrote:

 Alessandro Forghieri wrote:

 Greetings.

 I have observed the same behavior (on win32).

 Scripts that are invoked from the same browser through the same URL 
 appear
 to bind to the same perl thread and are therefore serialized. 
 Changing the URL appears to bind
 the request to a different thread. (My observation regarded access 
 from a
 different Location: Udei's experience shows that a URL change 
 suffices).

 I have often wondered wether  this is incidental or specified behaviour.



 OK, I've returned to this problem. And the bug is in Apache 2.0 not 
 mod_perl. I was able to reproduce the serialization problem with a 
 plain cgi-bin script. Will report to the httpd-dev list and hopefully 
 it'll be resolved in the future version.


 I'm taking my words back. I did some more testing and the same problem 
 can be reproduced with Apache 1.3. So I have tried different browsers 
 and chased the problem to be a browser's fault. Here is the status on 
 linux:

 Opera, Mozilla, Galeon - serialize the requests to the same URL.
 Konqueror, lynx- run both in parallel.

 Luckily I didn't sent the bogus bug report to httpd-dev ;)

 __
 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









Re: while - modperl 2.0/Apache 2.0

2002-07-17 Thread Udlei Nattis

thanks ;)

now i understand
to run in others browser instances you need change url
example:
http://127.0.0.1/hello-world?a
http://127.0.0.1/hello-world?b
http://127.0.0.1/hello-world?c
http://127.0.0.1/hello-world?d

/tmp/test123
1505: 162 - thread
1505: 155 - thread
1578: 146
1505: 131 - thread
1578: 124
1505: 163  - thread
1505: 156  - thread
1578: 147
1505: 132

:))

bye

nattis

Stas Bekman wrote:

 ok, looks like your setup is fine.

 Though I cannot seem to reproduce your problem. Indeed it seems that 
 the unbuffered output doesn't work. I'm checking on that. But I've 
 devised a better test that verifies that the requests aren't 
 serialized. If you run this hander by two clients at the same time, 
 you should see the lines in /tmp/test123 being interleaved by two 
 processes. If this doesn't happen and you get first 100 lines from 
 process A followed by process B's 100 lines than indeed we have a problem.

 sub handler {
 my $r = shift;
 $r-content_type('text/plain');
 local $| = 1;

 open my $fh, , /tmp/test123 or die $!;
 my $oldfh = select($fh); local $| = 1; select($oldfh);
 my $i = 0;
 while ($i  100) {
   $r-print($$: $i \n);
   print $fh $$: $i \n;
   sleep 1;
   $i++;
 }

 $r-print(__PACKAGE__);
 close $fh;

 return Apache::OK;
 }

 If this indeed doesn't work, please try the suggestion at:
 http://perl.apache.org/docs/1.0/guide/debug.html#Using_the_Perl_Trace
 so you can see where the second process is stalled. If you don't get 
 anything from this approach try to attach to the second process with 
 gdb and see where it is stack on the C calls level. Though I suggest 
 that you test with prefork and this setup:

 IfModule prefork.c
 StartServers 2
 MinSpareServers  2
 MaxSpareServers  2
 MaxClients   2
 MaxRequestsPerChild  0
 /IfModule

 __
 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









while - modperl 2.0/Apache 2.0

2002-07-16 Thread Udlei Nattis

hi

sorry my english
i have one problem
when i open 2 browsers intance and access my perl script
instance 1 run script OK
instance 2 waiting instance 1 finalize to run :/

i need run simultane 2 instance
(modperl 2.0 dev 5 / perl 8 rc 3 / apache 2.0 prefork or worker )

example:

#!/usr/bin/perl

use Apache2;
$| = 1;
my $r = Apache-request;
$r-content_type(text/html);
$r-send_http_header;
$r-print(Apache::get_server_version().br);

# only for Apache Pre-Fork MPM
#if (Apache::MPM_IS_THREADED) {
#   my $id = APR::OS::thread_current();
#   print current thread id: $id;
#}
#else {
#   print current process id: $$;
#}

$i = 0;
while ($i  20) {
$r-print($i.br\n);
$i++;
sleep 1;
}

thanks

Udlei Nattis
www.nobol.com.br




Re: while - modperl 2.0/Apache 2.0

2002-07-16 Thread Udlei Nattis

Udlei Nattis wrote:

how many servers do you run?
worker:
IfModule worker.c
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild  0
/IfModule

prefork:
IfModule prefork.c
StartServers 5
MinSpareServers  5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild  0
/IfModule

now i change my styles lines
i using:

package Apache::HelloWorld;

#LoadModule perl_module modules/mod_perl.so
#PerlSwitches -Mlib=modperl-2.0/examples/lib

##optional
#PerlModule Apache2
#PerlModule Apache::compat

#Location /hello-world
#SetHandler modperl
#PerlResponseHandler Apache::HelloWorld
#/Location

use strict;
use Apache::RequestRec (); #for $r-content_type
use Apache::RequestIO ();  #for $r-puts
use Apache::Const -compile = 'OK';
$| = 1;

sub handler {
 my $r = shift;
 $r-content_type('text/plain');

 #send_http_header API function does not exist in 2.0

 my $i = 0;
 while ($i  10) {
   $r-print($i.\n);
   sleep 1;
   $i++;
 }

 $r-puts(__PACKAGE__); #print not yet implemented

 return Apache::OK;
}

1;


and problem persist
instance 1 run ok
instance 2 waiting intance 1 finalize

thanks

nattis
__
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








Re: DBI Bug

2002-06-05 Thread Udlei Nattis

hi

this problem is very very very persistent

httpd.conf

PerlModule DBI # THIS IS THE PROBLEM

PerlModule Apache::Registry
Location /perl
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
allow from all
PerlSendHeader On
/Location

i try all
rebuild modperl witch modperl 1.99dev02, dev03cvs, using perl 5.7.3, 5.8RC1 with 
Thread and without Thread

t/REPORT don't print any problem

BUT if i have PerlModule DBI in httpd.conf i receive:
[root@nattis bin]# ./apachectl start
./apachectl: line 192: 27461 Segmentation fault  $HTTPD
./apachectl start: httpd could not be started
[root@nattis bin]# 

when i remove PerlModule:
[root@nattis bin]# ./apachectl start
./apachectl start: httpd started
[root@nattis bin]# 

i using last version of DBI

bye

nattis



Stas Bekman wrote:

 Perrin Harkins wrote:

 Udlei Nattis wrote:

 hi, sorry my english ;)

 when i add this line in httpd.conf

 PerlModule DBI

 or

 use DBI(); in startup.conf

 apache dont start, i receive this error:

 /usr/local/apache-2.0/bin/apachectl: line 192: 12547 Segmentation 
 fault  $HTTPD
 /usr/local/apache-2.0/bin/apachectl start: httpd could not be started

 i test it in
 Apache 2.0/Perl 5.8.0RC1/Modperl 1.99.02/03
 Apache 2.0/Perl 5.7.3/Modperl 1.99.02/03
 Apache 2.0/Perl 5.6.1/Modperl 1.99.02/03
 Apache 2.0-cvs/All Perls/All Modperls



 It definitely works with the Apache 1.x/mod_perl 1.x/perl 5.6.1 
 combo. Maybe someone else can verify that they've run DBI under 
 mod_perl 2?


 Works for me with 1.99, but see below.

 You might need to use the pre-fork MPM when using DBI, depending on 
 how well your database driver works with threads.  You should also 
 make sure you compile all of these with the same compiler, to ensure 
 compatibility between libraries.


 Folks, when you see a question like this, don't waste your time 
 guessing in the dark without having the so needed details posted 
 first. Just point them here:
 http://perl.apache.org/release/docs/2.0/user/help/help.html#Reporting_Problems 


 You don't have to search for this item, it's in the shortcuts menu on 
 the left.

 __
 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










DBI Bug

2002-06-03 Thread Udlei Nattis

hi, sorry my english ;)

when i add this line in httpd.conf

PerlModule DBI

or

use DBI(); in startup.conf

apache dont start, i receive this error:

/usr/local/apache-2.0/bin/apachectl: line 192: 12547 Segmentation 
fault  $HTTPD
/usr/local/apache-2.0/bin/apachectl start: httpd could not be started

i test it in
Apache 2.0/Perl 5.8.0RC1/Modperl 1.99.02/03
Apache 2.0/Perl 5.7.3/Modperl 1.99.02/03
Apache 2.0/Perl 5.6.1/Modperl 1.99.02/03
Apache 2.0-cvs/All Perls/All Modperls

:/




Re: DBI modperl_2 Segmentation fault

2002-05-24 Thread Udlei Nattis

hi

i updating modperl-2.0-cvs and problem persist
now i change DynaLoader in DBI.pm to XSLoader but problem persist :(

can you give me one idea?

thanks

nattis

Doug MacEachern wrote:

sounds like the XSLoader vs. DynaLoader issue which only exists in 5.6.x.
try updating modperl-2.0-cvs, there is a better workaround in there for 
the issue now.



  







DBI modperl_2 Segmentation fault

2002-05-23 Thread Udlei Nattis

hi
sorry, my english dont is good ;)

i have one big problem,
i using apache2, modperl2 and perl 5.6.1

Apache/2.0.37-dev (Unix) mod_perl/1.99_02-dev Perl/v5.6.1

when i add this line in httpd.conf

PerlModule DBI

or

Perlrequire startup.conf

startup.conf:
use DBI;

1;

if i use it, httpd don't start, i receive this error:

/usr/local/apache-2.0/bin/apachectl: line 192: 32646 Segmentation 
fault  (core dumped) $HTTPD
/usr/local/apache-2.0/bin/apachectl start: httpd could not be started

:// i test in perl 5.7.3 and other versions of modperl 2 and httpd 2

if i try
use DBI;

in any file.pl and request via http i dont receve any problem :/

problem is, why DBI crash apache ?

thanks

nattis




off: DJBDNS

2002-04-08 Thread Udlei Nattis

hi
i have one webinterface writting in modperl
i looking for one people to translator to english
becausa my english is very bad ;)

if you interesting
please, contact-me

mail: [EMAIL PROTECTED]
icq: 62598138

bye nattis