It won't work. PHP resources are not serializable.

Kevin Schroeder
Technology Evangelist
Zend Technologies, Ltd.
www.zend.com
www.twitter.com/kpschrade
www.eschrade.com




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

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 ...

Replies:

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

This mailing list archive is Copyright 1997-2021 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.