PHP/Codeigniter FTP Timout

Posted by Jack Hayter on Stack Overflow See other posts from Stack Overflow or by Jack Hayter
Published on 2010-06-12T13:53:28Z Indexed on 2010/06/12 14:02 UTC
Read the original article Hit count: 206

Filed under:
|
|
|
|

I'm trying to access an FTP server from my PHP script using Codeigniter's FTP Library. These functions work great, but when testing the script I discovered that if I attempt to connect to a server that does not exist, the script does not terminate with an error message of any kind.

The page continues to execute, until the web server gives up, returning an empty document.

So I am wondering, is there a way to limit the amount of time that Codeigniter can try to connect to an FTP server, then display a message if that times out?

I tried using the php function set_time_limit(), but it does not behave how I expected it to.

Thanks for your help.

© Stack Overflow or respective owner

Related posts about php

Related posts about codeigniter