× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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
www.asaap.com
www.opensource4i.com


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
is
below - Form1 does connect successfully, but the 15_query in Form2
fails
with a "No Default Connection found" error. Here's what I am doing,
maybe
you can see the problem:

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


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

login.php
-----------------

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


$connection = i5_connect($host, $user, $password, array
(I5_OPTIONS_INITLIBL=>"QTEMP, QGPL, KAGPL, CLIENTGPL, TAATOOL, TWUFP,
TWUPP"));
if (!$connection) {
die ("Could not connect to database " );
}
$_SESSION["Connection"] = $connection;




Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100



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
www.asaap.com
www.opensource4i.com


On 3/3/2011 12:18 PM, Larry Kleinman wrote:
Using Zend Server, I would like to present a sign-on screen where the
user
enters a user ID and password to be used as the parms of the
i5_connect
function. This is not hard, but I want to present that screen only
once,
and use that info as the user moves from screen to screen, all of
which
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
the
password being written to some place on the PC hard drive. (That's
how
$_SESSION works, right?). Any suggestions on how to deal with this.

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 by midrange.com 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.