RE: mod_perl mod_php

2002-09-01 Thread grant stevens

all-

Interesting topic, to be sure.  Although no one touched on the relationship 
I almost always see between Perl and PHP:  Rapid Application 
Deployment.  You can get a massively complex application out to users as a 
beta much more quickly with PHP (Sorry Perl), additionally capitalizing on 
the fast ramp-up to make junior developers actually useful.  Correct me if 
I'm wrong, but I thought that was why languages like PHP and Python existed 
in the first place.


 I'm using both at work because we're slowly migrating from PHP to Perl.
 PHP is better than Perl in some cases, I've found. If you're
 predominantly templating and don't want to futz around with Mason or TT
 or whatever, PHP will do a fine job.

I'm considering changing my stationery to that quote, it is so right on.

 But there are some good
 things written in PHP, it's just that there are a WHOLE lot more people
 writing PHP than Perl (just look at the mailing lists and script
 archives).

Isn't that the Bazaar we open-sourcers dreamed of?  A million users, who 
also happened to be developers?  Except that the mailing lists are 
comparatively useless, point taken.  mod_perl is viewed by the unitiated as 
a Cathedral for all practical purposes, even if it is the One True Language.
One final point:  everyone else besides developers care about one thing: 
using a working application.  They give no flying expletives whatsoever 
about what language or platform it is in.  Those of you not saying Duh! 
right now may want to take a moment or two to mull.

Thanks to all who contributed to this topic: what makes this mailing list 
great is that in addition to gaining insight into mod_perl development, you 
gain insight into mod_perl developers.

grant stevens
http://l-eet.com
   




Re: mod_perl mod_php

2002-08-30 Thread Iain Truskett

* Jie Gao ([EMAIL PROTECTED]) [30 Aug 2002 09:49]:
 On Thu, 29 Aug 2002, Jesse Erlbaum wrote:
[...]
  I notice that you are using mod_perl AND mod_php.
 
  I have a general question for the list: Do people often use BOTH of
  these environments at the same time? It seems to me that there would
  be little benefit to using both. Am I mistaken?

 It happens when somebody wants to use php and you don't want to use
 it.

We had both for a while --- then I got fed up and rewrote the small
amount of PHP into Mason. I've been happier ever since =)


cheers,
-- 
Iain.



Re: mod_perl mod_php

2002-08-30 Thread Cees Hek

Quoting Jesse Erlbaum [EMAIL PROTECTED]:

 I have a general question for the list:  Do people often use BOTH of these
 environments at the same time?  It seems to me that there would be little
 benefit to using both.  Am I mistaken?

We have some old apps that are written in PHP, but are predominantly a perl 
shop.  To keep the apache processes from getting too big, we just run 3 apache 
servers currently bound to different IPs, but probably moving to a rev-proxy 
system when it is needed.

Cees



Re: mod_perl mod_php

2002-08-30 Thread Peter J. Schoenster

On 29 Aug 2002 at 19:47, Jesse Erlbaum wrote:

 I notice that you are using mod_perl AND mod_php.
 
 I have a general question for the list:  Do people often use BOTH of
 these environments at the same time?  It seems to me that there would be
 little benefit to using both.  Am I mistaken?

Most people on this list, it seems, work on rather large sites where 
they have at least ONE server. I work on small mom-and-pop sites which 
run on virtual servers. PHP is far, far easier to deploy on these 
ubiquitous virtual servers. I have in fact moved my apps from mod_perl 
because the market is just not there if your audience is mom-and-pop 
(ymmv). This is my primary server:

 Apache/1.3.26 OpenSSL/0.9.6g (Unix) ApacheJServ/1.1 mod_perl/1.21
 PHP/4.0.6

BTW, since someone asked about PHP code, I have been doing a lot of 
work in PHP lately. I took over for some Russian programmers on one 
project  no comments, none, at least 100 php files throughout the 
site, proprietary templating system, scope is not by file but by site 
:) And I've been working on jawamail and that's quite fun. I would much 
rather work on code written by others in Perl than what I see in PHP. 
Most of the PHP reminds me of the older Perl4 style where a programmer 
might repeat the same code very 20 lines :) But there are some good 
things written in PHP, it's just that there are a WHOLE lot more people 
writing PHP than Perl (just look at the mailing lists and script 
archives).

Peter


---
Reality is that which, when you stop believing in it, doesn't go
away.
-- Philip K. Dick




RE: mod_perl mod_php

2002-08-30 Thread Jesse Erlbaum

Hey Peter --

 I took over for some Russian programmers on one project 

Wow... Sounds like there's a story in there somewhere!  Is your client
suffering from globalization woes?  :-)


 Most of the PHP reminds me of the older Perl4 style where a programmer
 might repeat the same code very 20 lines
[...]
 ...there are a WHOLE lot more people writing PHP than Perl

Sounds like there would *HAVE* to be!  grin


TTYL,

-Jesse-





mod_perl mod_php

2002-08-29 Thread Jesse Erlbaum

Hi Ufuk --

 Well what you said is true. I actuallay had perl 5.6.1 but I
 tried to use an
 old httpd executable compiled with 5.6.0. Adding directories to @INC would
 help me but each time before I would start httpd, I'd have to do that.
 Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped (for
 sure)


I notice that you are using mod_perl AND mod_php.

I have a general question for the list:  Do people often use BOTH of these
environments at the same time?  It seems to me that there would be little
benefit to using both.  Am I mistaken?


TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226





Re: mod_perl mod_php

2002-08-29 Thread Jie Gao

On Thu, 29 Aug 2002, Jesse Erlbaum wrote:

  Well what you said is true. I actuallay had perl 5.6.1 but I
  tried to use an
  old httpd executable compiled with 5.6.0. Adding directories to INC would
  help me but each time before I would start httpd, I'd have to do that.
  Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped (for
  sure)


 I notice that you are using mod_perl AND mod_php.

 I have a general question for the list:  Do people often use BOTH of these
 environments at the same time?  It seems to me that there would be little
 benefit to using both.  Am I mistaken?

It happens when somebody wants to use php and you don't want to use it.



Jie




Re: mod_perl mod_php

2002-08-29 Thread Ufuk Yuzereroglu

I just HAVE to use it since I am moving and already working environemtn to a
new platform. I would neither use both if I were given the chance

Ufuk

- Original Message -
From: Jesse Erlbaum [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 29, 2002 4:47 PM
Subject: mod_perl  mod_php


 Hi Ufuk --

  Well what you said is true. I actuallay had perl 5.6.1 but I
  tried to use an
  old httpd executable compiled with 5.6.0. Adding directories to @INC
would
  help me but each time before I would start httpd, I'd have to do that.
  Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped
(for
  sure)


 I notice that you are using mod_perl AND mod_php.

 I have a general question for the list:  Do people often use BOTH of these
 environments at the same time?  It seems to me that there would be little
 benefit to using both.  Am I mistaken?


 TTYL,

 -Jesse-


 --

   Jesse Erlbaum
   The Erlbaum Group
   [EMAIL PROTECTED]
   Phone: 212-684-6161
   Fax: 212-684-6226










Re: mod_perl mod_php

2002-08-29 Thread Andy Lester

 I have a general question for the list:  Do people often use BOTH of these
 environments at the same time?  It seems to me that there would be little
 benefit to using both.  Am I mistaken?

I'm using both at work because we're slowly migrating from PHP to Perl.

PHP is better than Perl in some cases, I've found.  If you're
predominantly templating and don't want to futz around with Mason or TT
or whatever, PHP will do a fine job.

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$)
[unpack'C*',n2]3%+\34.'%.'^%4+!o.'])



Re: mod_perl mod_php

2002-08-29 Thread Iain Truskett

* Andy Lester ([EMAIL PROTECTED]) [30 Aug 2002 10:33]:

[...]
 PHP is better than Perl in some cases, I've found. If you're
 predominantly templating and don't want to futz around with Mason or
 TT or whatever, PHP will do a fine job.

I'm naturally biased toward Perl, and generally the PHP I've seen sucks
(written by a non-programmer futzing around with third-hand code).

Is there good PHP code out there?

(I don't want to get into a war over PHP vs Perl, so please don't start
one.)


cheers,
-- 
Iain.



RE: mod_perl mod_php

2002-08-29 Thread Jesse Erlbaum

Hey Andy --

 I'm using both at work because we're slowly migrating from PHP to Perl.

That reminds me of a project I started last year.  We were charged with
assuming responsibility for a website built on ColdFusion.  We moved the
site from Solaris/Netscape-Commerce to Linux/Apache-mod_perl.  Eventually,
we intend to strip out as much of that ColdFusion nastiness as we can and
replace it with Perl.

It's great to be able to stack environments.  The concurrent environments
(ColdFusion coexisting with mod_perl) is letting us do so over time.

TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226








Re: dyld problems with Apache 1.3.19 and mod_perl/mod_php on Mac OSX 10.0.03

2001-06-01 Thread Ged Haywood

Hi there,

On Fri, 1 Jun 2001, Martin Redington wrote:

 I'm having some some difficulties with Apache 1.3.19 and 
 mod_perl/mod_php. [On Mac OS X]

Never built on the Mac myself, some people had trouble, looks like you're
an expert.  From what I see on the mod_perl List about mod_perl and PHP on
*other* operating systems they don't always play together too well so you
perhaps can expect a few teething problems.

Have you been keeping an eye on the mod_perl lists lately at all?

The reason I ask is that there have been some recent discussions about
mod_perl on MacOS X and if you've not seen them it might be worth your
while browsing.  Only in the last few weeks, maybe a couple of months.

Check out the DIGEST too.

Sorry if this isn't too much help.  Maybe you'll get something more
concrete when people start to disagree with me. :)

73,
Ged.





Re: dyld problems with Apache 1.3.19 and mod_perl/mod_php on Mac OS X 10.0.03

2001-06-01 Thread Martin Redington


On Friday, June 1, 2001, at 08:33  am, Ged Haywood wrote:


 On Fri, 1 Jun 2001, Martin Redington wrote:

 I'm having some some difficulties with Apache 1.3.19 and
 mod_perl/mod_php. [On Mac OS X]

 Never built on the Mac myself, some people had trouble, looks like 
 you're
 an expert.

I was lucky enough to have built everything before, on Linux, and to 
have the
hints and tips from the stepwise and Mac OS Hints crew ...

  From what I see on the mod_perl List about mod_perl and PHP on
 *other* operating systems they don't always play together too well so 
 you
 perhaps can expect a few teething problems.

I'm pretty sure  that this is OS X specific. The dyld issue with 
multiple definitions is a known issue (see the libtool man page). Apache 
contains a patch which installs error handlers for multiple definitions, 
which ignores them (although its not clear to me if this code actually 
get compiled on OS X, there's a change note for Apache that suggests its 
no longer required).


 Have you been keeping an eye on the mod_perl lists lately at all?

 The reason I ask is that there have been some recent discussions about
 mod_perl on MacOS X and if you've not seen them it might be worth your
 while browsing.  Only in the last few weeks, maybe a couple of months.

I've searched the mod_perl (and other) archive(s) pretty extensively. Try
google with 'Mac OS X dyld multiple definitions to see some posts. Lots 
of people
seem to have hit the dyld problem with one thing or another (python is 
another one),
but no-one's posted any good info on fixes for it.


 Sorry if this isn't too much help.  Maybe you'll get something more
 concrete when people start to disagree with me. :)


I hope so. Right now it seems like no-one is running 
apache/mod_perl/mod_php with Apache::DBI
(if you are, and can get it to work, *please* let me know how you did 
it) ...




dyld problems with Apache 1.3.19 and mod_perl/mod_php on Mac OS X 10.0.03

2001-05-31 Thread Martin Redington


I'm having some some difficulties with Apache 1.3.19 and 
mod_perl/mod_php. Everything builds fine, but I get dyld multiple 
definition errors in some circumstances. I believe this is connected to 
the OX X dyld's insistence on freaking out with multiple definitions (so 
non Mac OS X users might like to stop here) but I'm not sure what the 
fix is. I've spent quite a long time on this, and am getting quite 
desperate. Any pointers would be very helpful.

I'm used to using persistent database connections under mod_perl and 
Apache, via the Apache::DBI modules, and Tim Bunce's excellent DBD 
modules, on Linux.

I also like to build everything myself. So, I downloaded and installed 
Perl 5.6.1, Apache 1.3.19, mod_perl 1.25, mysql 3.23.36, the 
Msql-Mysql-modules 1.2216, DBI 1.15, Apache::DBI 0.88 and php 4.05.

After some fiddling, and with some help from Mac OS X Hints and Stepwise 
(Thanks especially to the macosx-perl mailing list, Scott Anguish at 
Stepwise, and Merlin Tishauser [EMAIL PROTECTED]), I got everything to 
build. I also got persistent database connections to a mysql database.

When I added mod_php to the build, via apxs, my apache build started 
dying on startup, with the following error message:

dyld: /usr/local/apache1.3.19/bin/httpd multiple definitions of symbol 
__dig_vec
/usr/local/apache1.3.19/libexec/libphp4.so definition of __dig_vec
/Library/Perl/site_perl/5.6.1/darwin/auto/DBD/mysql/mysql.bundle 
definition of __dig_vec
/usr/local/apache/bin/apachectl start: httpd could not be started

I tracked the error down to a startup script that I run via a 
PerlRequire directive (see the mod_perl docs), to open an initial 
database handle, and load various perl Modules. Commenting out the 
PerlRequire stopped the error, but when I requested my test_database.pl 
script (which runs a simple select on the database), from a mod_perl 
directory, the browser hung, and similar dyld errors appeared in the 
error log. Strangely, a copy of the script that I keep in in a non 
mod_perl cgi-bin directory runs with no problem. Within the script, the 
errors originate with the line use DBD::MySQL, or at an open 
connection statement, which is effectively the same thing.

I think what is happening is that the __dig_vec symbol being loaded from 
the DBD::MySQL bundle is conflicting with the same symbol in mod_php. I 
looked in the Apache 1.3.19 source, and can see handlers for multiple 
definition in os/unix/os.c, but I guess that the DBD::MySQL module is 
being loaded by code in perl or mod_perl.

I guess my question is, is there an easy way to fix this conflict, or do 
perl and/or mod_perl need to be patched with similar dyld error handlers 
to the ones in Apache (see os/unix/os.c)?

My config info is as follows:

Perl:

 config_args='-ds -Dmksymlinks -Adefine:prefix=/usr/local 
-Dccflags=-g -pipe -Dfirstmakefile=GNUmakefile 
-Adefine:privlib=/Library/Perl/5.6.1 
-Adefine:sitelib=/Library/Perl/site_perl/5.6.1 
-Adefine:vendorlib=/Network/Library/Perl/5.6.1 
-Dman1dir=/usr/local/man/man1 -Dman3dir=/usr/local/man/man3 
-Uinstallusrbinperl'

Apache:

./configure \
--prefix=/usr/local/apache1.3.19 \
--with-layout=Apache \
--enable-module=all \
--enable-shared=max \

mod_perl: built via apxs, with EVERYTHING=1

PHP (patched as advised by Merlin Tishauser):

./configure \
   --with-xml \
   --with-zlib \
   --with-apxs=/usr/local/apache/bin/apxs \
   --with-mysql=/usr/local/mysql \
   --disable-pear \
   --enable-track-vars \

==
===