Re: FreeBSD 7.2, mod_perl2 Apache2::Cookie (libapreq2)

2009-11-10 Thread Foo JH

Hello Joe,

Do you think you can post the changes that need to be made here, for us 
to reference when we hit the same problem?


Thanks.

Joe Niederberger wrote:

Thanks to everyone who contributed their insights to this thread - I
did get in touch with Mr. Galucci - and he did help straighten out
my installation. The main problem here was some remnants of Apache2
were still in the file system and lib pointers were not set correctly 
during

the install and so things didn't link up properly.
 
Thanks again,

Joe Niederberger

- Original Message -
*From:* macke...@animalhead.com mailto:macke...@animalhead.com
*To:* Sin mailto:sinis...@gmail.com
*Cc:* metacyc...@gmail.com mailto:metacyc...@gmail.com ;
mod_perl list mailto:modperl@perl.apache.org
*Sent:* Friday, October 30, 2009 11:56 AM
*Subject:* Re: FreeBSD 7.2, mod_perl2  Apache2::Cookie (libapreq2)

The man you want at the FreeBSD lists is Philip M. Gollucci.  
He maintains libapreq2 in the ports collection, and was very
helpful to me when I was trying to get the module to build, 
earlier this year.


Good Luck and please report your results to this list when this is
settled,
cmac


On Oct 30, 2009, at 9:44 AM, Sin wrote:


When I build from ports the  make config  usually brings up a
window that has options for both 32 bit and 64 bit.   If I had to
guess I'd say its the same Makefile and source code that builds
the binary files.   Or in your case a 64 bit bin file.   But
honestly I really don't know, we should steer this thread over to
the FreeBSD mailling lists.  Perhaps its just a matter of
pointing this out to a maintainer or the governing group at the
FreeBSD mailling list people.   Maybe they know the next step? 


- Original Message -
*From:* metacyc...@gmail.com mailto:metacyc...@gmail.com
*To:* Sin mailto:sinis...@gmail.com
*Cc:* Foo JH mailto:jhfoo...@extracktor.com ; Adam Prime
mailto:adam.pr...@utoronto.ca ; Joe Niederberger
mailto:jniederber...@comcast.net ; mod_perl list
mailto:modperl@perl.apache.org
*Sent:* Friday, October 30, 2009 12:36 PM
*Subject:* Re: FreeBSD 7.2, mod_perl2  Apache2::Cookie
(libapreq2)

This may be completely unrelated, but I had similar headaches
installing libapreq2 on a 64 bit machine that had both 32 and
64 bit libs installed.  I had to uninstall the offending 32
bit libs (which I didn't need).

Do they have a similar setup?

Dimitri

On Fri, Oct 30, 2009 at 12:28 PM, Sin sinis...@gmail.com
mailto:sinis...@gmail.com wrote:

pkg_add -r just goes to a package repository and gets a
package version thats allready complied for your
distribution.   So you can't build your options.

However this apreq2.12 issue is interesting.   I was
going to try this again.   I went to build this port but
make errored out with:

===  libapreq2-2.12_1 : Error from bsd.apache.mk
http://bsd.apache.mk. apache13 is installed (or
APACHE_PORT is defined) and port requires 2.0+.
*** Error code 1


But if you look at the port it says apache-1.3.41_1 is
the build and run dependency.  So it should of built the
port (because I just happen to have apache 1.3 installed
).   I'm wondering if all the times I tried to build
Apache2.x with mod_perl2 the application couldn't
interface with it because of a missing dependency.


I'm not a BSD expert but it looks like this port needs
updating.   Here's the description in ports:



Port:   libapreq2-2.12_1
Path:   /usr/ports/www/libapreq2
Info:   Generic Apache2 Request Library
Maint:  s...@freebsd.org mailto:s...@freebsd.org

B-deps: apache-1.3.41_1 autoconf-2.62
autoconf-wrapper-20071109 expat-2.0.1 gettext-0.17_1
gmake-3.81_3 libiconv-1.13.1 libtool-2.2.6a_1 m4-1.4.13,1
perl-5.8.9_3

R-deps: apache-1.3.41_1 expat-2.0.1 perl-5.8.9_3
WWW:http://httpd.apache.org/apreq/



Port:   p5-libapreq2-2.12_1
Path:   /usr/ports/www/p5-libapreq2
Info:   Generic Apache2 Request Library
Maint:  s...@freebsd.org mailto:s...@freebsd.org

B-deps: apache-1.3.41_1 autoconf-2.62
autoconf-wrapper-20071109 expat-2.0.1 gettext-0.17_1
gmake-3.81_3 libiconv-1.13.1 libtool-2.2.6a_1 m4-1.4.13,1
mod_perl2-2.0.4_2,3 p5-BSD-Resource-1.2903
p5-ExtUtils-XSBuilder-0.28_1 p5-Parse-RecDescent-1.962.2
p5-Tie-IxHash-1.21 p5-version-0.76 perl-5.8.9_3

R-deps: apache-1.3.41_1 expat-2.0.1 mod_perl2-2.0.4_2,3
p5-BSD

Re: FreeBSD 7.2, mod_perl2 Apache2::Cookie (libapreq2)

2009-10-30 Thread Foo JH
Just a thought: is install ap22 + mp2 + libapreq2 via pkg_add -r an 
option? That's what I normally do these days.



Adam Prime wrote:

You guys might want to take a look at this thread on apreq-dev

http://marc.info/?t=12420765987r=1w=2

Specifically the last couple of posts from pgollucci (who is a 
freebsd, and mod_perl committer).  If you can't get apreq2.12 to work, 
try 2.08.


Adam




Joe Niederberger wrote:

How do I find out what *all* the special options needed are?

Thanks,
Joe N.

- Original Message - From: gl...@gallien.net
To: mod_perl list modperl@perl.apache.org
Sent: Thursday, October 29, 2009 12:14 PM
Subject: Re: FreeBSD 7.2, mod_perl2  Apache2::Cookie (libapreq2)


I've been using apache2/mod_perl2 on FreeBSD for years. Currently 
using 6.3 and 7.2. Installing from ports should work fine, but I 
prefer to install separate versions of apache2 and mod_perl2 from 
source. Haven't had a problem installing either of those in 
sometime. Installing libapreq2 on FreeBSD requires some special 
options, like passing --with-expat=/usr/local to configure and using 
gmake.


-Glenn








Re: Plack

2009-10-21 Thread Foo JH
I've been - in my spare time - trying to figure this PSGI thing out. I'm 
a Windows guy you see, and I realised there's no PPM for Plack.


Is Strawberry the only alternative?

Jonathan Vanasco wrote:


On Oct 15, 2009, at 1:36 PM, Adam Prime wrote:

I haven't played with it, but i have read a bunch of Miyagawa's blog 
posts about it.  I do know that Jeff Horwitz is planning to support 
WSGI in mod_parrot / mod_perl 6, but i don't know exactly what that 
means ;)


Yeah I heard about that too.  Unfortunately, I seriously doubt I'll 
ever use Perl6.


The PSGI spec is really neat.  It's just a perl version of WSGI.  I'm 
hoping to play around with it on some spare time next month, and see 
if it can get around some of the weird stuff I've had to do with 
libapreq in the past.




Re: ApacheCon 2009 in Oakland

2009-10-21 Thread Foo JH

Damn, I left SF 3 weeks back. I'm never going to get to attend ApacheCon...

Fred Moyer wrote:

On Tue, Oct 20, 2009 at 5:43 AM, Jeff Trawick traw...@gmail.com wrote:
  

On Mon, Oct 19, 2009 at 12:15 AM, Fred Moyer f...@redhotpenguin.com wrote:


Greetings,

Is anyone here attending ApacheCon in Oakland this year?  I am
organizing a mod_perl social.  I'll be at the conference at least one
day hacking mod_perl.
  

This lurker will be there.



I'll be the guy in the light blue Perl shirt.  Shouldn't be hard to find :)

I'm going to see about getting some mod_perlish people from SF.pm
over.  There must be more than one mod_perl hacker in commuting range
of the Bay Area besides me :)

Tuesday November 3rd in the evening for a mod_perl social?  I think
that time slot is pretty empty for official activities, and regular
conference attendees will likely be arriving around then.
  




Re: PerlSwitches -I

2009-09-06 Thread Foo JH
I'm not sure if I remember right, but you may want to check out the 
PerlOptions +Parent

option.

http://modperlbook.org/html/24-5-6-3-Parent.html

Artem Kuchin wrote:

I have run into a problem. I want to have my packages
precompiled in apache process with

PerlModule X:Y

X:Y is my own package with is located in the site directory.
The site is a virtual host.

However, this apache also has many other virtual hosts with ALMOST the 
same

software with a package named X:Y, but a little bit modified.

So, in those virtual hosts i also need PerlModule X:Y

The problem is that mod_perl cannot find X:Y until i specify
PerlSwitches -I/host1/dir

But this works globally and cannot be specified per virtual host. I am 
stuck here,

but i need this personalizaed for each virtual host.

Any workaround?

Regards,
Artem






Re: [mp2] Apache2::Reload missing in FreeBSD ports

2009-09-06 Thread Foo JH

Philip M. Gollucci wrote:

WITH_MODPERL2=yes is std option used by many ports.
Also, you didn't read the output from www/mod_perl2 that tells you to
install it (www/p5-Apache-Relaod); though it doesn't mention the above var.

WITH_MODPERL2=yes will actually be dying sometime in 2010 and everything
will be derived from the APACHE_PORT /etc/make.conf var which will soon
default to www/apache22 instead of www/apache13.

  
Thanks for the clarification. I used to just set the ports to install 
with make install clean, then go get my coffee. I guess I should watch 
the first few screens before I go off.





[mp2] Apache2::Reload missing in FreeBSD ports

2009-09-03 Thread Foo JH

Hello guys,

I'm wondering if there is any1 using FreeBSD + Apache2 + mp2. In short: 
there's no Apache2::Reload.


I browsed around the web (in particular 
http://www.mail-archive.com/d...@perl.apache.org/msg12048.html) , and 
apparently I'm not the only one who noticed it. People mention 
Apache::Reload, but on my FBSD7.2:


1. Installing p5-Apache-Reload over package (at v0.07) throw out:
Can't locate object method dir_config via package 
Apache2::RequestRec at 
/usr/local/lib/perl5/site_perl/5.8.8/Apache/Reload.pm line 51.


2. I can't install p5-Apache-Reload over ports, as it will complain it 
expects Apache 1.3.


Any advice will be appreciated.

Thanks.


Re: [mp2] Apache2::Reload missing in FreeBSD ports

2009-09-03 Thread Foo JH

Thanks Hiro,

I wonder: if nobody is to advise otherwise, how will one know out that 
it is possible to install p5-Apache-Reload with the WITH_MODPERL2=yes 
option, without digging into the make file?


Hiroyuki Hanai wrote:

just FYI.

  

I'm wondering if there is any1 using FreeBSD + Apache2 + mp2. In short: there's 
no Apache2::Reload.



With ports-current, you will be able to install Apache2::Reload by:

$ cd /usr/ports/www/p5-Apache-Reload
$ sudo make WITH_MODPERL2=yes install

h.hanai
  




Re: mod_perl on win32

2009-08-26 Thread Foo JH

I'd suggest to get your mp2 up with the following stack:
Apache22 Windows binary
ActivePerl binary
precompiled mod_perl2 + libapreq2 from the repo

Michiel Beijen wrote:

Hi all,

I'd like to know if it's possible to build mod_perl on Win32; I'd like
to use mod_perl with StrawberryPerl. It seems to be that the only way
that could be done is to compile Apache also with MinGW, and that's not
possible because of limited support for Windows Shared Memory in MinGW.

Also if you'd try to compile mod_perl it will try to run ./configure
on the Apache sources but that will fail on Win32 because 1. there is no
Configure in the win32 Apache sources and 2. Windows will try to execute
. which is not exactly an executable file...

Does anyone have pointers or tips?

Thanks in advance,
  




mod_perl6 availability?

2009-04-07 Thread Foo JH
Hi guys,

There's recently some talk on the ActivePerl mailing list on Perl6
(Rakuda) and IIS. Out of curiosity, is anyone experimenting on this on
mod_perl6?

mod_perl6 was mentioned by Jeff Horwitz in the following articles:
1.
http://www.oreillynet.com/onlamp/blog/2008/02/jeff_horwitz_on_mod_perl6.html
2. http://www.smashing.org/jeff/node/21
3. http://www.smashing.org/jeff/node/35

But I can't find any ppds on this. Probably will work in progress?


Re: decline and fall of modperl? (my last post on this subject)

2009-03-29 Thread Foo JH
Please do not reply to my comments. I think it's time to close this and
move on.

Ok, my personal summary on this topic:

1. The fact that so many people (including lurkers) responded to this
email suggests that it is a subject that's important to them - be it
personal, professional, or academic.
Conclusion: It would be unwise to for anyone to attempt to conclude a
question like this with short answers. The variety of the responses also
suggests that Perl is used by many for many intents and purposes.

2. There were many good and interesting points brought up on the
relavancy of Perl in today's context. There were anecdotes, personal
experiences etc contributed by everyone.
Conclusion: Not all points will be relavant in the context of every
developer; business environments are not hetrogeneous in all parts of
the world. Perl needs to present a 'face' that will work in each of
these environments if it wants to remain relavant there. Generally it is
 doing a fairly good job in that aspect.

3. Throughout the discussion everyone remained reasonable rational, and
attempt to comment on facts and personal beliefs.
Conclusion: Compared to some other mailing lists I subscribe to, we
Perlites are a fairly level headed bunch. Let's give ourselves a pat on
the back on this. And stay that way please.


Let's move on with new topics of interest please.


Re: decline and fall of modperl?

2009-03-27 Thread Foo JH
Octavian Rasnita wrote:
 It seems that Perl is beaten by this new atitude, and the fact that it
 is a better language doesn't help too much.
Haven't we all learnt from Bush, that the best people don't always make
President?

 If the program is hard enough protected, most users won't be able to get
 its clear source code, so we can say that it is protected.
 But if we protect it by just a licence, nothing would stop the user to
 sell it to someone else (theoreticly, of course, not that this thing
 really happends).
I think we should just agree that there are 2 styles of businesses:
1. Linux-style: devalue the privacy of your source code. Let people buy
your product because of the code quality, and the ability to make minor
changes on your own responsibility.

2. Windows-style: your code is mystery, but your program works anyway
and your support is good. And that's good enough for people to buy your
product.

Using Perl doesn't mean we must adopt Linux-style biz. There are other
environments, which thrive on Windows-style biz. Luckily Perl does
support this to some extend.




Re: decline and fall of modperl?

2009-03-26 Thread Foo JH
Rolf Banting wrote:
 1. Perl supports more programming paradigms than Java.
Agreed. The problem is with perception. People identify Perl as a
procedural language, and strongly typed languages (ie C#, Java) as
modern languages enforcing modern concepts. We all know that's isn't
entirely true of course. But that's the perception.

 2. You write fewer lines of perl to get things done than you do in Java.
I probably should have elaborated on this point. By way of 'minimise the
learning curve', I mean an elaborate IDE which helps the user focus on
key algorithms. Without the IDE, I would think programming Java is more
unwieldy than Perl. But suddenly with Eclipse, it's all about click here
and there, and having the system figure out some of the minor stuff for you.

 Point 3 does scream Java but take a look at this:
I could be mistaken here, since I'm only writing from the perspective of
my local context. It's like the old buy-IBM mentality: nobody gets fired
for buying IBM and have it fail. Here, no lecturer will be blamed if he
were to train students on VB.NET/ Java, only to see the language fall
out of favour.



Re: decline and fall of modperl?

2009-03-26 Thread Foo JH
Octavian Râsnita wrote:
 1. I don't know what it means that perl supports more paradigms than
 Java, but I know that the Java / C# OOP style is usually considered
 a much complete and better standard than one used by Perl.
 Java / DotNet support interfaces, so the classes they create respect
 the contracts better, while in perl world, the programmer is free,
 and nobody points a shotgun to him in order to force him to do it.
Perl is a funny animal. It doesn't have a formal support for interfaces,
but it suppports multiple class inheritance. It also has - for a very
long time now - support for closures, which I find very interesting (few
Java developers even heard of it).

Agreeably, Perl is neutral enough to let bad boys ignore the 'contracts'
aka interfaces. But I would say that it's more of a feature (some would
use the word 'beauty'). I do acknowledge there's some pain in this
philosophy though. There's always a workaround to enforce things if you
want it to.

One of the things I really like about Perl's classes is how there is
more than 1 way to mark a class:
1. As a reference to a hash
2. As a reference to a scalar
3. I think there's more, but I can't remember offhand.

Each of them has its own advantages.

 Java and C# uses a dot notation for separating the classes when
 using the OOP style, and even Template-Toolkit uses it, but perl
 uses something else.
There's a worse one I hear about. PHP is going to use '/'!

Personally, I would think little whether the language uses . or ::. It's
like saying cars in Japanese adverts are white, and so are Korean. So
Chinese cars should be so. As long as they dun use some garish colour,
we should all hold hands and sing Auld Lang Syne.

 And anyway, for the beginners, this is not a big problem. The
 biggest problem is that perl is harder to learn. The programmers
 might want to learn a language for a year, and get a job, and after
 this they hope that they will find time to learn the chosen language
 better while they have a job.
Human mentality will usually opt for the path of least resistance. In
other words, if they learn Java today, they will look for a bigger Java
job tomorrow. Only bosses have the power to wave their hands and say
'You do not want Java. You want to master Perl'.

 We could say that perl would be really great for these days if we
 could say about it something like:
 - It is the most easy to learn language even by the most stupid
 programmers.
They have already done that. It's called Visual Basic. :)

 - It can create portable programs that can run everywhere, under
 Windows, Mac, Linux, shared hosting web sites that don't offer root
 and shell access...
Lose out to expensive marketing folks from Java.

 - The source code of the programs can be hidden.
Tough argument. No dynamic language can boast the same ease of 'hidden'
codes like Java/ C#. There's hope via Komodo though.

 - There are very many recent books that teach Perl.
Not recent enough. Wrox releases new C# books as soon as Microsoft finds
a new reason to launch a new .Net framework.

 - Perl is chosen by bigger companies like IBM, Oracle, Microsoft,
 Sun, Yahoo, Google, SAP.
And Blackboard too!

 - There are important other software made in Perl which are used
 much these days, like a mailing list manager, a web server,
 financial charting software, stock exchange trading applications, etc.
I know it works, but the exe file created is huge, compared to a C#
executable. It also takes longer to execute too. The truth of the matter
is: the bulk of C#'s libraries are happily hidden away in the Windows
folder. We need to find a way to do the same for Perl, like a Perl 5.10
Runtime.




Re: decline and fall of modperl?

2009-03-26 Thread Foo JH
David Ihnen wrote:
 I suppose we need more programmers than those programmers who are just
 interested in coding?  I never met a good programmer who wasn't
 intrinsically interested in it. 
They like to program, then they realise that being a programmer means
been strangled by middle management. Then they start to aspire to BE the
middle management (if not higher).

The problem in a way is not really about interest, but rather the fact
that s/w dev is commoditised to a higher degree, more than other
engineering positions. It's a nasty feeling when your job is constantly
challenged by half-priced (in some places it's quarter-priced) off-shore
devs. Yes we all know the pain in outsourcing. But tell that to managers
who spend more time cutting costs than increasing revenue to increase
bottom line.

 Who cares?  Hiding source code is valueless.
 
 You haven't met the China folks have you? :)
   
 No.   What do they do in China with open code like open source code?
Probably the same thing as with the iPhone: open it up: muck ard with a
few trivial items, change the product name, sell it at half price.

There's a name for this rising trend in China. It's called ShanZai;
loosely translating to 'Mountain Fortress'. And they're damn proud of it.

 Being able to analyze and apply a direct fix to code that is
 malfunctioning is of such high value that making it impossible is a
 serious handicap. 
Agreed. Assuming you have the pro dev in your team.

 I keep thinking they're ashamed of their code thats why they want to
 hide it.
Now you're just getting personal... :)



encrypting perl

2009-03-25 Thread Foo JH
Octavian Râsnita wrote:
 The actual perl programmers are not important, because they already have
 their reasons for using perl.
 Are you saying that nobody uses Zend Encoder because PHP also runs using
 an interpreter?

I'm changing the topic of your discussion because it's gone tangent to
the subject...

Business people love the idea of their intellectual property (IP) being
protected by way of code encryption. Try telling them their money-making
code is 'in the open, but everyone's doing it too'. Not exactly a warm
fuzzy feeling.

This topic has been resurfaced from time to time. I think the bottom
line is: there is no supported form of code encryption for Perl. Some
people try to partially compile the code into bytecode, and distribute
with that. But I don't think it's officially supported.

The forward step in this may lie with Perl6. Unfortunately while Parrot
1.0 has JUST been launched, Perl6 isn't, and it'd take quite a while
before we get there. It's still NOT encoded, just compiled into a more
cryptic form, just like Java and the rest.



Re: decline and fall of modperl?

2009-03-25 Thread Foo JH
David Ihnen wrote:
 I think you've got it right there.  We've got to get perl taught in
 schools.  That means perl experts need to be in teaching.  And I have a
 suspicion that perl doesn't appeal to the pure computer scientist very
 well - these are the people who invented hard typed languages, after all.
In the academia the general directive in choosing a language would be
something to this effect:
1. teach modern language concepts, such as OO
2. minimise the learning curve by way of something easy to teach, easy
to learn without having to figure out all the details of programming
3. introduce the students to a language that will make them attractive
to the general market

You probably have a feel why Perl isn't a strong choice given these
objectives.

Perl was popular in the days when the people who go into software
courses do it for the sake of pure interest. These are the people who
are contented with Emacs or VIM, as long as they get to work with the codes.

Half of today's CompSci students are people who stumble in because they
haven't figured things out in life. The problem is made worse by Visual
Studio and Eclipse. I remember how Java was a painful experience before
someone finally put up a IDE that aids code visualisation and object
description.

My personal belief is that Perl MUST move with the times. It's an
incredibly uphill task to change the market's mindset without a
commercial budget.

I place my bets on Perl6. It's regrettably a slow process, but it's the
only sexy thing available on hand.

 Pay them to do it in perl, and after they get through the learning curve
 they'll probably be much happier with it.
Half the developers aren't the type who can appreciate a good language.
They can develop intensively for 5 years and they STILL haven't figured
out what is Regex. Trust me on this!

 Who cares?  Hiding source code is valueless.
You haven't met the China folks have you? :)

There's outright protection, there's deterrance, and there's leaving the
door open for every bad boy to muck it up.





Re: decline and fall of modperl?

2009-03-24 Thread Foo JH
André Warnier wrote:
 I would like to add that it seems ridiculously simple to decompile Java
 classes.
Agreed. With the popularity of bytecode languages such as Java and .Net,
suddenly nobody talks about the ease of obtaining source code in the
flesh. As Andre mentioned, it's trivial to decompile .Net DLLs.

I tried to recover an old perl app packaged by ActivePerl some time
back. It was impossible to do this, and the good guys at AP verified my
pain. If anything I'd say that I feel confident my (AP-packaged)
products will not fare any worse than any commercial Java/ .Net
executables in the wild.




Re: Fw: Re: decline and fall of modperl?

2009-03-24 Thread Foo JH
 In my humble opinion the perl community needs to embrace the concept
 of self propagation. For the most part perl/oo perl/mod_perl
 developers are self taught. Junior or mid level talent (a majority
 of the talent pool) is passed over as not enough experience. 
It is interesting for me to hear that developed countries are also
having difficulties finding Perl-savvy developers out of the varsities.
I do agree that not being able to find 'Perl-ready' graduates should not
be a deterrant - I myself being a brainwashed Java advocate for a while
before stumbling onto Perl.

In my local context, deciding on Perl/ PHP/ Ruby requires a great deal
of support on the business side:

1.  The average turnover rate is about 3 years. That means every 3 years
you have to retrain a new guy to take over relatively established code.
Since we have to accept the fact that it's extremely difficult to hire
an experienced Perl dev, the quality and experience of the dev team
halts at about 5-6 years.
- New strategies will be have to be formed to distinguish the core
engine from the customisable. The company must recognise the business
viability in retaining the core team, while accepting that the mediocre
will move on in time. The core team itself has to develop good mentoring
and training skills to induct the new intake.

2. Selling to clients who only understand .NET and Java ('modern'
languages) will be a challenge. Governments and large enterprises
generally (and mistakeably) associate other languages to be an
investment risk.
- Nobody asks about the innards of an appliance or a product. As long as
it runs, runs well and affordably, it's good enough.

Sounds reasonable enough, but it's a lot work to get there...


Re: decline and fall of modperl?

2009-03-23 Thread Foo JH
Perrin Harkins wrote:
 On Mon, Mar 23, 2009 at 11:30 AM, Octavian Râsnita orasn...@gmail.com wrote:
...and in most parts of the
 world it is hard to find competent perl programmers.
 
 ...The job
 listings for Perl are strong.  They're huge compared to those for
 Ruby.  Of course Java is massively more popular than either of them,
 but that doesn't make the perl market small.

I wouldn't use the word 'most', but here in Southeast Asia it's a real
challenge to find a Perl developer with significant experience in Perl/
modperl. Those who do use it as a minor scripting tool in their unix
administration.

There are still jobs requiring Perl of course, but it's usually in the
context of having Perl as a secondary proficiency, with Java/ .NET as
the primary. We have a real problem getting the average freshie to
appreciate the beauty of dynamic languages.

Sorry guys.




Re: Apache2::Reload: Where is it?

2009-01-16 Thread Foo JH

fREW Schmidt wrote:
 [Thu Jan 15 17:34:21 2009] [error] Can't locate Apache2/Reload.pm in
 @INC (@INC contains: C:/usr/site/lib C:/usr/lib . C:/Program
 Files/Apache Software Foundation/Apache2.2) at (eval 3) line 3.\n
 [Thu Jan 15 17:34:21 2009] [error] Can't load Perl module
 Apache2::Reload for server (null):0, exiting...
Apache2::Reload is currently not part of the modperl2 libraries (not in
libapreq2 either). You have to download the source file from cpan, and
put the library files in the appropriate perl/site/lib/ folder.

No further config changes required.


[mp2] a way to map a uri to a physical path

2009-01-14 Thread Foo JH
Hi all,

I'm trying to find the class/ method which allows me to get the physical
path base on the uri. Something similar to Server.MapPath('/index.htm')
in ASP.NET.

Any advise is appreciated. Thanks.


Re: [mp2] a way to map a uri to a physical path

2009-01-14 Thread Foo JH
Adam Prime wrote:
 I'm trying to find the class/ method which allows me to get the physical
 path base on the uri. Something similar to Server.MapPath('/index.htm')
 in ASP.NET.

 Any advise is appreciated. Thanks.
 
 $r-document_root . $r-uri
Thanks for replying. In my case it's a wee bit more complicated (forgot
to mention).

Thing is, I have alias-ed a path (eg. alias /thisuri c:/wwwroot) in the
web server, so $r-uri may not point to the right location.

Is there a generic method so that given any uri as a parameter, the
library can do the math and return the physical path?



Re: [mp2] a way to map a uri to a physical path

2009-01-14 Thread Foo JH
Adam Prime wrote:
 Foo JH wrote:
 Adam Prime wrote:
 I'm trying to find the class/ method which allows me to get the physical
 path base on the uri. Something similar to Server.MapPath('/index.htm')
 in ASP.NET.

 Any advise is appreciated. Thanks.
 $r-document_root . $r-uri
 Thanks for replying. In my case it's a wee bit more complicated (forgot
 to mention).

 Thing is, I have alias-ed a path (eg. alias /thisuri c:/wwwroot) in the
 web server, so $r-uri may not point to the right location.

 Is there a generic method so that given any uri as a parameter, the
 library can do the math and return the physical path?

 
 $r-filename by the looks of things.

I'm not sure if that's the one. From the docs (your ref link):

filename

Get/set the filename on disk corresponding to this response (the result
of the URI -- filename translation).

Sounds like this method assigns a file to the uri instead.


Re: APR, libapreq2, mod_perl2, APR::*, Apache2::*

2009-01-08 Thread Foo JH

Michael Ludwig wrote:
 I'd like to reach an understanding of what these ranges of modules and
 interfaces are intended for. When would I want to use which interface?
 Or is it all a matter of style and taste?

Possibly. You will need the standard modperl2 library to even get
modperl up and running. I would recommend installing libapreq2 as well,
as it exposes more functionalities that you will very likely use
(especially if you're used to CGI).






Re: Apache2::Controller release

2008-12-30 Thread Foo JH
Mark Hedges wrote:
 http://search.cpan.org/~markle/Apache2-Controller-1.000.001/
Very interesting. I have a controller which functions in a slightly
different way, but it's good to see alternative approaches. I think
yours makes life easier.


Re: [mp2] where did Apache2::Cookie go in freebsd?

2008-12-11 Thread Foo JH
 Path:/usr/ports/www/libapreq2
 Path:/usr/ports/www/p5-libapreq
 Path:/usr/ports/www/p5-libapreq-static
 Path:/usr/ports/www/p5-libapreq2
 You'd want either p5-libapreq2 or p5-libapreq WITH_MODPERL2=yes

Thanks. Does the fact that libapreq can be installed w/o modperl mean
that other languages (eg. PHP) can use it as well?

Sorry if this sounds off-topic.


[mp2] where did Apache2::Cookie go in freebsd?

2008-12-09 Thread Foo JH
Hi all,

I'm testing the latest mp2 stack on FreeBSD 7. While everything installs
ok, I'm having difficulties locating the Apache2::Cookie module.

I understand Apache2::Cookie is part of the libapreq2 package. I
installed that via ports, and the installation did not report errors.
The module mod_apreq2.so loaded quite happily. But when I tried to 'use
Apache2::Cookie' Apache22 throws out the error in http-error.log:

Can't locate Apache2/Cookie.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.8/BSDPAN
/usr/local/lib/perl5/site_perl/5.8.8/mach
/usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 . /usr/local)

I did a 'find / -name *ookie* -print' but I can't find Cookie.pm.

Other details:
1. FreeBSD 7.0
2. Apache 2.2.6_2
3. mod_perl 2.0.3
4. libapreq 2.08

Please enlighten...Thanks.


Re: [mp2] where did Apache2::Cookie go in freebsd?

2008-12-09 Thread Foo JH
Ok I figured it out. Apparently to get libapreq2 up, one has to install:
1. /usr/ports/www/libapreq2
2. /usr/ports/www/p5-libapreq2


Foo JH wrote:
 Hi all,
 
 I'm testing the latest mp2 stack on FreeBSD 7. While everything installs
 ok, I'm having difficulties locating the Apache2::Cookie module.
 
 I understand Apache2::Cookie is part of the libapreq2 package. I
 installed that via ports, and the installation did not report errors.
 The module mod_apreq2.so loaded quite happily. But when I tried to 'use
 Apache2::Cookie' Apache22 throws out the error in http-error.log:
 
 Can't locate Apache2/Cookie.pm in @INC (@INC contains:
 /usr/local/lib/perl5/5.8.8/BSDPAN
 /usr/local/lib/perl5/site_perl/5.8.8/mach
 /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl
 /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 . /usr/local)
 
 I did a 'find / -name *ookie* -print' but I can't find Cookie.pm.
 
 Other details:
 1. FreeBSD 7.0
 2. Apache 2.2.6_2
 3. mod_perl 2.0.3
 4. libapreq 2.08
 
 Please enlighten...Thanks.



[mp2] Win32 Apache2.2.9 + AP5.10.0 + MP2.04 = OK

2008-12-02 Thread Foo JH
Hi all,

Recently started testing the a/m stack. Happy to report: so far so good:
1. Apache can be restarted via ApacheMonitor.exe
2. Works with libapeq2.6.3
3. Survives multiple restarts
4. Works with Apache2::Reload

Disclaimer: I'm not hard-core mp2, so the tests are wy surface-grade .

A point to note: Apache2::Reload is not available as part of the ppd
installs. However I was able to simply copy out the relevant folders in
the source to Perl/site/lib/, and it works w/o further intervention.







Re: mod_perl survey results

2008-11-12 Thread Foo JH
William A. Rowe, Jr. wrote:
 Foo JH wrote:
 Adam Prime wrote:
 The results of the mod_perl survey that Fred Moyer and I conducted can
 be found at the following link:
 Interesting list. Any chance the workshop will come to Singapore? :)
 
 Not quite, but close...
 
 http://us.apachecon.com/c/accn2008/
Thanks. Only 1 small comment: Singapore is not exactly next door to
China. In fact we're closer to Indonesia than the former!




Re: mod_perl survey results

2008-11-10 Thread Foo JH
Adam Prime wrote:
 The results of the mod_perl survey that Fred Moyer and I conducted can
 be found at the following link:
Interesting list. Any chance the workshop will come to Singapore? :)

I am strangely excited by the potential of filters. mod_perl feels like
a generic tool that can do more than just apps (as evidenced by the fact
that not PerlResponseHandler is only used by 68.8% of apps). Yet after
all these years I'm still not scratching beyond the surface of its
capabilities.

But then again, I'm but a dying breed in my country...





Re: mod_perl2 start one script twice

2008-10-22 Thread Foo JH
It's quite simple really. You're running 2 instances of the script. To 
retain the value of $counter, read up the mod_perl documentation for tips.



CthuMP wrote:

I have follow simple script:
!#/usr/bin/perl

print Content-Type: text/html\n\n;

print Counter:  . (++$counter) . \n;
print time(), \n;

sleep(20);

print time(), \n;

Starting that script twice in two different browser windows gives me same
results. In second window I start script after some period (about 10
seconds) after first script started. First and Second scripts ends at the
same time.
So, I misunderrstand, why results are same?
As I see it, apache must give work to second child processes for second
request (because first busy). And scripts must end works in different time
(first script in 10 seconds before second) and give different results (same
counter result, but different times).
Even if script runs sequentially for each request, results will difference
and second script ends after 30 seconds (10 remained for 1st script and 20
for 2nd). But it is not!
If I copy script and run two same scripts with different names it works
fine.


Second question about childs. I not fully understand, how childs work. One
child can handle only one script? It's important, because if one child can
handle different scripts, than module global variables saves their values
between different script calls.
For example, if script1 and script2 uses module My::TestPackage, first
script sets $My::TestPackage::variable = 123, then script2, after it
request, will see in $My::TestPackage::variable value 123, but I haven't
seen mention about that situation in official documentations.




Re: Windows settings cause crash (originally: FAIL!!!)

2008-10-13 Thread Foo JH

You may want to try 2 options:
1. Use an older version of the Apache build like 2.2.6. It has been 
known to be fairly stable.
2. Try the build from ApacheLounge. It's generally not favoured, but it 
seems to handle some things better.


greg augustine wrote:

Also, the ThreadsPerChild is 250 and MaxRequestsPerChild  5

  From: [EMAIL PROTECTED]
  To: modperl@perl.apache.org
  Subject: FAIL!!!
  Date: Mon, 13 Oct 2008 07:47:35 -0500
 
 
  hello,
 
  I'm trying to get mod_perl running under Windows. I used the latest 
perl from ActiveState (5.8.8.824), Apache 2.2.9 from apache.org, and 
mod_perl 2.0.4, installed from ppm. When I ran a simple perl script and 
had 20 simulated users hitting the page, it eventually said 'Out of 
memory!' and restarted with a status of 0. The second time it happened, 
it tried to restart, but couldn't. Does anyone know if these versions 
actually work together? If they do, any thoughts on what could be wrong?

 
  code:
 
  use strict;
 
 
  my $err = 'eh';
 
  my $body;
 
  my $errstr = int(rand(2));
 
  print 'Content-type: text/html','\n\n',$err,': 
',$errstr,'\nSERVER_ADDR: ',($ENV{'SERVER_ADDR'} || 
$ENV{'COMPUTERNAME'}),'\n';

  if($errstr){
  $errstr =~ s/\://g;
  $errstr =~ s/\n/ /g;
  $body = 'Error Text: ',$errstr,'\n';
  }
  print '\n';
  print scalar(localtime());
  if($body){ $body =~ s/\n//g; }
  print $body;
 
 
  Apache error.log
 
  Out of memory!
  [Fri Oct 10 14:25:34 2008] [notice] Parent: child process exited with 
status 0 -- Restarting.
  [Fri Oct 10 14:25:34 2008] [notice] Apache/2.2.9 (Win32) 
mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations

  [Fri Oct 10 14:25:34 2008] [notice] Server built: Jun 13 2008 04:04:59
  [Fri Oct 10 14:25:34 2008] [notice] Parent: Created child process 1712
  [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(487): Parent: Sent the 
scoreboard to the child
  [Fri Oct 10 14:25:34 2008] [notice] Disabled use of AcceptEx() 
WinSock2 API

  [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Child process is running
  [Fri Oct 10 14:25:34 2008] [info] Parent: Duplicating socket 244 and 
sending it to child process 1712
  [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(408): Child 1712: 
Retrieved our scoreboard from the parent.
  [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 
listeners to child 1712
  [Fri Oct 10 14:25:34 2008] [debug] mpm_winnt.c(564): Child 1712: 
retrieved 1 listeners from parent

  [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Acquired the start mutex.
  [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Starting 250 worker 
threads.

  [Fri Oct 10 14:25:34 2008] [notice] Child 1712: Listening on port 80.
  Out of memory!
  [Fri Oct 10 15:07:14 2008] [notice] Parent: child process exited with 
status 0 -- Restarting.

 
  _
  See how Windows connects the people, information, and fun that are 
part of your life.

  http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/


Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn 
Now 
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008




Re: mod perl vesion 2 on Win32 returns runaway multi-line RR string errors on working CGI files

2008-08-25 Thread Foo JH
I use modPerl (not the CGI though), but I don't see this error even when 
slapping things on notepad.


Perhaps the problem is something else?

Perrin Harkins wrote:

On Sun, Aug 24, 2008 at 4:54 PM, Joe Smoker [EMAIL PROTECTED] wrote:
  

Seems like mod perl  does not like the CRLF chars in the notepad file... but
I also tried removing the CR chars with the same result...



It does sound like a problem with your line-ending characters.  Since
I don't use Win32, I can't give you any specific advice, but I think
you'll be able to fix this if you adjust the characters correctly.
There's some info on this in the perlport man page.

- Perrin
  




Re: framework for modperl applications

2008-07-17 Thread Foo JH
Most will argue that it's not considered a framework per se, but I like 
HTML::Template. It's more of a templating engine really.


[EMAIL PROTECTED] wrote:

I found that Catalyst is too huge to use.
Other than Catalyst, do you have any other framework suggested for MP 
applications?

thanks.

--penny




Re: graphics in perl

2008-06-25 Thread Foo JH

michael watson (IAH-C) wrote:

Did you try GD::Graph?
  
GD::Graph is a good graphing tool. It can get quite low-level as well, 
so you have to decide which visualiser works for you.


The advantage of GD::Graph is that it'd likely be rendered as a JPEG/ 
GIF, and that's something you can download and reuse in an executive 
chart. But if you want something interactive (think click-through), then 
Flash has that advantage.


Re: graphics in perl

2008-06-24 Thread Foo JH


Rolf Schaufelberger wrote:

Am Sonntag, 22. Juni 2008 11:27:26 schrieb Malka Cymbalista:
  

We are running perl 5.8.5 on a Linux machine that is running apache 2.2.6
with mod_perl 2.0.3.  Our data is in a MySQL database (MySQL 5.0.45)

We have been asked to write a web application that requires plotting
capabilities.  We do most of our web programming in perl so I am looking
for a perl module that has the following features: 1. ability to create
histograms
2. ability to create x,y plots
3. ability to zoom in on a portion of the graph
4. ability to calculate the distance between 2  points on the graph
5. ability to hover on a point and bring up some text

Does anyone have any suggestions for which perl modules we should look
into?

To make your life easier, use a third-party Flash charting tool. It's 
pretty and it's more interactive than a static jpg (for example).


The role of Perl in this case is simply to generate the data for the 
flash application to load. Most of the time it's an XML document, so 
that's something Perl does very well.




Re: Post data with Apache2::Request

2008-05-25 Thread Foo JH

kropotkin wrote:
Hi 


I am trying to obtain POST data from a form.
  

Try LWP::UserAgent to post forms instead. It's quite easy to use.



Re: Current working directory always /

2008-05-22 Thread Foo JH

Hello Perrin,

I would think that threads are more important to Win32 Perlies than 
their Linux counterparts. To me, I use threads as often as I can to 
maximise performance and scalability. To conclude, I can't agree with 
your statement that people don't use threads.



william wrote:

On 5/21/08, Perrin Harkins [EMAIL PROTECTED] wrote:
  

On Wed, May 21, 2008 at 10:28 AM, Philip M. Gollucci
 [EMAIL PROTECTED] wrote:
  You should almost always use full paths to files, think of threads.


This is true in a module you plan to distribute on CPAN, but for local
 use you typically don't need to think of threads because most people
 will not use them.  There are arguments you could make that full paths
 increase security though.


 - Perrin





Btw, could you tell me how does full paths increase security ? Thanks
  




Re: refactoring client's decision

2008-05-12 Thread Foo JH
Creating packages with the same name for multiple sites is generally a 
recipe for confusion. Following what Michael Peters said, the better way 
will be to create a properly namespaced package instead.


But in the event that the right thing cannot be done, you can consider 
creating a new interpreter for each site with the Options +Parent config 
in Apache. Do note that this solution may be memory intensive, and will 
not scale as broadly as a shared interpreter.


IMHO, try to get things right the first time. It's usually more painful 
to revisit a quick-fix.




Marc Lambrichs wrote:
I've taken over some code for a client. They've built a framework that 
used to run under mod_perl and changed it later, because of problems 
they had - what problems remains unknown - to cgi. Ofcourse I'm 
curious why they changed it. Here's my view: they create a parent 
App::Handler and in every virtual host they create a Site::Handler 
which has App::Handler as base. My first guess is that under mod_perl 
you don't know which Site::Handler will be called. Ofcourse, at first, 
the handler you're actually pointing to will be called, but if you 
change the request to another virtualhost, the wrong handler will be 
called.


This would explain why it's running perfectly under cgi, because in 
every script call the correct lib path is defined.


So, my first question is: am I right?
Secondly, what if we're running the cgi under speedycgi?

Thx,
Marc




Re: [Fwd: HELP-can you help me find MODPERL programmers? in BAY AREA PLEEZE]

2008-04-30 Thread Foo JH

'Triad Personnel'? Do they pay in blood money?

Geoffrey Young wrote:
apparently, due diligence doesn't cover proper spelling or YELLING.  
but for the interested...


--Geoff

 Original Message 
Subject: HELP-can you help me find MODPERL programmers? in BAY AREA 
PLEEZE

Date: Tue, 29 Apr 2008 15:29:59 -0500
From: Morse, Patrice [EMAIL PROTECTED]


I did my due diligence and discovered you. I am currently trying to 
find a

MODPERL programmer in the BAY AREA and don't necessarily want to go the
MONSTER route. Are there any chat rooms or ideas you might have??

Thanks

patti



Patti Morse





Patti Morse

IT Staffing Specialist

General Employment / Triad Personnel

455 Market Street, Suite 1170

San Francisco, CA 94105

Voice: 415 357 2000

Fax: 415 357 2020

email: [EMAIL PROTECTED]




Re: [ANNOUNCE] mod_perl-2.0.4

2008-04-17 Thread Foo JH

Alas, I have bad news to report:

Tech stack:
Windows 2003 Server
Apache 2.2.4
Perl 5.10.0
mod_perl 2.0.4 from 10xx/ path

Observations:
1. mod_perl is able to start
2. mod_perl is unable to survive an Apache restart signal
3. (relavant) error log available below:

[Thu Apr 17 23:39:34 2008] [notice] Parent: Received restart signal -- 
Restarting the server.
[Thu Apr 17 23:39:34 2008] [notice] Child 4532: Exit event signaled. 
Child process is ending.
[Thu Apr 17 23:39:34 2008] [notice] Apache/2.2.8 (Win32) 
mod_perl/2.0.4-dev Perl/v5.10.0 configured -- resuming normal operations

[Thu Apr 17 23:39:34 2008] [notice] Server built: Jan 18 2008 00:37:19
[Thu Apr 17 23:39:34 2008] [crit] (22)Invalid argument: Parent: Failed 
to create the child process.
[Thu Apr 17 23:39:34 2008] [crit] (OS 6)The handle is invalid.  : 
master_main: create child process failed. Exiting.
[Thu Apr 17 23:39:34 2008] [notice] Parent: Forcing termination of child 
process 36

[Thu Apr 17 23:39:35 2008] [notice] Child 4532: Released the start mutex
[Thu Apr 17 23:39:36 2008] [notice] Child 4532: All worker threads have 
exited.

[Thu Apr 17 23:39:36 2008] [notice] Child 4532: Child process is exiting




Philippe M. Chiasson wrote:

Finally, it's here and it works with Perl 5.10!




Re: [ANNOUNCE] mod_perl-2.0.4

2008-04-17 Thread Foo JH
I don't know if it's known, but 2.2.4 is a relatively stable version in 
conjunction with AP5.8 + mp2.


I guess this means I can't move into 5.10 yet.

Issac Goldstand wrote:


I think we knew that (or am I getting mixed up with the mp1 RC?) and 
it was supposed to be a known issue...


  Issac

Foo JH wrote:

Alas, I have bad news to report:

Tech stack:
Windows 2003 Server
Apache 2.2.4
Perl 5.10.0
mod_perl 2.0.4 from 10xx/ path

Observations:
1. mod_perl is able to start
2. mod_perl is unable to survive an Apache restart signal
3. (relavant) error log available below:

[Thu Apr 17 23:39:34 2008] [notice] Parent: Received restart signal 
-- Restarting the server.
[Thu Apr 17 23:39:34 2008] [notice] Child 4532: Exit event signaled. 
Child process is ending.
[Thu Apr 17 23:39:34 2008] [notice] Apache/2.2.8 (Win32) 
mod_perl/2.0.4-dev Perl/v5.10.0 configured -- resuming normal operations

[Thu Apr 17 23:39:34 2008] [notice] Server built: Jan 18 2008 00:37:19
[Thu Apr 17 23:39:34 2008] [crit] (22)Invalid argument: Parent: 
Failed to create the child process.
[Thu Apr 17 23:39:34 2008] [crit] (OS 6)The handle is invalid.  : 
master_main: create child process failed. Exiting.
[Thu Apr 17 23:39:34 2008] [notice] Parent: Forcing termination of 
child process 36

[Thu Apr 17 23:39:35 2008] [notice] Child 4532: Released the start mutex
[Thu Apr 17 23:39:36 2008] [notice] Child 4532: All worker threads 
have exited.

[Thu Apr 17 23:39:36 2008] [notice] Child 4532: Child process is exiting




Philippe M. Chiasson wrote:

Finally, it's here and it works with Perl 5.10!




Re: [RELEASE CANDIDATE] mod_perl-2.0.4 RC1

2008-04-02 Thread Foo JH

Fantastic! Can I assume that libapreq will be compatible with this version?

In all likelihood the only way is to try it yourself...

Philippe M. Chiasson wrote:
The mod_perl 2.0.4 release candidate 1 Works with Perl 5.10 is 
ready. It can be downloaded here:


http://www.apache.org/~gozer/mp2/mod_perl-2.0.4-rc1.tar.gz

MD5:  1f0a941e8b5f26b6102126ae67ddbb43
SHA1: 8b2ceede3c783b9b2cc9e0fe63a095b0e4a1f000

Please give it a spin in your favorite configuration and report
any problems. Especially needed against Perl-5.10 on Windows.

The summary of what has changed since 2.0.3 are (from Changes):

Fix $r-location corruption under certain conditions
[Gozer]

Fix a crash when spawning Perl threads under Perl 5.10
[Gozer]

Fix erratic behaviour when filters were used with Perl 5.10
[Gozer]

Fix problems with redefinitions of perl_free as free and perl_malloc
as malloc on Win32, as described at
 http://marc.info/?l=apache-modperlm=119896407510526w=2
[Tom Donovan]

Fix a crash when running a sub-request from within a filter where
mod_perl was not the content handler. [Gozer]

Refactor tests to use keepalives instead of same_interp [Gozer, Phred]

Apache2::Reload has been moved to an externally maintained
CPAN distribution [Fred Moyer [EMAIL PROTECTED]]

PerlCleanupHandler are now registered with a subpool of $r-pool,
instead of $r-pool itself, ensuring they run _before_ any other
$r-pool cleanups [Torsten Foertsch]

Fix a bug that would prevent pnotes from being cleaned up properly
at the end of the request [Torsten Foertsch]

On Win32, embed the manifest file, if present, in mod_perl.so,
so as to work with VC 8 [Steve Hay, Randy Kobes]

Expose apr_thread_rwlock_t with the APR::ThreadRWLock module
[Torsten Foertsch]

Don't waste an extra interpreter anymore under threaded MPMs when using a
modperl handler [Torsten Foertsch]

Fix a bug that could cause a crash when using $r-push_handlers() 
multiple

times for a phase that has no configured handlers [Torsten Foertsch]

Catch up with some httpd API changes
  2.2.4:
   The full server version information is now included in the error 
log at

startup as well as server status reports, irrespective of the setting
of the ServerTokens directive. ap_get_server_version() is now
deprecated, and is replaced by ap_get_server_banner() and
ap_get_server_description(). [Jeff Trawick]

  2.3.0:
ap_get_server_version() has been removed. Third-party modules must
now use ap_get_server_banner() or ap_get_server_description().
[Gozer]

fixed Apache2::compat Apache2::ServerUtil::server_root() resolution
issues [Joshua Hoblitt]

*) SECURITY: CVE-2007-1349 (cve.mitre.org)
fix unescaped variable interprolation in regular expression
[Randal L. Schwartz [EMAIL PROTECTED], Fred Moyer 
[EMAIL PROTECTED]]


Make $r-the_request() writeable
[Fred Moyer [EMAIL PROTECTED]]

fix ModPerl::RegistryCooker::read_script to handle all possible
errors, previously there was a case where Apache2::Const::OK was
returned on an error.  [Eivind Eklund [EMAIL PROTECTED]]

a minor compilation warning resolved in modperl_handler_new_from_sv
[Stas]

a minor compilation warning resolved in modperl_gtop_size_string
[Stas]

Prevent direct use of _deprecated_ Apache2::ReadConfig in
Perl sections with httpd Alias directives from
incorrectly generating
'The Alias directive in x at line y will probably never match'
messages.
[Philip M. Gollucci [EMAIL PROTECTED]]

Prevent Apache2::PerSections::symdump() from returning invalid
httpd.conf snippets like 'Alias undef'
[Philip M. Gollucci [EMAIL PROTECTED]]

Require B-Size 0.9 for Apache2::Status which fixes
Can't call method script_name on an undefined value
[Philip M. Gollucci [EMAIL PROTECTED]]

-march=pentium4 or anything with an = in it in CCFLAGS or @ARGV
that gets passed to xs/APR/APR/Makefile.PL broke the @ARGV
parsing.  I.E. FreeBSD port builds when users had CPUTYPE
set in /etc/make.conf.
[Philip M. Gollucci [EMAIL PROTECTED]]

Fixes to get bleed-ithread (5.9.5+) to comile again.
[Philip M. Gollucci [EMAIL PROTECTED]]





Re: modperl with SSL

2008-03-24 Thread Foo JH

What is a realserver?

J. Peng wrote:

hello list,

we have our own realserver called QHttpd.
This realserver doesn't support SSL protocal (https).
So I have to develop a proxy before QHttpd to get it be compatible with SSL.
I was thinking using modperl handler to do it.
modperl accept the SSL connection from clients, do the verification,
and if it's valid, redirect it to realserver with non-SSL (common
http) protocal.
Is it possible? if so, how to begin with it? at which stage?
Thanks in advance.

B. Regards,
Joy P.
  




Re: Custom Object-Oriented Module using HTML::Template

2008-03-12 Thread Foo JH

try print $template-output;

You forgot the print();

xyon wrote:

Hey everyone,

Firstly, I apologize I sent the previous email under an incorrect subject line.

I am working on my first Object-Oriented project, and have hit a slight
snag. I am using HTML::Template to output within the View module, but it
never outputs. I don't see any errors in the logs, I just get a blank
page. Below is pertinent information including a test script with its
output:



OS Info:

CentOS release 4.6 (Final)




Package info:

perl-5.8.8-11
perl-HTML-Template-2.9-1
httpd-2.0.59-1.el4s1.10.el4.centos
mod_perl-2.0.3-1.el4s1.3




/home/perl/Myserver/View.pm

package Myserver::View;

#Setup some essentials
use strict; #strict tolerance for code
use Carp;   #debugging
use diagnostics;#more debugging
use warnings;   #more debugging

#Loadup some needed functions
use HTML::Template;

sub new {
my $self= shift;
return $self;
}

sub mainpage {
my $self= shift;
my $template= HTML::Template-new( filename =
'/home/Perl/tmpl/mainpage.tmpl',
cache = 1,
debug = 1, 
stack_debug = 1 );

print Content-Type: text/html\n\n;
$template-output;
return $self;
}

1;




/home/Perl/tests/View_mainpage.pl

#!/usr/bin/perl -w

# Test printing of the main page
print Main Page..;

#Let's load the view module
use lib ../;
use Myserver::View;
#Now let's load some things that are very handy
use strict; #strict tolerance for code
use Carp;   #debugging
use warnings;   #more debugging
use diagnostics;#even more debugging

# Let's create an object
my $view= Myserver::View-new;

# Now, let's tell View to display the main page
$view-mainpage;

print .OK;

1;




/home/Perl/tmpl/mainpage.tmpl:

htmlbody bgcolor=#FF00FFTest!/body/html




Output with debugging on (as above):

$ tests/View_mainpage.pl 
### HTML::Template Debug ### In _parse:

### HTML::Template _param Stack Dump ###

$VAR1 = [
  \'htmlbody bgcolor=#FF00FFTest!/body/html
'
];

Main Page..Content-Type: text/html

### HTML::Template Debug ### In output
### HTML::Template output Stack Dump ###

$VAR1 = [
  \'htmlbody bgcolor=#FF00FFTest!/body/html
'
];

.OK




Output without debugging:

$ tests/View_mainpage.pl 
Main Page..Content-Type: text/html


.OK





  




Re: mod_perl PPM missing Apache2::Reload

2008-02-25 Thread Foo JH

Where can one download the ppd from then? I don't see it in theoryx5.

Will be nice if we can install it as easily as modperl and libapreq...

Jonathan Vanasco wrote:


On Feb 25, 2008, at 1:57 AM, Dami Laurent (PJ) wrote:

Hi Randy,

Thanks a lot, seems to work fine (but I didn't test very extensively 
yet).


Just one small bug in the PPM : the ppd file mentions 
Apache2::Reload, but this is not included in the tar.gz file. So I 
had to manually install it.


Apache2::Reload was just migrated out of the MP distro to external 
Perl modules on CPAN (Dec 2007)


I guess the docs on MP need to be upgraded.




Re: Amazon

2008-02-22 Thread Foo JH
Can be anything really, though I admit I'm not in the know. Sometimes 
it's simply a business decision: perhaps moving development off-shore to 
companies that are full of Java/ .NET people? Can't find enough 
competent mp developers?


Jonathan Vanasco wrote:
I've heard from a few reputable sources that Amazon is looking to drop 
mod_perl, and push into another technology ( which I've also head is 
likely to be Java ).


They have a HUGE deployment on mp, and have been my prime Um, not 
enterprise?  Hello, AMAZON.  repsonse.


I know that people 'in the know' can't comment on record... however 
I'm wondering if anyone with second-hand intel has heard , and can 
share :


a- what the bottleneck / scaling issues were
b- were these due to apache/mod_perl, or because of the framework 
implementation... and this is just an opportunity to switch 
technologies while they switch frameworks ( ie, is MP to blame, or 
Template Toolkit... and MP is taking a fall since its going to be a 
PITA to ditch TT )
c- what the hell the financial projections were on doing this.  
are they looking to save on hardware scaling, developer scaling, is 
the codebase just unmanageable?  this would be a costly transition





// Jonathan Vanasco

w. http://findmeon.com/user/jvanasco
e. [EMAIL PROTECTED]

|   Founder/CEO - FindMeOn, Inc.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - -

|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Privacy Minded Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - -






Re: mod_perl / Perl5.10 / Win32 ?

2008-02-20 Thread Foo JH

Thanks!

I mean for compiling for 5.10!

Randy Kobes wrote:


As there's been several requests for this, I've put up an
ActivePerl 10xx ppm package of mod_perl2, based on the
current svn sources, at
   http://cpan.uwinnipeg.ca/PPMPackages/10xx/
which you can install via
  C:\ ppm install
 http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd
There's also a ppm package of libapreq2 (which supplies,
amongst other things, Apache2::Request and Apache2::Cookie)
in the same repository. Please let me know if you have
any problems installing these - thanks.

Both these packages are based on Apache/2.2, and hence are 
incompatible with Apache/2.0. If you're using

Apache/2.0 and would like a ppm package, let me
know and I'll make one up.





Re: @inc ithreads virtual server +parent

2008-02-11 Thread Foo JH

Dylan,

Let's see: you have a client base who likes a staging-production 
development scenario. There's a few ways you can play it out:


1. Different client, different code base
You use 2 machines: 1 for staging and the other for production. Set them 
up exactly the same. Run your VirtualHost for each client. Since it's a 
unique code base for each client, there is no fear of code 
contanimation. Life is quite simple here.


2. Different client, same code base
You're probably setting up a product for PoC (hence the same code base), 
with a slightly different config for each client.


a. Turning on +Parent should do the trick (with ithreads), but you need 
to test it out a bit to make sure you got it right.


b. Since it's staging anyway, there's no need to spawn all the child 
threads/ processes. In which case you can create multiple instances of 
Apache for each client (perhaps even 1 for staging and another for 
production) with a minimal thread/ process count to save memory/ cpu. 
This method allows you to use either ithreads (which is only encouraged 
for Win32 platform) or prefork (Linux).


Having said that, production servers should ideally be free of unstable 
code. So putting staging stuff in the same box is not advised, unless 
your clients are very forgiving. :)



Dylan Tynan wrote:


I’m looking at the information in mod_perl 2 User’s Guide (and online) 
about using VirtualHost and +Parent, with an ithreads-enabled Perl, in 
order to be able to modify @inc by virtualserver. On my system I 
basically have that setup, and have tried it, and it seems to work 
fine (I tried it with prefork, though that appears not to matter 
except for the inefficiency of course).


I’m wondering what would happen if I –didn’t—have an ithreads-enabled 
Perl, but still set up the httpd.conf with the virtual-host/+parent 
stanzas? Will it fail on startup with an error about +parent being 
unsupported or some other error? Or does it run fine but I end up with 
a shared @inc across all virtual servers perhaps? .. I have a 
somewhat limited customer set and each customer will probably run a 
test  production setup, with mostly the same code in each environment 
(thus @inc conflicts). I’m wondering what, if anything, they might see….


I take it the only real way around the above situation is either to 
use an ithreads-enabled Perl or to run separate apaches… is there some 
other way?


Thanks!

Dylan





Re: Question about open()

2008-02-10 Thread Foo JH

I do keep my templates in other directories also.

1. If your directories are relative to the document root, and you can 
take advantage of this fact by rendering a variable to remember the 
template path.
2. If your template directories have nothing in common with the document 
root, then you can set the variable via SetPerlVar within http.conf. 
That takes the 'hard' out of your code. :)





Mag Gam wrote:

Thanks for the quick response Perrin.
 
I am trying to change DocumentRoot because, currently I am using 
open()  to load templates for my website. I have header, menu, footer 
in 3 seperate files, and I generate content like that. It works fine 
now, just not too dynamic when I want to move the stuff around. I have 
open(/var/www/perl/header.file) hardcoded, which is a pain. I just 
want open (header.file).
 
If I do open(header.file) its trying to read from DocumentRoot ie. 
/var/www/header.inc, which does not exist.
 
 



 
On Feb 10, 2008 12:32 PM, Perrin Harkins [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


On Feb 10, 2008 12:24 PM, Mag Gam [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 my $docroot = $r-document_root('/var/www/html/perl');

Why are you trying to change the DocumentRoot?

- Perrin






Re: Apache 2.2.6, mod_perl 2.0.3 msvcrt.dll start problem

2008-02-10 Thread Foo JH

Randy,


I think characterizing the ASF binaries as unreliable with
mod_perl is misleading - there were some recent problems
with restarts, etc. on Win32 that have been looked into
and addressed for the 2.2.8 release.
The intent of my earlier response was not to undermine the quality of 
the ASF builds. I have been relying on the ASF binaries since 1.3 (even 
though it was not recommended for Windows). And it's only in the recent 
months that I have come to depend on another source until some of my key 
needs (on the binaries) are resolved. So please take it as just a layman 
sharing his experience and resolution on the problems.


Moving forward, I do see that there's some conversation about 
recompiling modperl based on the newer releases of ActivePerl. That's a 
very encouraging move.




- As you say, the ApacheLounge binaries use a different
compiler version which may in itself introduce some
problems.
Agreed. To date I still don't know what mess I've gotten myself into by 
using this hybrid stack. It's still looking good and I'm crossing my 
fingers. Maybe it's finally my lucky year...




- As well, the latest ApacheLounge binary distribution contains some 
changes:

   http://www.apachelounge.com/forum/viewtopic.php?p=9752
from the official ASF 2.2.8 sources, which isn't
apparent from the title Apache 2.2.8 available on
  http://www.apachelounge.com/

Noted.


I think it's fair to say the mod_perl developers will only
provide support for official ASF versions of Apache.

Since mod_perl is an ASF project, I guess it can't be helped. Personally 
I do applaud the 2nd take on the Win32 binaries that AL took. Having 
said that, at the end of the day everyone lives and dies with the ASF 
development.




Writing a startup module for modperl in Win32

2008-02-09 Thread Foo JH

Hi all,

I've done some refactoring recently on my mp2 app (on Win32), and 
succeeded in resolving the annoying startup issue (basically, does not 
start up well).


I've documented my experience in the following url:
http://jhfoo.multiply.com/journal/item/163/Writing_a_startup_module_for_modperl_in_Win32_Part_1

But for those who just want to know what did the trick, I included a 
simple mechanism to prevent the crashing during file IO:


use Thread::Semaphore;

$MyLib::sem = Thread::Semaphore-new
   if (!defined($MyLib::sem));

$MyLib::sem-down;
# do stuff here
$MyLib::sem-up;


Hope this helps

:






Re: Apache 2.2.6, mod_perl 2.0.3 msvcrt.dll start problem

2008-02-09 Thread Foo JH
I know. ApacheLounge uses a different (newer) compiler, and the 
implications can be quite risky. I've started on this path since the 
earlier 2.2.x when modperl on the ASF binaries has been unreliable, and 
support on the mailing list confirmed my experience more than resolved it.


Why don't you give it a try and see if you're having it better?

William A. Rowe, Jr. wrote:

Foo JH wrote:

Andre,

I've recently set up a test based very closely on your platform:
AP2.2.8
AP5.8.8 Build 822
MP2.0.3


You mention a VC 2005 build of httpd, which build of MP?  2005?

Not sure which uwinnipeg is built against, msvcrt or msvcr80.

But my recent observation is that if you use AS Perl, which is built
against msvcrt, it's likely best to use modperl built against msvcrt
as well.  I'm doubting httpd's clib has a whole lot to do with it.




Re: install mp2 on windows

2008-01-22 Thread Foo JH

Read this:
http://perl.apache.org/docs/2.0/os/win32/install.html

Jennifer G. wrote:

Hello,

How to install mp2 on windows XP? Does it need a VC complier? But I'm
not familiar with that complier and C/C++ language.
I have apache binary version installed but without modperl.thanks.
  




Re: get UserAgent

2008-01-20 Thread Foo JH

Isn't UserAgent just a header field? You can browse through the headers.

Jeff Pang wrote:

Hello,

what are the methods to get UserAgent setting in both mp1 and mp2?
I tried search,but got no results.
Thanks!

Regards,
Jeff Pang
  




Re: AP2.2.7 + MP2.0.3 on Win32

2008-01-17 Thread Foo JH
After some investigation, I realise that it's modperl on Win32 is still 
more stable on 2.2.4 (ApacheLounge). Some layman findings:
1. Apache2::Reload can cause the startup to crash easily. eg. when you 
load HTML::Template

2. Fault report on Events is like this:
Faulting application httpd.exe, version 2.2.7.0, faulting module 
msvcrt.dll, version 7.0.3790.3959, fault address 0x00037e23.
My interpretation is that it's to do with incompatibilities with the 
compiler used by ApacheLounge.
3. I tried MP2 on ASF's binary of 2.2.7, with similar results esp. on 
Apache2::Reload.


I've swung back to 2.2.4 and things are much happier now.

Foo JH wrote:

Hi all,

Just want to slap a quick note that I've tried the following combo on 
Win32 platform (Windows 2003 Server x86):

Apache 2.2.7 from ApacheLounge (apachelounge.com)
modperl 2.0.3 from theoryx5 (ppd)
libapreq 2.6.2 from theoryx5 (ppd)
Perl 5.8.8 (ActivePerl build 822)

The only thing I'm interested (the rest I take for granted) is that it 
survives a restart from the ApacheMonitor app. Had painful issues with 
past versions, so this is always my priority. I know Linuxians take it 
for granted...







AP2.2.7 + MP2.0.3 on Win32

2008-01-14 Thread Foo JH

Hi all,

Just want to slap a quick note that I've tried the following combo on 
Win32 platform (Windows 2003 Server x86):

Apache 2.2.7 from ApacheLounge (apachelounge.com)
modperl 2.0.3 from theoryx5 (ppd)
libapreq 2.6.2 from theoryx5 (ppd)
Perl 5.8.8 (ActivePerl build 822)

The only thing I'm interested (the rest I take for granted) is that it 
survives a restart from the ApacheMonitor app. Had painful issues with 
past versions, so this is always my priority. I know Linuxians take it 
for granted...





Re: Caching Packaging

2008-01-09 Thread Foo JH
If you're running your scripts in Apache2::Registry, your scripts are 
compiled on first go, and remain in memory subsequently.


When your script changes, the change should be detected, and 
recompilation is automatic. IMHO this is a real time saver as 
development goes.


do() is bad for speed optimisation as it's treated as a system call. 
What you want instead is to modify your header.pl into a package, and 
have your scripts call functions in the package. Minimise exec() calls 
as well (ideally you should not use it at all).



brett lee wrote:

Hello -

Am executing several CGI scripts under mod_perl using Apache::Registry (I hope 
that terminology is correct).  As I understand it, the scripts get cached in 
each httpd thread the first time that thread executes them.  Is this correct?

So when I change a script, do I need to restart Apache, flush the cache 
somehow, or does each thread automagically replace the cached copy with the 
updated one from disk?

Basic stuff, but I'm curious...

The main focus of my writing today is to get some guidance on the proper direction to 
take for this project.  Currently, each of the CGI scripts I have sources the 
same set of files (one for the header, another for the footer, etc).  Per the above 
questions, I don't how the mod_perl processes work to keep everything in sync but I can 
only imagine that having each of my CGI scripts source the same files from disk has to be 
grossly inefficient.

Am thinking that all these external scripts should be packaged up together into mod_perl 
somehow, but I don't know where I should be looking.  Can someone shed some light?  In 
doing so, one possible constraint is that I'm also executing the same external scripts 
from several SHTML files.  The CGI scripts call the filesystem based subroutines after 
initially sourcing them with 'do ./header.pl' whereas the SHTML files pass in a 
go argument to 'header.pl' to actually fire up the subroutine.  This allows 
me to execute them immediately using SHTML 'exec' calls and 'on demand' from the CGI 
scripts.

Thanks in advance for your guidance / direction.  
-Brett






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
  




Re: Theory and practice of mod_perl win32

2008-01-06 Thread Foo JH
Thinking from the perspective of the developer who tries very hard to 
avoid dealing with C/C++, can the ApacheLounge patches and compilation 
do the trick?


Caveat: have not read the dialog on the mailing list described.

William A. Rowe, Jr. wrote:

Anyone following the dialog on [EMAIL PROTECTED] and [EMAIL PROTECTED] is 
already
aware of problems users are hitting with httpd 2.2.7 and modperl.

Here's my current theory in search of a sanity check.

There are two general classes of 'major issues' that we are going to
encounter with msvc interop between httpd, perl and modperl.

  * malloc'ator flaws; memory allocated in one components heap and
later freed in another

  * stdio/posix io handles.  These don't map between one and another.

To solve the first issue, there is only one solution.  Because perl
and modperl are both managing perl memory allocate/free, those must
be compiled against the same msvc lib.  That means using perl's
compile hinting.  In practice, this may be the difference between
a user who says yup, works for me and those who fail utterly.
Likewise they should use an openssl etc which are compiled against
perl's choice, or that blows up for certain openssl-oriented xs's
which have the same tight integration.

To solve the second issue, I think we can hack it.

What if modperl verified, and reinitialized if necessary, the stdio
handles associated with its msvcrt during the register_hooks phase
and again during the open_logs hook (run as 'very last').  This should
ensure the stdio handles are legit even if httpd started under one
msvcr, while perl and modperl are running under another.

Just a thought, I have a bunch on my plate but I wanted to float a
possible solution.

Bill




Re: modperl on Win32 is still happening

2007-12-11 Thread Foo JH
Firstly: mod_perl is a good choice. :) There are other languages out 
there which can probably do the same job 90% of the time. But what you 
have chosen is a language that is:

1. OS independent
2. Highly extensible via CPAN
3. Fast to cook, good to eat

It's not a question of whether you can do job X with language Y, but 
it's more of how easily it is done, and how flexible it can be. mod_perl 
tends to do pretty well in that path.



Vladimir Yardan wrote:



I am on my way to studying mod_perl on Windows are you saying I should 
go for other choices? What is a good one for windows?




modperl on Win32 is still happening

2007-12-05 Thread Foo JH
Looking at the (albeit small) stream of entries to the mailing list, I'm 
actually quite happy to notice that people are:

1. Still using modperl. Some newbie questions may suggest fresh blood...
2. Still using modperl on Win32 (despite the 'limitations'). Good news 
for Microsoft, but I personally believe it's a gentle step for people to 
learn modperl, then move into the Linux/ BSD platform.





Looking for a career in Perl overseas

2007-12-05 Thread Foo JH

For what it's worth, I'm gonna try anyway...

I'm a Perl/ C# developer in Singapore with some 9 years in development, 
looking forward to enjoy a career in a new culture and environment 
(outside of Singapore). No criminal records, though some will claim I've 
sinned for learning C# instead of Java.


If your company is seeking an experienced developer, and is willing to 
relocate new staff, please contact me at [EMAIL PROTECTED]


Thanks.


Re: mod_perl.so is garbled - expected signature 41503232 but saw 41503230

2007-10-31 Thread Foo JH

Hello Noah,

I'm using FreeBSD as well, but I'm usually too scared to run cvsup 
because that usually (almost always) will cause my make install to fail.


Can you confirm if you did a cvsup-nogui as well? Can you explain how 
you do the 'apache configuration file update'?


Noah wrote:

thanks Andy.  I figured it out.  apache configuration file update :)


Andy Armstrong wrote:

On 31 Oct 2007, at 12:05, Noah wrote:

thanks Andy,

how can I choose to install an AP2.2 module from /usr/ports
I dont know how to make that change?



I've no idea I'm afraid - I was just decoding hexadecimal for you :)





Re: mod_perl MVC framework.

2007-10-24 Thread Foo JH
What is fast to cook, good to eat is HTML::Template. No XML, easy 
abstraction between your web designer and developer.


Tyler Bird wrote:

Hi List,

Hey I was wondering if there was any MVC framework that anybody on 
this list could point

me to that work work well with mod_perl.

We are having difficulty finding a good MVC framework for perl.

I have looked at HTML::Mason and the template toolkit today. I am not 
quite sure mason is a MVC framework.  The template toolkit looks 
promising.


Tyler




Re: Apache crashing

2007-10-10 Thread Foo JH
Your conf does not look complete. For example, I don't even see the 
following lines:

LoadFile Perl/bin/perl58.dll
LoadModule perl_module modules/mod_perl.so

LoadFile bin/libapreq2.dll
LoadModule apreq_module modules/mod_apreq2.so


Ian G. Tyndall wrote:

 My virtual host:

VirtualHost *:80
ServerName mysite.com
DocumentRoot X:/htdocs/sites/mysite_dev
ScriptAlias /cgi-bin/admin/
X:/htdocs/sites/mysite_dev/cgi-bin/admin/
ErrorLog logs/rt-error.log
Directory X:/htdocs/sites/mysite_dev
  Options +ExecCGI
  Order allow,deny
  Allow from all 
Files ~ \.(cgi)$

SetHandler perl-script
PerlHandler ModPerl::Registry
PerlSendHeader On
/Files
/Directory
/VirtualHost

Earlier in the conf, I'm doing:

PerlSwitches -IX:/perl/5.8.8/site/lib
PerlInitHandler Apache2::Reload
PerlHandler ModPerl::Registry

-Original Message-
From: Foo JH [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 09, 2007 12:43 PM

To: Ian G. Tyndall
Cc: modperl@perl.apache.org
Subject: Re: Apache crashing

What's your modperl config like?

Ian G. Tyndall wrote:
  

Ok, I decided to upgrade my Apache to see if that would fix things.

I installed 2.2.4, and I was getting the same error as originally 
reported... but more often.

Then, I upgraded to 2.2.6 from the Apachelounge... and now I'm getting



  

an error.

The error is as follows:

[Tue Oct 09 08:50:20 2007] [error] [client 192.168.3.28] failed to 
resolve handler `ModPerl::Registry': Can't load 
'X:/perl/5.8.8/site/lib/auto/Apache2/RequestRec/RequestRec.dll' for 
module Apache2::RequestRec: load_file:The specified procedure could 
not be found at X:/perl/5.8.8/lib/XSLoader.pm line 64.\n at 
X:/perl/5.8.8/site/lib/Apache2/XSLoader.pm line 31\nCompilation failed



  
in require at X:/perl/5.8.8/site/lib/ModPerl/RegistryCooker.pm line 
32.\nBEGIN failed--compilation aborted at 
X:/perl/5.8.8/site/lib/ModPerl/RegistryCooker.pm line 32.\nCompilation



  
failed in require at (eval 5) line 3.\n\t...propagated at 
X:/perl/5.8.8/lib/base.pm line 91.\nBEGIN failed--compilation aborted 
at X:/perl/5.8.8/site/lib/ModPerl/Registry.pm line 26.\nCompilation 
failed in require at (eval 4) line 3.\n


I did do a fresh install of ModPerl 2.0.3, and I've seen similar 
failed to resolve handler messages on the web... but nothing like


this.
  

Any suggestions/thoughts!

Thanks again,
Ian
 


-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 04, 2007 3:40 PM
To: Ian G. Tyndall
Cc: modperl@perl.apache.org
Subject: Re: Apache crashing

On Thu, 4 Oct 2007, Ian G. Tyndall wrote:

  


Oh the problems come and go so quickly!

I've got one cgi script that always crashes apache. The error log 
gives the following message:


[Thu Oct 04 11:38:29 2007] [crit] (22)Invalid argument: Parent: 
Failed

  
  


to create the child process.
[Thu Oct 04 11:38:29 2007] [crit] (OS 6)The handle is invalid.  :
master_main: create child process failed. Exiting.
[Thu Oct 04 11:38:29 2007] [notice] Parent: Forcing termination of 
child process 2474288


Other scripts run fine... so what would be the best way of debugging 
this.


I'm in the process of commenting out modules/code, but no luck so

  

far...
  


any recommendations?

I'm using mod_perl 2.0.3, perl 5.8.8, apache 2.0.59 on a Windows 2003
  


  

server.

Thanks,
Ian

  

Is this a cgi script, or a mod_perl registry script?
Although the log messages are generic, similar messages appear when 
one tries to restart apache with mod_perl enabled - if it's a cgi 
script, does commenting out the loading of mod_perl.so help?


As for tracking down the problem, reducing it to a minimal version 
will help. If you can do this, and don't see the problem, try posting 
it to the list here. Also, trying some of the debugging tips suggested



  

in the thread
   http://marc.info/?t=11913767701r=1w=2
may help, along with installing
   http://www.apache.org/dist/httpd/binaries/win32/#source
to help in the crash analysis.

--
best regards,
Randy
  



  




Re: Apache crashing

2007-10-09 Thread Foo JH

What's your modperl config like?

Ian G. Tyndall wrote:

Ok, I decided to upgrade my Apache to see if that would fix things.

I installed 2.2.4, and I was getting the same error as originally
reported... but more often.
Then, I upgraded to 2.2.6 from the Apachelounge... and now I'm getting
an error.

The error is as follows:

[Tue Oct 09 08:50:20 2007] [error] [client 192.168.3.28] failed to
resolve handler `ModPerl::Registry': Can't load
'X:/perl/5.8.8/site/lib/auto/Apache2/RequestRec/RequestRec.dll' for
module Apache2::RequestRec: load_file:The specified procedure could not
be found at X:/perl/5.8.8/lib/XSLoader.pm line 64.\n at
X:/perl/5.8.8/site/lib/Apache2/XSLoader.pm line 31\nCompilation failed
in require at X:/perl/5.8.8/site/lib/ModPerl/RegistryCooker.pm line
32.\nBEGIN failed--compilation aborted at
X:/perl/5.8.8/site/lib/ModPerl/RegistryCooker.pm line 32.\nCompilation
failed in require at (eval 5) line 3.\n\t...propagated at
X:/perl/5.8.8/lib/base.pm line 91.\nBEGIN failed--compilation aborted at
X:/perl/5.8.8/site/lib/ModPerl/Registry.pm line 26.\nCompilation failed
in require at (eval 4) line 3.\n

I did do a fresh install of ModPerl 2.0.3, and I've seen similar failed
to resolve handler messages on the web... but nothing like this.

Any suggestions/thoughts!

Thanks again,
Ian
 


-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 04, 2007 3:40 PM

To: Ian G. Tyndall
Cc: modperl@perl.apache.org
Subject: Re: Apache crashing

On Thu, 4 Oct 2007, Ian G. Tyndall wrote:

  

Oh the problems come and go so quickly!

I've got one cgi script that always crashes apache. The error log 
gives the following message:


[Thu Oct 04 11:38:29 2007] [crit] (22)Invalid argument: Parent: Failed



  

to create the child process.
[Thu Oct 04 11:38:29 2007] [crit] (OS 6)The handle is invalid.  :
master_main: create child process failed. Exiting.
[Thu Oct 04 11:38:29 2007] [notice] Parent: Forcing termination of 
child process 2474288


Other scripts run fine... so what would be the best way of debugging 
this.


I'm in the process of commenting out modules/code, but no luck so


far...
  

any recommendations?

I'm using mod_perl 2.0.3, perl 5.8.8, apache 2.0.59 on a Windows 2003 
server.


Thanks,
Ian



Is this a cgi script, or a mod_perl registry script?
Although the log messages are generic, similar messages appear when one
tries to restart apache with mod_perl enabled - if it's a cgi script,
does commenting out the loading of mod_perl.so help?

As for tracking down the problem, reducing it to a minimal version will
help. If you can do this, and don't see the problem, try posting it to
the list here. Also, trying some of the debugging tips suggested in the
thread
   http://marc.info/?t=11913767701r=1w=2
may help, along with installing
   http://www.apache.org/dist/httpd/binaries/win32/#source
to help in the crash analysis.

--
best regards,
Randy
  




Re: Apache 2.2.6 and mod_perl 2.0.3

2007-10-04 Thread Foo JH

Why don't you read about what's new in 2.2:
http://httpd.apache.org/docs/2.2/new_features_2_2.html

Jeff Pang wrote:

Hello,
Does apache2.2+mp2 have much advantage than apache2.0+mp2?

2007/10/4, Foo JH [EMAIL PROTECTED]:
  

You may want to hold back on 2.2.6. Use either 2.2.4 from ASF or 2.2.5
from ApacheLounge.

Tracy E Schreiber wrote:


Hi,

I believe that mod_perl 2.0.3 is not compatible with Apache 2.2.6. Starting
Apache gives this error:

httpd.exe: Syntax error on line 31 of D:/Apache/conf/httpd.conf: Cannot load
D:/Apache/modules/mod_perl.so into server: The specified module could not be
found.

This worked fine under 2.2.4, so the configuration is not the problem. The
mod_perl.so was retrived using ppm install
http://theoryx5.uwinnipeg.ca/ppms/mod_perl-2.0.ppd.

Any one able to get mod_perl.so to work with Apache 2.2.6

Thanks,
Tracy





  





Re: Best version of Apache for Win32 deployment

2007-10-03 Thread Foo JH


Right.  Except there is no 2.2.5; 
2.2.5 is not released on the Apache web site. Those who want this 
version can get it at ApacheLounge.



Of course 2.2.4 essentially worked, while 2.2.7 will give the modperl'ers
on Windows something they have BEGGED for forever, the chance to see parsing
errors at startup from their httpd.conf file(!!!)
  

Yes! It's been egging me for the longest blistering time!




Re: Best version of Apache for Win32 deployment

2007-10-03 Thread Foo JH

Octavian Rasnita wrote:
Regarding the best Apache for Windows, I have a problem running Apache 
under

windows and I think this thread might help me.

I tried Apache 2.2.4 with and without SSL support, and Apache 2.2.6 from
apachelounge, but they still don't work.
I'm using 2.2.4 now on Win32, and it's running good for me. Much much 
better than the 2.x.x series from the Apache site. Works on XP and W2k3.


A point to note though is that you should not use the modperl 
compilation from AL. Use the standard-issue one from theoryx5. Install 
libapreq2 from theoryx5 also.


Apache 2.2.6 is not recommended for Win32 iirc. Don't touch it.

Of course, your problems may be compounded (but I'm not sure) by the 
other components you are using (Catalyst)? For me, I'm just living off 
HTML::Template, DBI, and some other libraries. You may want to be more 
explicit on the errors you're encountering, and at which points did the 
install break.


Re: Best version of Apache for Win32 deployment

2007-10-03 Thread Foo JH



Because you used theoryx5's perl/modperl/libapreq2 built for VC8, along with
the AL build of 2.2.4 ALSO built for VC8, everything is dandy.

Equally if you used ActiveState perl (built VC6) + a VC6 build of modperl and
libapreq2 with the ASF distribution of httpd 2.2.4, everything is dandy.
  
Is there a VC6 build of modperl + libapreq2? I've been following the 
links on the ASF site, so it's always been theoryx5.


To date I've been using ActivePerl all the way, so it's still a combo of 
VC6 Perl + VC8 modperl. But so far so good...



Mix and match at your own risk.
  




Re: Best version of Apache for Win32 deployment

2007-10-03 Thread Foo JH



I haven't looked into this, but the fact that AL's
mod_perl (compiled, presumably, with VC8) doesn't
work with, again presumably, ActivePerl (compiled
with VC6) may be another example of the dangers
of mixing components compiled with VC6 and VC8.

Point taken.



Re: Best version of Apache for Win32 deployment

2007-10-03 Thread Foo JH
Sorry man, I'm not too familiar with Catalyst, so I can't pinpoint the 
problem. But if your tests are good with a clean install of Apache2 + 
mp2, you may want to check compiler used to build Catalyst (see Randy's 
email on the VC used for ActivePerl, Apache, and modperl). I suppose 
Catalyst is not a pure-perl implementation?


Re: Apache 2.2.6 and mod_perl 2.0.3

2007-10-03 Thread Foo JH
You may want to hold back on 2.2.6. Use either 2.2.4 from ASF or 2.2.5 
from ApacheLounge.


Tracy E Schreiber wrote:

Hi,

I believe that mod_perl 2.0.3 is not compatible with Apache 2.2.6. Starting 
Apache gives this error:


httpd.exe: Syntax error on line 31 of D:/Apache/conf/httpd.conf: Cannot load
D:/Apache/modules/mod_perl.so into server: The specified module could not be 
found.


This worked fine under 2.2.4, so the configuration is not the problem. The 
mod_perl.so was retrived using ppm install 
http://theoryx5.uwinnipeg.ca/ppms/mod_perl-2.0.ppd.


Any one able to get mod_perl.so to work with Apache 2.2.6

Thanks,
Tracy




  




Best version of Apache for Win32 deployment

2007-10-02 Thread Foo JH

Hi all,

Just want to share something I read today (fairly old news) at ApacheLounge:
http://www.apachelounge.com/forum/viewtopic.php?t=1907

Since many (most?) people who use Apache from Apache Lounge also use 
mod_fcgid and/or mod_perl, it seems that 2.2.5 will remain the best 
Apache version to use until Apache 2.2.7 comes out.


It is expected that new versions of mod_fcgid and mod_perl will be 
needed for Apache 2.2.7, because the proposed changes will not be 
backward-compatible with Apache 2.2.5 and earlier.


My point is that for Win32 modperlers, you may want to check out 2.2.5, 
and hold out for 2.2.7 (and a potentially new release of modperl to 
support it).


Re: Newbie - Samples or Tutorials

2007-09-23 Thread Foo JH

aqua wrote:

Thanks for your email. I am actually looking for current mod perl related 
tutorials and not just Perl related. This HoptScripts site contains 3 mod_perl related 
tutorials and they are very old (2000).
Why not drop by Amazon and pick up the mod_perl 2 book instead? It's 
just released:

http://www.amazon.com/mod_perl-Users-Guide-Stas-Bekman/dp/0977920119


Re: apache2 graphs

2007-09-19 Thread Foo JH

You can consider ImageMagick. It works on standard Perl apps as well.

Eli Shemer wrote:


Hey there

What replacement do I have for Apache::GD to work on mod_perl 2 ?

 


Thanks.

 





Re: The mod_perl2 User's Guide book is out

2007-09-10 Thread Foo JH

I've been waiting for this book for the longest time...

Stas Bekman wrote:

Hi everybody,

Jim Brandt, Allison Randal and I are happy to announce that the first 
book about mod_perl2: The mod_perl2 User's Guide has been published 
and available for purchase. See the book's site: 
http://modperl2book.org/ for details.


50% of this book's proceeds will go The Perl Foundation 
[http://www.perlfoundation.org/].


Please help us spread the word using your favorite social bookmarks 
service: digg, reddit, del.icio.us, etc.. Feel free to post the links 
here for others to vote for to avoid splits. Here is a quick way to 
access many of those services at once:
http://socialposter.com/generator.php?c=alltip=linksurl=http%3A%2F%2Fmodperl2book.org%2Ftitle=mod_perl2%20User's%20Guidetext= 



Thank you and enjoy the book!





Re: PerlRequire executed 4 times on apache startup

2007-08-28 Thread Foo JH
I've had this same experience on Win32 Apache 2 as well. It could be 
related to the MPM model that the Win32 implementation employs.


Tobias Zeising wrote:

Hi all,

I have a weird problem: on startup apache executes 4 times a Perl Script
I included via

 PerlPostConfigRequire startup.pl

in the httpd.conf. The startup script contains following code:

 #!/usr/bin/perl

 my $file = 'c:\tmp\test.txt';
 open(INFO ,$file) || die Error $!;
 print INFO test\n;
 close INFO;
 print STDERR test...\n;
 1;

After starting the apache server (with an empty test.txt) the error.log
contains as expectet one time test... and the test.txt contains
curiously four times test. That means apache has executed the
startup.pl four times.

I have found http://modperlbook.org/html/ch04_07.html but that apache
config test would only explain the execution of two times.

Actually the startup.pl contains some code for preloading a huge amount
of modules, so this needs about 10 seconds instead of 2 or 3.

Hope anybody knows or can explain this behaviour.

Thanks and best regards
 Tobi
  




Re: Migrate LWP::UserAgent + HTTP::Request to mod_perl2

2007-08-27 Thread Foo JH
What's the error msg you see?

Nguyen Vu Hung wrote:
 Hi all,

 The following code run without problems under Apache 1.3.29, Perl 5.6.1,
 mod_perl 1.29.

 Under the new environment which is Apache 2.0.52, Perl 5.8.8, mod_perl
 2.0.3 ( Cent OS 4.5 ), it won't run.

 I have read through mod_perl2's compat page[1] and rename[2] page, but I
 didn't find any useful information on how to get this code running under
 the new environment.

 Please shed me a light!

 use LWP::UserAgent;
 use HTTP::Request;

 my $user_agent = LWP::UserAgent-new;
 my $ua_request HTTP::Request-request-new($some_request});
 $ua_request-content_type('application/x-www-form-urlencoded');
 $ua_request-content($param);
 my $rreq = $ua_request-content_ref;
 $$rreq =~ s/%2F/\//g;
 $req-header('Content-Length' = length($ua_request-content));
 my $respond = $user_agent-request($ua_request);

 unless ($respond-is_success) {
 # $respond failed HERE! why?
 }

 [1] http://perl.apache.org/docs/2.0/user/porting/compat.html
 [2] http://perl.apache.org/docs/2.0/rename.html
   



Re: Internal Server Error

2007-08-23 Thread Foo JH

Hello Perrin,

I'm interested in how you defined your handler with the 'method' attribute:
sub handler : method {
...

I've read http://perldoc.perl.org/attributes.html about attributes, but 
it does not seem to suggest that tagging the method attribute to 
subroutine has any programming advantages, unless you're interested to 
list the subroutines with that attribute. But I suspect there's more to it.


Perhaps you can clue me in on this?

Perrin Harkins wrote:

On 8/21/07, Jeff Pang [EMAIL PROTECTED] wrote:
  

PerlHandler Package::Name

instead of:

PerlHandler Package::Name-handler

  

So on the first case,we need to write the handler as
sub handler { my $r = shift; ...}
because Apache may call the function directly as Package::Name::handler.

on the second case,we write handler as,
sub handler { my $class = shift; my $r = shift; ... }
because '-' is a method calling.



For method handlers, you also have to declare it differently.

In mod_perl 1:
sub handler ($$) {

In mod_perl 2:
sub handler : method {

- Perrin
  




Re: Configuring Mod_perl and Apache web Server

2007-08-21 Thread Foo JH

Read up on this document and other related ones:
http://perl.apache.org/docs/2.0/user/config/config.html

Read this also:
http://perl.apache.org/docs/2.0/os/win32/index.html

usha rani wrote:

hi,
 
We would like to have information regarding configuration of 
MOD_PERL 2.0.3 with Apache Server -2.2.4 mailto:[EMAIL PROTECTED]

version in cygwin.
  
 I need some information regarding configuration of httpd.conf  
file, what are the changes we have to make

 in httpd.conf file for MOD_PERL.
 
 If any one knows the information please reply back to me.
 
with thanksregards,

Usha.

--
www.g-billboards.com http://www.g-billboards.com




Re: Using Apache 2.2 from ApacheLounge for Win32 modperl

2007-08-20 Thread Foo JH



Actually note that it isn't a release and is being rerolled.  Seems
Apachelounge is doing themselves and their users a disservice, again.
  
I disagree. ApacheLounge's binary distribution is the only one that 
(configured with modperl) survives an application restart. As I posted 
in an earlier mail, ASF's binaries do not work in modperl setups. So far 
I have not received any response (only verifications) that contradict my 
findings.


I applaud the people who put in effort (AND maintain a web site for 
that) to fix a long-standing problem, and share it with the 
professionals at large. It's a lot of work, and it takes a great spirit 
to think for the rest of us code compiler noobs.





Re: Using Apache 2.2 from ApacheLounge for Win32 modperl

2007-08-20 Thread Foo JH




This might be a result of what was mentioned before about possible 
problems using the binaries from http://www.apachelounge.com/download/ 
(which is compiled with VC++ 2005) with ActivePerl and 
ActivePerl-compatible ppm packages (which are compiled with VC++ 6). 
Mixing these can lead to conflicts, as discussed at, eg,

 http://search.cpan.org/src/SHAY/Win32-UTCFileTime-1.46/INSTALL
You're probably right. The only saving grace is the Apache binaries seem 
to be nicely decoupled from the modperl/ libapreq2 code. I have not had 
much issues marrying them together. The only thorn I'm dealing with is 
that spaces in directory names is not good.


But I can live with that.




Using Apache 2.2 from ApacheLounge for Win32 modperl

2007-08-18 Thread Foo JH

Hi all,

While ApacheLounge makes available a Win32 binary of Apache2.2 that 
seems to work better for modperl than the distribution from apache.com, 
be advised that if you intend to use libapreq2, you may not want to use 
the mod_perl binary from ApacheLounge.


I don't have the technical details, but if you try to use ApacheLounge's 
mod_perl and theoryx5's libapreq, you will not be able to use 
Apache2::Reload at the very least.


For some reason, the MSI version of ActivePerl (tested with build 822) 
is more stable than the AS version in terms of starting up httpd on 
system startup, and service restarts. So please avoid the latter.


My recommendation:
1. Use the Apache2.2.x binary from ApacheLounge
2. Use the MSI version of ActivePerl, NOT the AS version
3. Use the mod_perl library from theoryx5, NOT from ApacheLounge
4. Use the libapreq2 library from theoryx5

Tested on Windows XP SP2 x86



Using modperl from ApacheLounge

2007-08-14 Thread Foo JH

Hi all,

Earlier on I was sharing the discovery of an alternative binary for 
Apache on Win32 at Apache Lounge (http://http://www.apachelounge.com). 
Here are some updates on the implementation:


1. There are binaries for Apache 2.2 and modperl2, but none for 
libapreq2. The ppd from theoryx5 works though.


2. Still have to be careful with spaces in directories. Seems to work, 
though OS will pop up a httpd failure message. Can be scary to the client.


3. Apache2::Reload seems to be responsible for crashing the httpd 
service at OS startup. But if you take omit it from httpd.conf during 
the first Apache service start, stop the service, add it 
(Apache2::Reload) back in, Apache will start and restart without 
problems. In other words, you can use it during development, but not 
during deployment.







Frustration over Apache 2.0/ 2.2 restart failure = possible package found

2007-08-13 Thread Foo JH

Hello Henrik, all,

With kind references from the modperl community, I've managed to confirm 
a working Win32 modperl stack that will survive an apache restart based 
on zero application code config. Not only does this stack do exactly 
that, it is based on a more recent Visual C++ compiler, and claims 
improved performance over the reference binary from Apache.


Please check out the binaries from:
http://www.apachelounge.com/download/

To summarise the procedures:
1. Install Apache 2.2 binaries from ApacheLounge
2. Install ActivePerl (I tested on build 822)
3. Install modperl via ppd from ApacheLounge
4. Install libapreq2 from http://theoryx5.uwinnipeg.ca/ppms/
5. Insert the following into httpd.conf
ServerSignature on
LoadModule perl_module modules/mod_perl.so
LoadFile C:/Apache2/bin/libapreq2.dll
LoadModule apreq_module modules/mod_apreq2.so

My test OS is Windows 2003.

Henrik, I hope this is good news for you.

Thanks guys.

Henrik Schak Hansen wrote:

Hi Foo

I finally gave up on Apahce/modperl2 on win32 in various version
combinations. I kept hoping that newer versions of apache/modperl would
stabilize it but rather it seemed to get worse. Daily apache/modperl
would fail and modperl would restart maybe 10 time within a few minutes
before finally working again. Only because I have a load balancer in
front of several web servers have I been able to keep going.
Anyway, now I have moved to Linux a week ago, and so fare I haven't
experienced any problems (except having to tweak different parameters).
So I cross my fingers and hope it will stay this way.

Not much of help for you I know, but I remember we have talked about
this before

Regards
Henrik Schak Hansen




-Oprindelig meddelelse-
Fra: Foo JH [mailto:[EMAIL PROTECTED] 
Sendt: 10. august 2007 10:10

Til: modperl@perl.apache.org
Emne: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

Hi all,

I am rather disappointed (and a little frustrated as well) on modperl's
inability to survive an Apache restart on the Windows platform. The
platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) +
modperl2 + libapreq2

I have come to accept the fact that once in a while modperl on Win32
will segfault, but the old Apache I tried (year 2005 iirc) seems to
recover, though it threw a windows fault dialog that scared the wits out
of my clients. But this time it's just unacceptable. The odd thing is,
if you try to start apache after it failed, it will fail again. You have
to wait about a minute (or more) before starting the server.

I don't mind any creative workarounds. Please share with me any
suggestions or tips that can circumvent this. Thanks much.


---
[Denne E-mail blev scannet for virus af Declude Virus]
[This E-mail was scanned for viruses by Declude Virus]

  




Re: SV: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

2007-08-12 Thread Foo JH

William, the point I was trying to make is:

1. My restart test scope merely loads modperl + libapreq. There is ZERO 
application code loaded. In other words, all I did after installing 
modperl + libapreq is to ONLY load them into httpd.conf:

LoadFile c:/Perl/bin/perl58.dll
LoadModule perl_module modules/mod_perl.so

LoadFile bin/libapreq2.dll
LoadModule apreq_module modules/mod_apreq2.so

Noticed there is no other code loaded. No database used. Super duper 
minimal test model.


2. When you said that you managed to get modperl to survive an apache 
restart on a Win32 OS, I'm really keen to understand how you have done 
it differently. Is it because you are not using libapreq? Or is the 
default installation settings not optimal?



Foo, you missed my point all together.

Something in YOUR PERL APP is opening resources that are locked and will
prevent another process from obtaining them for approx 60 seconds.

What, why and how are your puzzles, I'm afraid.  There's nothing in the
generic apache/perl/modperl that did this to you.

More debugging logs, finer debugging details might help you pin it down.
  




Re: SV: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

2007-08-11 Thread Foo JH

Hello Perrin, William

Unfortunately I'm packaging a product based on modperl, so I can't 
really take any shortcuts on this one.


William, my installation process is (what I hope to be) straight out of 
the book. To elaborate:

1. Install ActiveState Perl MSI 5.8.8 (build 822)
2. Install Apache2.2.4 MSI
3. Install modperl as per documentation on httpd.apache.org. Ie: perl 
install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd

4. Install libapreq from theoryx5

In my http.conf, I only added the following:
LoadFile c:/Perl/bin/perl58.dll
LoadModule perl_module modules/mod_perl.so

LoadFile bin/libapreq2.dll
LoadModule apreq_module modules/mod_apreq2.so

Apache/ modperl starts up fine, but if I try to restart the service, it 
will not survive.


Please share with me any tips to improve the situation. I'm open to any 
ideas.


Thanks.



Perrin Harkins wrote:

On 8/10/07, Foo JH [EMAIL PROTECTED] wrote:
  

The sad truth is that my clients are more comfortable with Windows OS



Is it possible that if they have a small enough site to run
comfortably on Windows, they can run it through CGI?  I suspect that
whatever issue you're having with mod_perl could be fixed, but it
seems pointless to fight with it if the site has low traffic and can
run as CGI.

- Perrin
  




Re: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

2007-08-10 Thread Foo JH

Hi all,

A little more tests reveal the following:

If Apache was not installed in the default location (c:\program 
files\apache foundation\apache2.2) and instead installed into a path 
that does not have spaces (eg. c:\Apache2.2), while restarting will 
still fail, you can manually start the service again much faster; almost 
immediately after it stops. It is possible to write a monitoring windows 
service to start the apache service if it detects that it has stopped, 
but it's not quite the elegent solution that people want to hear about.


So while it's better, it's still not good enough. Apache must still be 
able to perform a restart on its own.


Any suggestions?

Foo JH wrote:

Hi all,

I am rather disappointed (and a little frustrated as well) on 
modperl's inability to survive an Apache restart on the Windows 
platform. The platform combo tested are Windows 2003 + Apache 2.2 (and 
Apache 2.0) + modperl2 + libapreq2


I have come to accept the fact that once in a while modperl on Win32 
will segfault, but the old Apache I tried (year 2005 iirc) seems to 
recover, though it threw a windows fault dialog that scared the wits 
out of my clients. But this time it's just unacceptable. The odd thing 
is, if you try to start apache after it failed, it will fail again. 
You have to wait about a minute (or more) before starting the server.


I don't mind any creative workarounds. Please share with me any 
suggestions or tips that can circumvent this. Thanks much.






Re: SV: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

2007-08-10 Thread Foo JH

Hello Henrik,

Yes we have conversed earlier and shared the pain on this same point. My 
FreeBSD installations were relatively painless in comparison to the 
Win32 counterparts.


The sad truth is that my clients are more comfortable with Windows OS, 
and I have to support our products on this platform. It's either I get 
modperl to work, or we have a product overhaul to move over to .NET 
(which I hope will not happen).


It's quite strange that nobody else has this problem. It's definately a 
critical operational concern. I am starting to suspect that Perl/ 
modperl is quietly exclusive to the non-Windows world.


I hope someone in this community can prove me wrong...

Henrik Schak Hansen wrote:

Hi Foo

I finally gave up on Apahce/modperl2 on win32 in various version
combinations. I kept hoping that newer versions of apache/modperl would
stabilize it but rather it seemed to get worse. Daily apache/modperl
would fail and modperl would restart maybe 10 time within a few minutes
before finally working again. Only because I have a load balancer in
front of several web servers have I been able to keep going.
Anyway, now I have moved to Linux a week ago, and so fare I haven't
experienced any problems (except having to tweak different parameters).
So I cross my fingers and hope it will stay this way.

Not much of help for you I know, but I remember we have talked about
this before

Regards
Henrik Schak Hansen




-Oprindelig meddelelse-
Fra: Foo JH [mailto:[EMAIL PROTECTED] 
Sendt: 10. august 2007 10:10

Til: modperl@perl.apache.org
Emne: [mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

Hi all,

I am rather disappointed (and a little frustrated as well) on modperl's
inability to survive an Apache restart on the Windows platform. The
platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) +
modperl2 + libapreq2

I have come to accept the fact that once in a while modperl on Win32
will segfault, but the old Apache I tried (year 2005 iirc) seems to
recover, though it threw a windows fault dialog that scared the wits out
of my clients. But this time it's just unacceptable. The odd thing is,
if you try to start apache after it failed, it will fail again. You have
to wait about a minute (or more) before starting the server.

I don't mind any creative workarounds. Please share with me any
suggestions or tips that can circumvent this. Thanks much.


---
[Denne E-mail blev scannet for virus af Declude Virus]
[This E-mail was scanned for viruses by Declude Virus]

  




[mp2+Win32] Frustration over Apache 2.0/ 2.2 restart failure

2007-08-10 Thread Foo JH

Hi all,

I am rather disappointed (and a little frustrated as well) on modperl's 
inability to survive an Apache restart on the Windows platform. The 
platform combo tested are Windows 2003 + Apache 2.2 (and Apache 2.0) + 
modperl2 + libapreq2


I have come to accept the fact that once in a while modperl on Win32 
will segfault, but the old Apache I tried (year 2005 iirc) seems to 
recover, though it threw a windows fault dialog that scared the wits out 
of my clients. But this time it's just unacceptable. The odd thing is, 
if you try to start apache after it failed, it will fail again. You have 
to wait about a minute (or more) before starting the server.


I don't mind any creative workarounds. Please share with me any 
suggestions or tips that can circumvent this. Thanks much.




Re: Can't call method prepare on an undefined value

2007-07-22 Thread Foo JH
Does this happen during idle period? MySQL does disconnect when the idle 
is too long.


Dustin D. wrote:
I'm having countless problems with mod_perl and not even sure where to 
start.  I thought I had mod_perl up and running in my development 
environment, so I pushed the new changes + apache configuration out to 
my production environment, and immediately began tail -f on the logs.


What I noticed was, most of the time, everything was working fine.  
But it seemed like every few minutes, there would be a burst of the 
following errors:


Can't call method prepare on an undefined value at 
modules//MySQLBroker.pm line 1059.\n


What's strange is, when this error would pop up, it would flood 5-10 
errors like this in a row, all within the span of a few seconds.  Then 
things would return to normal and I wouldn't get any errors for awhile.


On my site, I'm getting hits every couple of seconds, if not more 
frequently.  In my startup.pl, I have something like this to 
initialize the MySQL connection:


Apache::DBI-connect_on_init(DBI:mysql:mydb: 127.0.0.1 
http://127.0.0.1, dustin, mypass,

{
 PrintError = 1, # warn( ) on errors
 RaiseError = 0, # don't die on error
 AutoCommit = 1, # commit executes immediately
}
);

(NOTE: for the hostname, I was using localhost for awhile, and decided 
to use a direct ip in case localhost is actually being resolved, to 
get rid of one more layer of translation)


My code around line 1059 in MySQLBroker.pm looks like this:

sub _mysql_exec {
  my ($self, $dbcall) = @_;
  my @resultsArray;
  my $count=0;
  my $sth = $self-{_dbh}-prepare($dbcall);
  $sth-execute or die Cannot execute database command!;
  while (my @array = $sth-fetchrow) {
push @resultsArray, [EMAIL PROTECTED];
  }
  $sth-finish;
  return [EMAIL PROTECTED];
}

Also, on a fairly inconsistent basis, I'm also getting not a CODE 
reference errors.


To me, it just seems like mod_perl is very unreliable and 
unpredictable.  The same code that worked reliably (albeit slow) in 
the CGI world is now extremely unpredictable in the mod_perl world.


FYI, I'm aware of the persistent state issues in a mod_perl world and 
have gone to great lengths to debug any persistent state issues that 
might be affecting things.


At this point in time, I'm extremely tempted to rewrite everything in 
PHP.  I really want to avoid that, but mod_perl is causing me too many 
headaches to justify it, as I've already wasted a week of effort 
trying to migrate my site from CGI to mod_perl.


Thanks,
Dustin




Re: DBI and threaded MPM

2007-07-11 Thread Foo JH

Anthony Gardner wrote:
Perrin, I never received your mail (actually, I hardly receive any 
mails form this list) I have to go to the archives to see if I've 
received any replies or to see what's been posted in general!!
You may want to check with your email admin on this. There's posting on 
this list almost daily!




Re: UTF-8 in mod_perl

2007-07-11 Thread Foo JH

You will want to do 2 things:
1. Set the content type to utf8 ($r-content_type)
2. Encode your output to utf8 (if it's not done already. Sometimes it's 
just latin1)



Cristina Nunes wrote:

Hi.

I was wondering how I could set the mod_perl (1.x) STDOUT (and STDERR)
to expect utf8 char encoding?

In perlrun, you can just set it by using -CS parameter, ie, `perl -CS
-le 'print olé'`, or at runtime binmode(STDOUT, :utf8);

Thanks,
Cristina





ModPerl on Apache 2.2 not suitable for Windows platform

2007-07-09 Thread Foo JH

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!

2007-07-09 Thread Foo JH

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!

2007-07-08 Thread Foo JH
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/WS/1/Auth.pm 
line 32.\nBEGIN failed--compilation aborted at 
/home/httpd/musicbrainz/mb_server/cgi-bin/MusicBrainz/Server/Handlers/WS/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/mod_perl.h:1270: 
error: expected ')' before '*' token
/usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1281: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1282: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1283: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1284: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1290: 
error: expected ')' before '*' token
/usr/lib/perl5/auto/Apache/include/modules/perl/mod_perl.h:1291: 
error: expected ')' before '*' token

API.c: In function 'XS_Apache__AuthDigest__API_note_digest_auth_failure':
API.c:24: error: 'Apache' undeclared (first use in this function)
API.c:24: error: (Each undeclared identifier is reported only once
API.c:24: error: 

Re: Performance Questions

2007-07-08 Thread Foo JH




Let us know how it goes - using XSLT that way is often desirable from 
a developer's point of view, but is usually impractical due to the 
processing overhead.  If you end up successfully using this technique 
in production without complaints from users please let the list know, 
I'm sure a few other people are curious too!
Just a personal opinion: wouldn't xslt juice out the cpu faster than a 
conventional template engine (eg. HTML::Template)? If you are running a 
fairly high-use environment, you may want to implement stuff that is 
easy on the processor.


Thinking aloud though, perhaps if the xslt engine caches the compiled 
xslt file, performance may improve...




  1   2   >