Msg#: 3669613 posted 4:56 am on Jun 8, 2008 (gmt 0)
Hi all, im new here and posting in this section for newbies as I have very little idea of the webmaster world! Briefly my situation: I have a site on a specific webhosting service, and I tried to include in it a script for visitors to upload a file to a remote free ftp account, but couldnt get it to connect. I tested exactly the same script in a free webhosting account i use to experiment, and there it worked as it should, uploading the file correctly. That has led me to think that there is some setting in my webhosting that prevents the site to connect to the remote ftp account. I should add that i used passive mode to attempt connection. So my question would be: whats the best (and most elegant) way to do this what i want? The idea of the script was so that users didnt have to leave my site to upload their file and didnt need to type the user name and password for the ftp account (as they were provided by the script). Is there some possible configuration in my webhosting that i can change to get it to accept outbound connection to my ftp account?
Msg#: 3669613 posted 12:35 pm on Jun 8, 2008 (gmt 0)
Welcome to WebmasterWorld, webgangster!
It is likely that the configuration on your new server is prohibiting you for some reason, it could even be something as simple as a different version of the server-side software you are employing. Have you asked the hosting provider yet what the hangup might be?
Msg#: 3669613 posted 4:34 pm on Jun 8, 2008 (gmt 0)
Hi coopster! Thanks for your kind words. I had contacted the hosting support service asking what could be happening. The main part of the reply i got now from them is this:
Please note that if you are trying to connect externally from your hosting with us you will need to use our proxy server. The help article located below will give you the address for the proxy server with the port number included.
And in that article they referred me to it says:
On our shared hosting, any CURL applications that make secure HTTP connections (HTTPS over port 443) need to pass through a proxy server. The address for this proxy server is proxy.shr.secureserver.net and connections must specify the use of port 3128. The code below already includes this information.
Now what I dont understand -im a complete beginner as i said- is whether that will work for my script, which is on PHP (they talk about using CURL) and to connect to FTP instead of HTTPS. Is it possible to incorporate the use of that proxy server and port number in php to connect to ftp?
Msg#: 3669613 posted 2:36 am on Jun 11, 2008 (gmt 0)
Hey coopster thanks again for your reply. I couldnt really figure out how to get it working. So i had to settle with other solution. Not really what i wanted but for the moment it does the work, so I guess i will leave it for now.