FTP issues after upgrading from php 4.3.3 to 4.3.4

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RedRasper
Forum Commoner
Posts: 48
Joined: Thu Apr 24, 2003 6:36 am

FTP issues after upgrading from php 4.3.3 to 4.3.4

Post by RedRasper »

Hi All,

I have some code, which now, since i have upgraded to 4.3.4

Code: Select all

<?php
$conn_id = ftp_connect($ftp_server); 
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); 

?>
One of two things happens, one it doesn't do anything and i get a blank screen, or two i get

"Warning: ftp_login() expects parameter 1 to be resource"

Does anyone have any ideas?

Cheers

RedRasper
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

this might be of use :

http://forums.devshed.com/t45110/s.html

the overall idea is, if you are putting your variable values above this statement in " marks, then it's not gonna accept the pass you are sending to it.
RedRasper
Forum Commoner
Posts: 48
Joined: Thu Apr 24, 2003 6:36 am

Post by RedRasper »

Hi!

many thanks for that, managed to get it working fine on my computer, which is a window 2000 running apache, but any time i try it in a linux server it just throws up an error about resource : Warning: ftp_login() expects parameter 1 to be resource. Which would be true if :

Code: Select all

<?php
$conn_id = ftp_connect($ftp_server);
?>
Is the line thats failing for some reason, hence the ftp_login would fail.

I've tried it with the 's and also putting the hostname directly in ftp_connet, i've also tried a couple of other ftp servers. I'm about out of ideas!

Anyone have any more things i could try?

Many thanks,

RedRasper
Post Reply