× 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 think I see what may be the problem. The Toolbox for Java FTP Get
function is using Java IO underneath the covers. The documentation says:

public boolean get(String sourceFileName,
String targetFileName) throws IOException,
FileNotFoundException

Gets a file from the server. The source file is on the server, accessed
via FTP so the path separator character (if any) must be a forward
slash. The target file is on the client, accessed via java.io so the
path separator character (if any) must be client specific.

Parameters:
sourceFileName - The file to get on the server.
targetFileName - The file on the target file system.
Throws: IOException
If an error occurs while communicating with the server.

The PHP FTP classes may not have a way of accessing the target file on
the client. Accessing the target file via Java IO may be why the Toolbox
for Java FTP get functions works when the PHP get function does not.

Anybody able to confirm or disconfirm?

Thanks,
Kelly

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Kelly Cookson
Sent: Wednesday, July 15, 2009 10:24 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] FTP using PHP in Zend Core still not working

I have already tested the sign on and ftp_connect() functions doing just
what you recommended. They are working fine. I can connect to the FTP
server on "MyAS400" using the PHP classes.

Thanks,
Kelly



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Jon Paris
Sent: Wednesday, July 15, 2009 10:11 AM
To: web400@xxxxxxxxxxxx
Subject: Re: [WEB400] FTP using PHP in Zend Core still not working

It would be useful to know which command is failing and why.

You have no error checking in this script in terms of checking that
the earlier commands succeeded - as a result you don't even know if
the connection or sign-ons succeeded.

I would suggest adding a print-r to each command and checking that the
connect worked e.g.


$conn = ftp_connect("myAS400");
If !$conn ....... ;

print_r (ftp_login($conn,"username","password"));



Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On 15-Jul-09, at 10:33 AM, web400-request@xxxxxxxxxxxx wrote:

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");


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.