Re: Help required on compile

2001-07-27 Thread Murugan K

Hai
 Great , Now it is building with your added MM_Win32.pm . 
Nmake install also going through without breaking . But problem is , as per readme , i 
have to copy the mod_perl.so  or mod_perl.dll
to  apache/module  directory and try the nmake test.

But i am not able to find the mod_perl.so or mod_perl.dll after building .

Thanks for your  help .

Regards
K.Murugan






 




 Randy Kobes [EMAIL PROTECTED] 07/26/01 07:00PM 

- Original Message -
From: Murugan K [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc:  [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 7:34 AM
Subject: Re: Help required on compile


 Hai

   I added the'PERL = $^X,' command the in the  makefile.pl .  But
it is not throwing any perl path error.  it is creating the makefile.

 But when you try nmake , it is throwing the following error
 makefile(889)cannot have : and ::dependents for same  targets.


Hi,
 I didn't copy this to the mod_perl list, as I've attached
my ExtUtils\MM_Unix.pm and ExtUtils\MM_Win32.pm files
to try  Does using these work?

best regards,
randy kobes





Globals

2001-07-27 Thread John Buwa

 I am useing -w and strict on my code and i get this when using strict.
i gave this script a name say package libtest;

So why is this still saying package name required?

Global symbol $line requires explicit package name at libwork.pl line 273.
Global symbol @a requires explicit package name at libwork.pl line 274.
Global symbol $newmail requires explicit package name at libwork.pl line
275.




Re: Globals

2001-07-27 Thread Ged Haywood

Hi there,

On Fri, 27 Jul 2001, John Buwa wrote:

  I am useing -w and strict on my code and i get this when using strict.
 i gave this script a name say package libtest;
 
 So why is this still saying package name required?
 
 Global symbol $line requires explicit package name at libwork.pl line 273.
 Global symbol @a requires explicit package name at libwork.pl line 274.
 Global symbol $newmail requires explicit package name at libwork.pl line 275.

perldoc perldoc

73,
Ged.




Santitizing errors with mod_perl

2001-07-27 Thread John Buwa


 Hi there,

Sorry about all these questions, i am really new to modperl and just trying
to get it to work :(

I sanitize all my input in my scripts to only allow chars i want allowed. My
working lines before using modperl and for some reason kick out error with
mod perl are as follows:

$user =~ s/[^$OK_CHARS]//go;
$pass =~ s/[^$OK_CHARS]//go;

When an account is created i only allow chars from the list $OK_CHARS this
works with non modperl apache but not with modperl enabled apache?

The error in the log states:

[error] Unmatched [ before HERE mark in regex m/[  HERE ^]/ at
libwelcome.pl line 169.

I some i dont undestand this, would someone explain what i am looking at
here, is there a change the way modperl uses regex expressions or?

Thanks,
John







Re: Help required on compile

2001-07-27 Thread Randy Kobes

On Fri, 27 Jul 2001, Murugan K wrote:

 Hai
  Great , Now it is building with your added MM_Win32.pm .
 Nmake install also going through without breaking . But problem is ,
 as per readme , i have to copy the mod_perl.so  or mod_perl.dll
 to  apache/module  directory and try the nmake test.

 But i am not able to find the mod_perl.so or mod_perl.dll after building .

 Thanks for your  help .

 Regards
 K.Murugan


How did you build things? INSTALL.win32 suggests 2 ways - one through
use of Visusal Studio, and the other through use of something like
 perl Makefile.PL APACHE_SRC=../apache_1.3.20 INSTALL_DLL=/Apache/modules
where the paths have to be adjusted to suit your system. Either way,
mod_perl.so should be built in src/modules/win32/Release/ within
the mod_perl source tree.

Note also that if you built your own perl that testing mod_perl
requires some extra packages, like libwww-perl and libwin32.

best regards,
randy kobes




RE: Problem with arrayrefs in PSections

2001-07-27 Thread Geoffrey Young

without having an environment to test on or the Eagle book to reference...

I seem to recall something in the Eagle book about arguments to Allow and
Deny - that from 10.3.4.1 is really a single argument and not two (in the
TAKE2 sense), so maybe your approach is wrong and you need to make each of
those entries in your array a single string.

just off the top of my head...

HTH

--Geoff

-Original Message-
From: Steve Piner
To: [EMAIL PROTECTED]
Sent: 7/27/01 12:26 AM
Subject: Problem with arrayrefs in PSections


I've come across an oddity in configuring Apache through Perl sections.

If I have a local as follows,

my %access = (
Order = 'deny,allow',
Deny = 'from all',
Allow = [['from', '1.2.3.0/24'],
  ['from', '192.168.1.0/24']],
);

then set up locations (or directorys) as follows

%Location = (
'/server-status' = {
SetHandler = 'server-status',
%access,
},
'/server-info' = {
SetHandler = 'server-info',
%access,
},
);

Then only one of the locations will let me access it. 

http://servername/server-status will let me in,
http://servername/server-info won't.

The problem seems to be with the shared reference: changing the 'Allow'
line above to
Allow = 'from all' works - though without the desired restriction of
course, as does 
changing the code above to the following.

%Location = (
'/server-status' = {
SetHandler = 'server-status',
%access,
Allow = [['from', '1.2.3.0/24'],
  ['from', '192.168.1.0/24']],
},
'/server-info' = {
SetHandler = 'server-info',
%access,
Allow = [['from', '1.2.3.0/24'],
  ['from', '192.168.1.0/24']],
},
);

Is this a bug, a stupid-user problem, or something else?

I'm using Apache/1.3.20, mod_perl/1.25 and 1.26, and Perl v5.6.1


Steve

-- 
Steve Piner
Web Applications Developer
Marketview Limited
http://www.marketview.co.nz



mod_perl/DBI problem

2001-07-27 Thread Curtis Hawthorne

I'm writing a script that will run under mod_perl that uses DBI to connect
to an MS SQL server.  The script works fine and mod_perl speeds it up quite
a bit.  Every so often, when the script tries to connect to the SQL server,
the connection times out (I think the SQL server's a little slow), and I get
an Internal Server Error message.  My problem is that, instead of trying to
connect to the server again, the next time the script is run, the database
connection handle stays the same and I get the following error in my logs
over and over again Can't call method quote on an undefined value (the
first thing the script does is a $dbh-quote of a variable).  The code that
does the connection to the database is in a module that is used by the
script, but not in a subroutine.

So, how can I have it try to connect to the database again if it fails, but
keep the connection persistent if it doesn't?  Would there be some way to
have the script exit completely when it gets an error like that, even though
it's under mod_perl?

Thanks!

Curtis H.





Re: Santitizing errors with mod_perl

2001-07-27 Thread Ged Haywood

Hi there,

On Fri, 27 Jul 2001, John Buwa wrote:

 $user =~ s/[^$OK_CHARS]//go;
 $pass =~ s/[^$OK_CHARS]//go;
[snip]
 [error] Unmatched [ before HERE mark in regex m/[  HERE ^]/ at
 libwelcome.pl line 169.

Hmmm.  Your code says s/// not m//.  Is this anywhere near line 169?
Is it in the file libwelcome.pl?

 is there a change the way modperl uses regex expressions or?

No.  mod_perl embeds the Perl interpreter into Apache.
It's the same Perl interpreter you used before (unless you changed
your Perl version at the same time as compiling mod_perl :).

Maybe you should try some debugging.  Perhaps print your variables to
the error_log too.  Have a look at the debug section in the Guide.
http://perl.apache.org/guide

73,
Ged.




Re: mod_perl/DBI problem

2001-07-27 Thread Ged Haywood

Hi there,

On Fri, 27 Jul 2001, Curtis Hawthorne wrote:

 So, how can I have it try to connect to the database again if it fails, but
 keep the connection persistent if it doesn't?

Have a look in the Guide, there's lots of stuff in there about
Apache::DBI.  http://perl.apache.org/guide.

73,
Ged.




Re: Santitizing errors with mod_perl

2001-07-27 Thread John Buwa



 Hi there,

 On Fri, 27 Jul 2001, John Buwa wrote:

  $user =~ s/[^$OK_CHARS]//go;
  $pass =~ s/[^$OK_CHARS]//go;
 [snip]
  [error] Unmatched [ before HERE mark in regex m/[  HERE ^]/ at
  libwelcome.pl line 169.

 Hmmm.  Your code says s/// not m//.  Is this anywhere near line 169?
 Is it in the file libwelcome.pl?

Actually the $user =~ s/[^$OK_CHARS]//go; is line 169 and the other is line
170 and it resides in the file libwelcome.pl thats the part i didnt
undestand myself?


  is there a change the way modperl uses regex expressions or?

 No.  mod_perl embeds the Perl interpreter into Apache.
 It's the same Perl interpreter you used before (unless you changed
 your Perl version at the same time as compiling mod_perl :).

Thats what i was reading, and no its the same perl?

 Maybe you should try some debugging.  Perhaps print your variables to
 the error_log too.  Have a look at the debug section in the Guide.
 http://perl.apache.org/guide

I can try, i dont know if that would shed any light on the above though it
just dont make any since?

John




Ultimate Bulletin Board? Jezuz.

2001-07-27 Thread kyle dawkins

hey all

two reasons for posting this.

i am tasked with the job of integrating Ultimate Bulletin Board (or 
UBB, from http://www.infopop.com) into a client's site.  they have an 
existing user database of many many thousands of users, and they want 
all these users to be able to read and post in the discussion forums 
provided by UBB.

it's easy to install and easy to get to run under mod_perl.  they 
provide source and you can modify it for your site.

now, my reasons for posting to the list:

1. the quality of [perl] code in UBB is so phenomenally bad i can't 
believe people pay money for it.  i can't believe it works (but it 
does).  has anyone else ever experienced it?  i guess i need a support 
group... it makes me cry and cuts me to the bone when i think that there 
are actually people out there who think that code like this is good.  oh 
my god. it should be drop-kicked off the planet.

2. any problems with it under mod_perl?  I have it running fine under 
PerlRun but I am not so sure it'll behave under Registry.

i should just go bury my head in the sand.

kyle dawkins
software engineer
central park software
[EMAIL PROTECTED]
http://www.centralparksoftware.com




Re: Santitizing errors with mod_perl

2001-07-27 Thread ___cliff rayman___

perhaps the escaping is not getting done
properly.  is there a '[' in $OK_CHARS?  can we
see what the definition of $OK_CHARS looks like?

also, for debugging - print the value of $OK_CHARS
on the line directly above the first substitution. this
will tell us if it is getting stepped on somewhere before
the first time the regex gets to use it.


--
___cliff [EMAIL PROTECTED]http://www.genwax.com/


John Buwa wrote:

  Hi there,
 
  On Fri, 27 Jul 2001, John Buwa wrote:
 
   $user =~ s/[^$OK_CHARS]//go;
   $pass =~ s/[^$OK_CHARS]//go;
  [snip]
   [error] Unmatched [ before HERE mark in regex m/[  HERE ^]/ at
   libwelcome.pl line 169.
 
  Hmmm.  Your code says s/// not m//.  Is this anywhere near line 169?
  Is it in the file libwelcome.pl?

 Actually the $user =~ s/[^$OK_CHARS]//go; is line 169 and the other is line
 170 and it resides in the file libwelcome.pl thats the part i didnt
 undestand myself?

   is there a change the way modperl uses regex expressions or?
 
  No.  mod_perl embeds the Perl interpreter into Apache.
  It's the same Perl interpreter you used before (unless you changed
  your Perl version at the same time as compiling mod_perl :).

 Thats what i was reading, and no its the same perl?

  Maybe you should try some debugging.  Perhaps print your variables to
  the error_log too.  Have a look at the debug section in the Guide.
  http://perl.apache.org/guide

 I can try, i dont know if that would shed any light on the above though it
 just dont make any since?

 John






Re: Ultimate Bulletin Board? Jezuz.

2001-07-27 Thread Tom Servo

 i am tasked with the job of integrating Ultimate Bulletin Board (or 
 UBB, from http://www.infopop.com) into a client's site.  they have an 

I'm sorry.   We were running the UBB for a while and have had a few
headaches.

 1. the quality of [perl] code in UBB is so phenomenally bad i can't 
 believe people pay money for it.  i can't believe it works (but it 
 does).  has anyone else ever experienced it?  i guess i need a support 
 group... it makes me cry and cuts me to the bone when i think that there 
 are actually people out there who think that code like this is good.  oh 
 my god. it should be drop-kicked off the planet.

Good lord are you right.   You'd think that after all the revisions
they've had of this software so far, somebody might have found a tab key
or something.   Also, note that it technically doesn't always work.   The
big thing you should watch out for is if one forum gets too many threads
(usually when one of ours would reach around the 3000 mark), the software
will just die.   It'll completely lock up and use almost all the CPU until
you go in and kill the apache processes.   This was on a pretty fast
machine in the meantime...

 2. any problems with it under mod_perl?  I have it running fine under 
 PerlRun but I am not so sure it'll behave under Registry.

I believe we ran it under PerlRun as well, but Registry I remember having
some issues with.   I'm sure that it can be tweaked to run under Registry,
but as you said, the code is so horrific that after a couple of hours of
pouring over that madness, I decided that I preferred jamming nails into
my forehead as opposed to trying to get it to work right.   This was an
old version, btw, about 1 year old from now, so maybe things are better.

*chortle*

BTW, we ended up shifting over to vBulletin (PHP) and that's been behaving
well, though the conversion to Slashcode is underway...

Brian Nilsen




Re: Santitizing errors with mod_perl

2001-07-27 Thread John Buwa

here is the value $OK_CHARS='-a-zA-Z0-9_.@ ';

John
 
 perhaps the escaping is not getting done
 properly.  is there a '[' in $OK_CHARS?  can we
 see what the definition of $OK_CHARS looks like?
 




Apache=SCALAR(?????)

2001-07-27 Thread Greg Lontok

hello,

I recently changed a username/password check script to mod_perl, however
when under mod_perl, I noticed that failed logins with the correct username
and password combination show the password in the log as Apache=SCALAR(???),
i.e. Apache=SCALAR(0x2d9f74). What is mod_perl doing here to my password
parameter.
I am running solaris 5.6 with ApacheSSL.
thanks,
greg




Re: Apache=SCALAR(?????)

2001-07-27 Thread Jeffrey W. Baker



On Fri, 27 Jul 2001, Greg Lontok wrote:

 hello,

 I recently changed a username/password check script to mod_perl, however
 when under mod_perl, I noticed that failed logins with the correct username
 and password combination show the password in the log as Apache=SCALAR(???),
 i.e. Apache=SCALAR(0x2d9f74). What is mod_perl doing here to my password
 parameter.

This is a basic Perl question.  Apache=SCALAR(0xcafebabe) means that the
thing you printed is scalar reference to an object, blessed into the
Apache class, and its memory address is 0xcafebabe.

-jwb




Re: ODBC for Apache

2001-07-27 Thread Adi Fairbank

Joshua Chamas wrote:
 
 Castellon, Francisco wrote:
 
  Hi I am running on Windows98SE, Apache 1.20, mod_perl 1.25, php 4.0.6, and
  have the latest Apache::ASP installed and have Activestate's Perl installed
  (build 626).
 
  I want to be able to access, Oracle, SQL and MSAccess databases as well as a
  couple of other Databases that support ODBC. I want to access these DBs from
  my apache server. What do i need??
 
 
 DBD::ODBC is your ticket, running under DBI
   http://dbi.symbolstone.org/
 
 You can probably install DBD::ODBC for Activestate perl with
 the ppm installer, as they will likely already have compiled
 it for you.  Apache::DBI is installed with CPAN.
 

What's the stability of DBD::ODBC like?  It claims to be alpha software. 
Does anyone have any experience with it in a production environment?  Is it
at least stable with MS SQL server?

-Adi




Re: Ultimate Bulletin Board? Jezuz.

2001-07-27 Thread Wim Kerkhoff

Tom Servo wrote:
 
  i am tasked with the job of integrating Ultimate Bulletin Board (or
  UBB, from http://www.infopop.com) into a client's site.  they have an
  2. any problems with it under mod_perl?  I have it running fine under
  PerlRun but I am not so sure it'll behave under Registry.
 
 I believe we ran it under PerlRun as well, but Registry I remember having
 some issues with.   I'm sure that it can be tweaked to run under Registry,
 but as you said, the code is so horrific that after a couple of hours of
 pouring over that madness, I decided that I preferred jamming nails into
 my forehead as opposed to trying to get it to work right.   This was an
 old version, btw, about 1 year old from now, so maybe things are better.

A friend of mine runs a community server that runs various sites.  The
server has decent hardware and gets a medium amount of traffic. However,
one of the sites is running a UBB. It's causing a ton of disk I/O,
driving up the load to a consistent 3 or 4. I've tried getting it to run
under Registry as well, with little success. Basically my conclusion was
that it needs a good rewrite, to properly use an SQL database and
caching. Each page should be loading in .01 seconds, not 2-3 seconds. I
believe it was the lastest version that we were working with as well.
UBB is easy to use... to bad the code isn't.

This reminds me of Bugzilla. It is plain nasty to debug and extend that
code, never mind to get it to run under Registry.

-- 

Regards,

Wim Kerkhoff, Software Engineer
Merilus, Inc.  -|- http://www.merilus.com
Email: [EMAIL PROTECTED]
 S/MIME Cryptographic Signature


Re: Ultimate Bulletin Board? Jezuz.

2001-07-27 Thread Sander van Zoest

On Fri, 27 Jul 2001, kyle dawkins wrote:

 1. the quality of [perl] code in UBB is so phenomenally bad i can't 
 believe people pay money for it.  i can't believe it works (but it 
 does).  has anyone else ever experienced it?  i guess i need a support 
 group... it makes me cry and cuts me to the bone when i think that there 
 are actually people out there who think that code like this is good.  oh 
 my god. it should be drop-kicked off the planet.

At mp3.com, we ran UBB for the first year or so and ended up totally
rewriting the bottom end to make it perform better and actually make it
semi-secure. Finally we ended up getting rid of it for some other in house
code.

you might want to look into vBulletin, it is used on a lot of different
sites is written in php with a MySQL back end and looks very similar to
UBB.
  
 2. any problems with it under mod_perl?  I have it running fine under 
 PerlRun but I am not so sure it'll behave under Registry.

Our old version was written in perl 4 and definately wasn't able to be
run under mod_perl. We actually fork()/exec()'d like mad for the first
year, UBB looked nice, but is hell underneath.
  
Cheers,

--
Sander van Zoest [[EMAIL PROTECTED]]
Covalent Technologies, Inc.   http://www.covalent.net/
+1 (415) 536-5218  http://Sander.vanZoest.com/




Re: Ultimate Bulletin Board? Jezuz.

2001-07-27 Thread kyle dawkins

Sander van Zoest wrote:

 At mp3.com, we ran UBB for the first year or so and ended up totally
 rewriting the bottom end to make it perform better and actually make it
 semi-secure. Finally we ended up getting rid of it for some other in house
 code.


i am worried that i'm going to have to do that...

 
 you might want to look into vBulletin, it is used on a lot of different
 sites is written in php with a MySQL back end and looks very similar to
 UBB.


yes, but as an engineer i can't condone the use of PHP, sorry...


2. any problems with it under mod_perl?  I have it running fine under 
PerlRun but I am not so sure it'll behave under Registry.

 
 Our old version was written in perl 4 and definately wasn't able to be
 run under mod_perl. We actually fork()/exec()'d like mad for the first
 year, UBB looked nice, but is hell underneath.


sigh... it's STILL perl 4.

but it makes me glad to know i'm not the only person to struggle with 
this beast...

cheerz

kyle
software engineer
central park software
http://www.centralparksoftware.com





Re: Help required on compile

2001-07-27 Thread Murugan K

Hai
   I  am not using Visual VC++ IDE for compiling. I am using  command line only.
After building  , i am not getting  src/modules/win32/Release/  realease directory at 
all.
I tried with previos version od mod_perl also.  Same result.

Can you please reply.


Regards
K.Murugan


 Randy Kobes [EMAIL PROTECTED] 07/27/01 06:32PM 
On Fri, 27 Jul 2001, Murugan K wrote:

 Hai
  Great , Now it is building with your added MM_Win32.pm .
 Nmake install also going through without breaking . But problem is ,
 as per readme , i have to copy the mod_perl.so  or mod_perl.dll
 to  apache/module  directory and try the nmake test.

 But i am not able to find the mod_perl.so or mod_perl.dll after building .

 Thanks for your  help .

 Regards
 K.Murugan


How did you build things? INSTALL.win32 suggests 2 ways - one through
use of Visusal Studio, and the other through use of something like
 perl Makefile.PL APACHE_SRC=../apache_1.3.20 INSTALL_DLL=/Apache/modules
where the paths have to be adjusted to suit your system. Either way,
mod_perl.so should be built in src/modules/win32/Release/ within
the mod_perl source tree.

Note also that if you built your own perl that testing mod_perl
requires some extra packages, like libwww-perl and libwin32.

best regards,
randy kobes