× 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 will try pinging the Windows "QAServer".

The "myAS400" is the local server running the PHP scripts via Apache
(embedded in Zend Core). The scripts are running from the IFS on
"myAS400". Pinging myAS400 would be pinging the local machine.

Thanks for the suggestion.

Kelly

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Haas, Matt (CL Tech Sv)
Sent: Wednesday, July 15, 2009 8:48 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] FTP using PHP in Zend Core still not working

What happens when you ping "myAS400"? Do any of the logs on the system
show any error messages? My experience with PHP is pretty limited but
don't errors from it end up the Apache error log?

Matt

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Kelly Cookson
Sent: Tuesday, July 14, 2009 11:15 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] FTP using PHP in Zend Core still not working

I configured Zend Core to make the ftp functions available. That was
part of the problem. But I still can't get the FTP get and put
functions to work. We FTP between the QAServer and myAS400 server using
Toolbox for Java. So I know it can be done.

SCRIPT #1:
get RemoteFile [LocalFile]

<?php
$conn = ftp_connect("myAS400");
ftp_login($conn,"username","password");
ftp_raw($conn,"BINARY");
ftp_raw($conn,"QUOTE SITE NAMEFMT 1");
if
(ftp_get($conn,"\\\\QAServer\\MyDir\\QAServerFile.txt","/www/zendcore/ht
docs/kcookson/QAServerFile.txt",FTP_ASCII)) {
print ("<br />ftp get successful");
} else {
print ("<br />ftp get not successful");
}
$close = ftp_close($conn);
?>

When I run this script in Zend Core i5, I get the "ftp get not
successful" message.
Same negative result with or without the ftp_raw statements.

SCRIPT #2:
put LocalFile [RemoteFile]

<?php
$conn = ftp_connect("myAS400");
ftp_login($conn,"username","password");
ftp_raw($conn,"BINARY");
ftp_raw($conn,"QUOTE SITE NAMEFMT 1");
if
(ftp_put($conn,"/www/zendcore/htdocs/kcookson/AS400File.txt","\\\\QAServ
er\\myDir\\AS400File.txt",FTP_ASCII)) {
print ("<br />ftp put successful");
} else {
print ("<br />ftp put not successful");
}
$close = ftp_close($conn);
?>

When I run this script in Zend Core i5, I get the "ftp put not
successful" message.
Same negative result with or without the ftp_raw statements.

SCRIPT #3:
When I run this third script on my laptop in my Zend Studio debugger, it
WORKS. I get the "ftp get successful" message. It actually transfers the
file from the IFS on my AS400 to myDir on the QAServer Windows server.
But note that form of the statement is

get target [source]

which is opposite of the proper form. Why this works, I have no idea.
But I have repeated it several times.

<?php
$conn = ftp_connect("myAS400");
ftp_login($conn,"username","password");
ftp_raw($conn,"BINARY");
ftp_raw($conn,"QUOTE SITE NAMEFMT 1");
if
(ftp_get($conn,"\\\\QAServer\\myDir\\AS400File.txt","/www/zendcore/htdoc
s/kcookson/AS400File.txt",FTP_ASCII)) {
print ("<br />ftp get successful");
} else {
print ("<br />ftp get not successful");
}
$close = ftp_close($conn);
?>

When I run this same script in Zend Core i5, it fails. I get the "ftp
get not successful" message



Any ideas???



Thanks,

Kelly Cookson

Senior Programmer\Analyst

Dot Foods, Inc.

1-217-773-4486 ext 12676




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.