You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Mike Miller <mm...@crusoe.net> on 2000/04/14 14:15:22 UTC

[perhaps OT] Re: PHP is breaking Sybase::DBlib

David,

Does PHP (of which I know nothing) use any of the dbm libraries statically?  I remember that I had a 
hard time using DBlib a while back because there is a sybase dblib function called db and one in the dbm 
libraries called db, and they were conflicting.  I had to recompile perl not to statically use any dbm 
libraries.  There is an entry in the DBlib FAQ about this, IIRC (its on the DBLib web page).  

Perhaps this is the same thing or a similar issue?  Just a thought to help you out, YMMV.

Brgds,

Mike.

On Thu, 13 Apr 2000 23:32:49 -0600 (MDT), David Hojo Hajoglou wrote:

>So, I was having a hell of a time to get DBlib to work in a module.  The
>code worked fine as a script, but the database handle was not created
>properly when with a module.  As I prepared for Harikari, I looked at the
>loggs and php glared back at me.
>
>My compile was:
>Apache/1.3.12 (Unix) mod_perl/1.22 PHP/3.0.15
>
>Change to 
>Apache/1.3.12 (Unix) mod_perl/1.2
>
>And the code worked. So, I have discovered an incompatibility of sorts and
>guess what?  I have no idea how to fix it only that I need to have php and
>mod_perl together.  Why me????  AAAGH.
>
>
>-hoj
>
>




design question

Posted by David Hojo Hajoglou <ho...@dns.asksimon.com>.
I am writing a module that is supposed to do two things:

A request is made in the form of www.xxx.yyy/auth?k=lksdjflksjfdlkjdsf
where auth is handled via a <Location> directive.  This module looks at
the query string, queries a database and does one of two things.

1) If the db query returns foo.  I need to rewrite the request into:
	www.xxx.yyy/zzz.  This needs to be a post:
$req=HTTP::Request->new(POST=>'http://www.xxx.yyy/zzz',[var1=>'val1',var2='val2']);
Then the server processes the request and responds to the client all in
one request phase.


2) If the query returns bar, return Declined.

The Declined is quite easy, but the rewrite is not so clear.  All I have
seen of rewrites are pattern matching with mod_rewrite.

So, can I do this in one request phase, and how do I respecificy the uri
and continue down the line?  Which apache handler do I use, and is it as
easy as just grabbing the request object, and jamming in a new uri?

Any references or documents are very welcome.

Thanks!

David