[sork] Forwards and Vacation fail to connect to ftp server.

Eric Rostetter eric.rostetter at physics.utexas.edu
Fri Jan 10 13:29:56 PST 2003


Quoting "Pape, Michael J. (sysadm)" <papem at union.edu>:

> After remove the "@" from the ftp_connect command, the follwing errors
> were revealed:
> 
> Warning: ftp_connect(): timeout has to be greater than 0 in
> /usr/local/apache_test/secure/horde/lib/VFS/ftp.php on line 440
> 
> Warning: ftp_connect(): timeout has to be greater than 0 in
> /usr/local/apache_test/secure/horde/lib/VFS/ftp.php on line 440

> A quick look at the php code showed an optional parameter to the
> ftp_connect function, so I added "10" as a third argument -- it worked!

The manual says:

> The timeout parameter specifies the timeout for all subsequent network
> operations. If omitted, the default value is 90 seconds. The timeout can be 
> changed and queried at any time with ftp_set_option() and ftp_get_option().
> 
> Note: The timeout parameter became available in PHP 4.2.0. 

So, it is new as of PHP 4.2, and it is supposed to be optional!  What
php version are you running?

It sounds like we might want to set it via ftp_set_option() rather than 
in the ftp_connect() if that works.

> Perhaps something has changed with the php code -- I don't recall having
> to set a timeout value for php's ftp driver, or any other config options
> for that matter. I'll have to look at this a bit closer -- in the mean
> time I'll work with it by hard coding the timeout value in the
> ftp_connect statement within horde/lib/VFS/ftp.php.

I'm not seeing any problems with php 4.2 myself.  What version are you
running?

> Thanks again,
> -MJP

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the sork mailing list