FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 16th, 2003, 05:52 AM
nadiyawi nadiyawi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 nadiyawi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question fopen and ftp

I'm a newbie to PHP and I am having difficulty using fopen with an ftp url. The url is valid and I believe it supports passive mode, but the page never finishes loading ont he fopen call, so I never even get an error message (so I doubt it's a problem with "passive" mode).

A snippet of my code is as follows:

$fd= fopen ($ftpurl, "rb") or die("could not open $ftpurl");
fclose ($fd);

I've been toying with this for hours and I've exhausted all ideas. I hope somebody can help!

Reply With Quote
  #2  
Old July 16th, 2003, 05:58 AM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 11 m 27 sec
Reputation Power: 27
Well I believe that the server by default would try and use active mode, if it needs passive mode then you may have problems. You may be better off using the proper FTP functions http://www.php.net/ftp

Reply With Quote
  #3  
Old July 16th, 2003, 06:20 AM
nadiyawi nadiyawi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 nadiyawi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>>Well I believe that the server by default would try and use active mode, if it needs passive mode then you may have problems. You may be better off using the proper FTP functions URL<<

Thanks for the recommendation. I have executed configuration --enable-ftp, but I still get an error when I use ftp_connect (no code executes after the call).

Reply With Quote
  #4  
Old July 16th, 2003, 06:24 AM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 11 m 27 sec
Reputation Power: 27
what is the error?
Have you got the FTP library uncommented in the php ini file?
Have you restarted the webserver after doing this?

Reply With Quote
  #5  
Old July 17th, 2003, 06:29 PM
nadiyawi nadiyawi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 nadiyawi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>>what is the error?
Have you got the FTP library uncommented in the php ini file?
Have you restarted the webserver after doing this?<<

Thanks for the suggestions. Unfortunately I do not have all the permissions that I need to write files in the PHP directory, nor do I have access to the server to restart it. I also do not know how to view my errors -- i do not think my PHP install is set up to display errors. I may end up using some alternative means to ftp, such as exec with wget (if I can get the admins to properly install it . . .) THanks for your advice though!

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > fopen and ftp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT