Page 1 of 1

FTP issues after upgrading from php 4.3.3 to 4.3.4

Posted: Fri Nov 21, 2003 11:37 am
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

Posted: Fri Nov 21, 2003 2:39 pm
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.

Posted: Mon Nov 24, 2003 6:46 am
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