Serialization wasn't the issue. Storing objects in a session variable was. I don't serialize the session and connection in any case.

Pete Helgren
Value Added Software, Inc

On 3/4/2011 9:36 AM, Dayberry, Joshua wrote:
I don't understand why being able to serialize a connection makes
something more or less OO. Does java actually serialize a connection
proper or does it just serialize everything it needs to recreate the
connection once unserialized?

Joshua Dayberry

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Pete Helgren
Sent: Friday, March 04, 2011 11:19 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] persistent sign on for Zend Server

Hmmm. I use that technique with Java (should have qualified my response

with that). A quick Google on PHP indicates that the connection cannot
be saved in a session variable so I guess you are stuck with using the
encrypted password methods that others indicated.

Sorry for the mis-information. I assumed that PHP was a bit more OO
than it is....

Pete Helgren
Value Added Software, Inc

On 3/4/2011 9:01 AM, Larry Kleinman wrote:
Pete, I had the same idea, but can't seem to get it to work. My code
below - Form1 does connect successfully, but the 15_query in Form2
with a "No Default Connection found" error. Here's what I am doing,
you can see the problem:

session_start ()
include login.php
lots of code
submit action=form2

session_start ()
$sql_result = i5_query ($searchstring, $_SESSION["Connection"]);


$host = '192.168.x.x';
$user = 'xxxx';
$password = 'xxx';

$connection = i5_connect($host, $user, $password, array
if (!$connection) {
die ("Could not connect to database " );
$_SESSION["Connection"] = $connection;

Larry Kleinman
Kleinman Associates, Inc.

From: Pete Helgren<pete@xxxxxxxxxx>
To: Web Enabling the AS400 / iSeries<web400@xxxxxxxxxxxx>
Date: 03/03/2011 03:02 PM
Subject: Re: [WEB400] persistent sign on for Zend Server
Sent by: web400-bounces@xxxxxxxxxxxx

The technique I use is to use the user id and password to connect and
then make the connection object part of the session variable and use
that connection object when I need it.

Pete Helgren
Value Added Software, Inc

On 3/3/2011 12:18 PM, Larry Kleinman wrote:
Using Zend Server, I would like to present a sign-on screen where the
enters a user ID and password to be used as the parms of the
function. This is not hard, but I want to present that screen only
and use that info as the user moves from screen to screen, all of
will require a 15_connection. I know that I can store the user and
password entered as $_SESSION variables, but I don;t like the idea of
password being written to some place on the PC hard drive. (That's
$_SESSION works, right?). Any suggestions on how to deal with this.

Larry Kleinman
Kleinman Associates, Inc.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.