Scott wrote:

With QNTC the username/password have to be the same for both systems,


Am I the only one that thinks this is a major problem? Why not allow a second sign on?

Oh well.....


---Dale
the PHP is (or should be) running as NOBODY on the 400 (with no password I think) so you might have to call an RPG that would switch user profiles then do the transfer maybe?
Or call an RPG that does the FTP, check out
http://www.tylogix.com/
or
http://www.scottklement.com/ftpapi/

I just responded to your post on the Zend forums also,

I don't have access to the 400 right now, but you can try this to see if FTP from PHP is even available. (I wasn't able to test this)

<?php
if (function_exists('ftp_connect'))
{
echo "FTP functions exist";
}
else
{
echo "No FTP functions available.";
}
?>


Let us know what you find.

Scott

Kelly Cookson wrote:
Good idea. You're probably on the right track with QNTC being the way to use the filesystem classes.
I found my remote server in the QNTC file system. I tried using "/QNTC/MYSERVER/MYDIR/filename.txt". But it still didn't work.
It's also kind of frustrating that I can get FTP to work from the debugger on my laptop, but the same scripts won't work in the Zend Core in i5.

Thanks,
Kelly



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Thorbjoern Ravn Andersen
Sent: Saturday, July 11, 2009 12:45 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] PHP - Moving files between iSeries and other servers

Kelly Cookson skrev:
How do I use FTP or the filesystem classes to move files back and forth
between the iSeries and remote servers\directories?

When I try this code:


$toFile = "\\\\MyServer\\MyDirectory\\php_filesystem_test.txt";

The snippet uses Windows-syntax -- \\myserver\mydirectory ... - to reach remote servers which only works on Windows servers.

You need to find the IFS-name which does the same. A guess would be through the /QNTC mount point. It appears to be described here, but I don't have any personal experience with it, http://www.itjungle.com/fhg/fhg031704-story04.html


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.