i've written a class for connecting to an ftp server in 
passiv mode, sending a text file, sending one or 
more .mpegs and disconnecting.  

on my test box this script works fine (PHP 4.2.1) BUT 
on my live box (PHP 3.0.18) it fails...

On the live box (php 3.1.8) the script fails when i 
call the ftp passiv mode function  
(*  $conn_pasv = ftp_pasv($this->connection, 1);  *) 

If i comment out this line - the script connects ok but 
then fails when trying to do ftp_put().  

here's the connect method :

// open ftp connection 2 box and authenticate
function connect() {
  $this->connection =  ftp_connect($this->boxip);
  if (!$this->connection) { 
     $this->msgHandler('Could not connect to Box.',1); 
  } else {
     $this->login = ftp_login($this->connection, $this-
>boxuname, $this->boxpass);
   if (!$this->login) { $this->msgHandler('login',1); }
   $conn_pasv = ftp_pasv($this->connection, 1);
   $this->msgHandler('Connected to Set Top Box...',0); 
}
}


In the send method the ftp_put call looks like this -

$put = ftp_put($this->connection, $this->remfile,$this-
>localfile, FTP_BINARY);


Any ideas as to why this bunks in PHP 3?  I'm beginning 
to think upgrading PHP on the live server is the best 
thing to do... can anyone shed any light??

Thanks....

sAluDoS

.  .  .  .  .  .
[EMAIL PROTECTED]
www.mediadome.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to