Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Brian Lavender

The tests were writing to an NFS mounted directory, and I think
NFS was creating some lock files which prevented the directory
from being written to. I moved the install to a non NFS mounted
area, and it all worked.

brian

On Mon, Mar 11, 2002 at 12:00:47PM -0800, Brian Lavender wrote:
> Yup, that fixed it. 
> 
> I have another problem with the File portion. Seems that the test
> giving the following fail statements. I checked /tmp and there is a
> lock file. I am not sure about how File::Store all works, and I couldn't
> quite understand the test file either. Should I just
> 
> $ make install 
> 
> anyway?
> 
> t/99dbfile..File exists at t/99dbfile.t line 77.
> t/99dbfile..dubious  
> Test returned status 17 (wstat 4352, 0x1100)
> after all the subtests completed successfully
> t/99dbfilestore.File exists at t/99dbfilestore.t line 73.
> t/99dbfilestore.dubious  
> Test returned status 17 (wstat 4352, 0x1100)
> after all the subtests completed successfully
> 
> 
> On Mon, Mar 11, 2002 at 02:33:17PM -0500, Geoffrey Young wrote:
> > Brian Lavender wrote:
> > > 
> > > I am trying to install Apache::Session and it is failing on
> > > the DBD::Oracle tests. It is asking for a default user. Do
> > > I need to configure Oracle for a default user? Or do I need
> > > to set some environment variable with a user id and password?
> > 
> > well, looking at t/99oracle.t (line 45) it looks like you need to
> > define the following environment variables:
> > 
> > ORACLE_HOME (of course) 
> > AS_ORACLE_USER
> > AS_ORACLE_PASS
> > 
> > HTH
> > 
> > --Geoff
> 
> -- 
> Brian Lavender
> http://www.brie.com/brian/

-- 
Brian Lavender
http://www.brie.com/brian/



Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Brian Lavender

Yup, that fixed it. 

I have another problem with the File portion. Seems that the test
giving the following fail statements. I checked /tmp and there is a
lock file. I am not sure about how File::Store all works, and I couldn't
quite understand the test file either. Should I just

$ make install 

anyway?

t/99dbfile..File exists at t/99dbfile.t line 77.
t/99dbfile..dubious  
Test returned status 17 (wstat 4352, 0x1100)
after all the subtests completed successfully
t/99dbfilestore.File exists at t/99dbfilestore.t line 73.
t/99dbfilestore.dubious  
Test returned status 17 (wstat 4352, 0x1100)
after all the subtests completed successfully


On Mon, Mar 11, 2002 at 02:33:17PM -0500, Geoffrey Young wrote:
> Brian Lavender wrote:
> > 
> > I am trying to install Apache::Session and it is failing on
> > the DBD::Oracle tests. It is asking for a default user. Do
> > I need to configure Oracle for a default user? Or do I need
> > to set some environment variable with a user id and password?
> 
> well, looking at t/99oracle.t (line 45) it looks like you need to
> define the following environment variables:
> 
> ORACLE_HOME (of course) 
> AS_ORACLE_USER
> AS_ORACLE_PASS
> 
> HTH
> 
> --Geoff

-- 
Brian Lavender
http://www.brie.com/brian/



Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Ken Y. Clark

On Mon, 11 Mar 2002, Brian Lavender wrote:

> Date: Mon, 11 Mar 2002 11:24:35 -0800
> From: Brian Lavender <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Apache::Session problem with DBD::Oracle
>
> I am trying to install Apache::Session and it is failing on
> the DBD::Oracle tests. It is asking for a default user. Do
> I need to configure Oracle for a default user? Or do I need
> to set some environment variable with a user id and password?
>
> brian
>
> Here are the errors I am getting:
>
> t/99oracle..DBI->connect(sgum) failed: ORA-01004: default username feature 
>not supported; logon denied (DBD ERROR: OCISessionBegin) at 
>blib/lib/Apache/Session/Store/Oracle.pm line 45
> (in cleanup) DBI->connect(sgum) failed: ORA-01004: default username feature 
>not supported; logon denied (DBD ERROR: OCISessionBegin) at 
>blib/lib/Apache/Session/Store/Oracle.pm line 45
> t/99oracle..dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 1-10
> Failed 10/10 tests, 0.00% okay
>

Oracle is fairly picky about the connection info.  Here's an example
of one I use:

use constant FooDataSource => 'dbi:Oracle:';
use constant FooDBUser => 
q{user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA=(SID=sid)))};
use constant FooDBPassword => '';
use constant FooDBOptions  => {
RaiseError   => 1,
FetchHashKeyName => 'NAME_lc',
LongReadLen  => 3000,
LongTruncOk  => 1,
};

my $db = DBI->connect(FooDataSource, FooDBUser, FooDBPassword, FooDBOptions);

I'm also fairly sure that some environment variables should be set.
If I grep my env for "ORA," I see:

ORACLE_SID=
ORACLE_BASE=/oracle1/app/oracle
ORACLE_HOME=/oracle1/app/oracle/product/8.0.5
ORACLE_TERM=xsun5

Obviously, the $ENV{'ORACLE_SID'} matches the "SID" in the "FooDBUser"
string.  The above string is used from a host other than the machine
that houses Oracle, so it may have more in it than you need if you're
on the same machine.

HTH,

ky




Re: Apache::Session problem with DBD::Oracle

2002-03-11 Thread Geoffrey Young

Brian Lavender wrote:
> 
> I am trying to install Apache::Session and it is failing on
> the DBD::Oracle tests. It is asking for a default user. Do
> I need to configure Oracle for a default user? Or do I need
> to set some environment variable with a user id and password?

well, looking at t/99oracle.t (line 45) it looks like you need to
define the following environment variables:

ORACLE_HOME (of course) 
AS_ORACLE_USER
AS_ORACLE_PASS

HTH

--Geoff



RE: Apache::Session Problem -- Addendum

2001-11-28 Thread Perrin Harkins

On Thu, 22 Nov 2001, Jonathan M. Hollin wrote:
> My code now includes:
> 
> 35:  # Session handler...
> 36:  my %session; undef my $session_id;
> 37:  use Apache::Session::MySQL;
> 38:  tie %session, 'Apache::Session::MySQL', $session_id,
> 39:  { DataSource => 'dbi:mysql:sessions', UserName   => 'db_user', Password
> => 'secret' };
> 40:  $session_id = "session_id=$session{_session_id};";
> 
> I am using Apache-Session v1.54.
> 
> The above code generates the following error:
> 
> [Thu Nov 22 10:31:38 2001] [error] PerlRun: `Can't connect(
> HASH(0xbdcf54)), no database driver specified and DBI_DSN env var not set at
> E:/Apache/site/lib/Apache/Session/Lock/MySQL.pm line 36 (in cleanup)
> Can't connect(   HASH(0x47e2f14)), no database driver specified and DBI_DSN
> env var not set at E:/Apache/site/lib/Apache/Session/Lock/MySQL.pm line 36'

You aren't following the documentation.  perldoc Apache::Session::MySQL.  
It says to pass in connection info for a lock connection.
- Perrin




RE: Apache::Session Problem -- Addendum

2001-11-22 Thread Paul DuBois

At 10:43 AM + 11/22/01, Jonathan M. Hollin wrote:
>Thank you everyone for the quality of help I've so far received and your
>rapid responses.  However...  :-(

At the rist of making a shameless plug, you can visit
http://www.kitebird.com/mysql-perl/ and grab the webdb
source distribution there.  This accompanies the book
for which the aforementioned URL is the home site.  Said
book has a chapter on sessions focusing on Apache::Session,
so you may find the example scripts useful for helping
you solve your problem.

>
>My code now includes:
>
>35:  # Session handler...
>36:  my %session; undef my $session_id;
>37:  use Apache::Session::MySQL;
>38:  tie %session, 'Apache::Session::MySQL', $session_id,
>39:  { DataSource => 'dbi:mysql:sessions', UserName   => 'db_user', Password
>=> 'secret' };
>40:  $session_id = "session_id=$session{_session_id};";
>
>I am using Apache-Session v1.54.
>
>The above code generates the following error:
>
>[Thu Nov 22 10:31:38 2001] [error] PerlRun: `Can't connect(
>HASH(0xbdcf54)), no database driver specified and DBI_DSN env var not set at
>E:/Apache/site/lib/Apache/Session/Lock/MySQL.pm line 36 (in cleanup)
>Can't connect(   HASH(0x47e2f14)), no database driver specified and DBI_DSN
>env var not set at E:/Apache/site/lib/Apache/Session/Lock/MySQL.pm line 36'
>
>So, as you can see, I've moved on a little - but still don't have a working
>session handler.  Any offers?
>
>Note:  I know how boring it is to keep reading the same thread - I'll drop
>it if I don't solve this today.
>
>Kindest regards,
>
>Jonathan M. Hollin - WYPUG Co-ordinator
>West Yorkshire Perl User Group
>http://wypug.pm.org/
>
>:: -Original Message-
>:: From: Tatsuhiko Miyagawa [mailto:[EMAIL PROTECTED]]
>:: Sent: 22 November 2001 04:34
>:: To: [EMAIL PROTECTED]
>:: Cc: mod_perl Mailing List
>:: Subject: Re: Apache::Session Problem -- Addendum
>::
>::
>:: On Wed, 21 Nov 2001 23:23:33 -
>:: "Jonathan M. Hollin" <[EMAIL PROTECTED]> wrote:
>::
>:: > 42: tie %session, 'Apache::Session::DBI',
>:: > 43: {DataSource => "dbi:$db_driver:sessions:$db_address"};
>::
>:: put $sid (session id: undef for fresh) after 'Apache::Session::MySQL'.
>::
>:: --
>:: Tatsuhiko Miyagawa <[EMAIL PROTECTED]>
>::




RE: Apache::Session Problem -- Addendum

2001-11-22 Thread Jonathan M. Hollin

Thank you everyone for the quality of help I've so far received and your
rapid responses.  However...  :-(

My code now includes:

35:  # Session handler...
36:  my %session; undef my $session_id;
37:  use Apache::Session::MySQL;
38:  tie %session, 'Apache::Session::MySQL', $session_id,
39:  { DataSource => 'dbi:mysql:sessions', UserName   => 'db_user', Password
=> 'secret' };
40:  $session_id = "session_id=$session{_session_id};";

I am using Apache-Session v1.54.

The above code generates the following error:

[Thu Nov 22 10:31:38 2001] [error] PerlRun: `Can't connect(
HASH(0xbdcf54)), no database driver specified and DBI_DSN env var not set at
E:/Apache/site/lib/Apache/Session/Lock/MySQL.pm line 36 (in cleanup)
Can't connect(   HASH(0x47e2f14)), no database driver specified and DBI_DSN
env var not set at E:/Apache/site/lib/Apache/Session/Lock/MySQL.pm line 36'

So, as you can see, I've moved on a little - but still don't have a working
session handler.  Any offers?

Note:  I know how boring it is to keep reading the same thread - I'll drop
it if I don't solve this today.

Kindest regards,

Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/

:: -Original Message-
:: From: Tatsuhiko Miyagawa [mailto:[EMAIL PROTECTED]]
:: Sent: 22 November 2001 04:34
:: To: [EMAIL PROTECTED]
:: Cc: mod_perl Mailing List
:: Subject: Re: Apache::Session Problem -- Addendum
::
::
:: On Wed, 21 Nov 2001 23:23:33 -
:: "Jonathan M. Hollin" <[EMAIL PROTECTED]> wrote:
::
:: > 42: tie %session, 'Apache::Session::DBI',
:: > 43: {DataSource => "dbi:$db_driver:sessions:$db_address"};
::
:: put $sid (session id: undef for fresh) after 'Apache::Session::MySQL'.
::
:: --
:: Tatsuhiko Miyagawa <[EMAIL PROTECTED]>
::




Re: Apache::Session Problem -- Addendum

2001-11-21 Thread Tatsuhiko Miyagawa

On Wed, 21 Nov 2001 23:23:33 -
"Jonathan M. Hollin" <[EMAIL PROTECTED]> wrote:

> 42: tie %session, 'Apache::Session::DBI',
> 43: {DataSource => "dbi:$db_driver:sessions:$db_address"};

put $sid (session id: undef for fresh) after 'Apache::Session::MySQL'.

--
Tatsuhiko Miyagawa <[EMAIL PROTECTED]>




Re: Apache::Session Problem -- Addendum

2001-11-21 Thread Perrin Harkins

> I changed "Apache::Session::DBI" to "Apache::Session::MySQL" and tried
> again.

What's the version number of your Apache::Session?  It should be 1.54.

> 42: tie %session, 'Apache::Session::DBI',
> 43: {DataSource => "dbi:$db_driver:sessions:$db_address"};

With Apache::Session::MySQL, the docs say you should be passing the user
name and password.

- Perrin




Re: Apache::Session Problem

2001-11-21 Thread Ilya Martynov

> On Wed, 21 Nov 2001 22:49:46 -, "Jonathan M. Hollin" 
><[EMAIL PROTECTED]> said:

Jonathan> Fellow Perl Mongers,
Jonathan> Can anyone help with my latest programming riddle?

Jonathan> I am trying to take advantage of the session-handling
Jonathan> features of Apache::Session.  My program includes the
Jonathan> following code (line numbers added for clarity):

Jonathan> 20: # Session handler (I)...
Jonathan> 21: use Apache::Session::DBI;

Jonathan> [..skip..]

Jonathan> Platform:  Win2K, Apache, mod_perl, MySQL...

Jonathan> Any suggestions (apart from quit programming and take up
Jonathan> farming instead)?

I'm not sure why your code doesn't work but why are you using such old
Apache::Session? Take new Apache::Session which provides MySQL support
via Apache::Session::MySQL.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)  TIV.net (http://tiv.net/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-