Re: FTP unable to connect with fsockopen
- From: MikeofPet <mike.gunn@xxxxxxxxxxx>
- Date: Fri, 02 Nov 2007 10:48:57 -0700
On Nov 2, 9:45 am, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@xxxxxxxxx> wrote:
On 2 Nov, 15:28, MikeofPet <mike.g...@xxxxxxxxxxx> wrote:
I am trying to implement FTP in a PHP script but am unable to make the
connection to the remote server. The connection step times out at the
fsockopen function. I am not sure if it is relevant but PHP is
configured with "allow_url_fopen" ON. I am able to do an FTP connect
using an FTP client and using the same host/username/password
parameters.
Any ideas would be appreciated.
Thanks
It's difficult to say what's happenning without a lot more info, but I
can't help thinking you're making life a lot more difficult than it
needs to be: allow_url_fopen option applies to the file access
wrappers - not fsockopen - but I'd be using the file wrappers method
in preference to implementing my own protocol stack (particularly with
FTP) - but even then I'd prefer to implement it using the curl
library.
When you say it works an FTP client - I assume you are using it
interactively from the command line - try executing it from within
your script (seehttp://www.php.net/manual/en/ref.exec.php). Note most
versions of the ftp client will happily work with input from a file
redirected to STDIN
C.
Thank you for comments - very helpful.
.
- References:
- FTP unable to connect with fsockopen
- From: MikeofPet
- Re: FTP unable to connect with fsockopen
- From: C. (http://symcbean.blogspot.com/)
- FTP unable to connect with fsockopen
- Prev by Date: Re: ZipArchive on windows
- Next by Date: Re: Amazon API - Number of results returned
- Previous by thread: Re: FTP unable to connect with fsockopen
- Next by thread: Re: FTP unable to connect with fsockopen
- Index(es):
Relevant Pages
|