I was able to replace my i5_prepare with db2_prepare easily enough (though it's a shame whoever was second didn't use the same parameter order).

What is the appropriate replacement for i5_seek?

$file_detail = i5_open("MYLIB/MYFILE");
if ($resultdtl = i5_seek($file_detail, I5_EQ, array($row[MYKEY]))) {
$rowdtl = i5_fetch_assoc($file_detail, I5_READ_SEEK);
echo "<td>$rowdtl[MYFIELD]</td>\n";
} else {
echo " <td>#ERROR#</td>\n";
}

I tried using CW, but I get Call to undefined function i5_seek()

I guess I have the option of writing a short RPG program to do a chain and return the result, or use SQL "SELECT MYFIELD FROM MYLIB/MYFILE WHERE KEY='MYKEY' ORDER BY MYKEYFIELDS" to get all the records in the result set and just use the first one. The i5_open/i5_seek was perfect for what I needed on this part.
--
Sean Porterfield



-----Original Message-----
From: Alan Seiden [mailto:alan@xxxxxxxxxxxxxx]
Sent: Thursday, November 01, 2012 20:17
To: Web Enabling the AS400 / iSeries
Cc: Porterfield, Sean
Subject: Re: [WEB400] Zend and V7R1

Sean, do you have any more questions at the moment, or is everything resolved?

Alan


On 10/31/12 1:39 PM, Porterfield, Sean wrote:
If I were smart, I'd click "Logs" from the Zend Server web interface and see the error immediately. I'm used to using wrklnk, so I took the long way around.
--
Sean Porterfield


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Jack Kingsley
Sent: Wednesday, October 31, 2012 12:40
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Zend and V7R1

Sean are there tools to view these via some ZEND admin component or are you doing this via wrklnk command.

On Wed, Oct 31, 2012 at 12:24 PM, Porterfield, Sean < SPorterfield@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hmm. I thought this had fixed my issues, but today I'm not getting data
in my web page. To make matters worse, I saw that my trial code was
expiring in 2 weeks, so I went ahead and applied for a key of my own.
Yeah, so that means the Zend Server Monitor no longer works.

Where are the logs with the error messages that let me debug a script?

/www/zendsvr/logs/error_log.Q112103100 has no errors for my request.
/www/zendsvr/logs/access_log.Q112103100 just shows that the httpd
status was 500; it doesn't tell me what failed.

Finally found /usr/local/zendsvr/var/log/php.log (due to the blessing
and curse of IFS security, I cannot view it under my profile, even
though my name is specifically listed on the directory with *RX
authority, and it takes "forever" to set security properly - no
wonder so many things have *PUBLIC *RWX on them.)

Unfortunately, it's the "Call to undefined function i5_prepare()"
again, so I must not have test it successfully yesterday as I thought.
--
Sean Porterfield


-----Original Message-----
From: Porterfield, Sean
Sent: Monday, October 29, 2012 11:58
To: Web Enabling the AS400 / iSeries
Subject: RE: [WEB400] Zend and V7R1

I love the easy fix. Thanks much!

// bring in the Compatibility Wrapper and toolkit
require_once("CW/cw.php");
--
Sean Porterfield


From: Alan Seiden
You received "undefined function i5_pconnect()" because Zend Server
no
longer ships with the Easycom i5 toolkit.

On a new server installation you need to use the new toolkit. To
keep
your PHP code 99% unchanged, you can use the included Compatibility
Wrapper (CW).

Resources:

http://www.slideshare.net/aseiden/new-php-toolkit-from-zend-and-ibm-open-source-on-ibm-i
http://www.iprodeveloper.com/article/application-development/php-toolkit-perfect-match-rpg-699367

If you need any help just let me know.


This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged. If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited. Thank you.

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