php-general Digest 22 Dec 2009 12:41:39 -0000 Issue 6500

2009-12-22 Thread php-general-digest-help
php-general Digest 22 Dec 2009 12:41:39 - Issue 6500 Topics (messages 300626 through 300626): Re: Checking for internet connection. 300626 by: Daniel Brown Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Daniel Brown
On Sat, Dec 19, 2009 at 19:13, Angus Mann angusm...@pobox.com wrote: Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig @a.root-servers.net google.co.uk If your net is down the

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Stuart Dallas
On 21 Dec 2009, at 19:40, Andy Shellam wrote: Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig

RE: [PHP] Checking for internet connection.

2009-12-22 Thread Bob McConnell
From: Andy Shellam Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig @a.root-servers.net google.co.uk

RE: [PHP] Checking for internet connection.

2009-12-22 Thread Ashley Sheridan
On Tue, 2009-12-22 at 08:27 -0500, Bob McConnell wrote: From: Andy Shellam Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Kim Madsen
Bob McConnell wrote on 21/12/2009 15:05: Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Then use fopen() to read a page you know exists? --

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
I'm confused... what's the problem with just trying to hit the update server? If you can then you check for updates, if not then you, erm, don't. Simples, no? True, I think I said this same thing in a previous post - I suggested the DNS option if all the OP wanted to do was check if an

RE: [PHP] Checking for internet connection.

2009-12-22 Thread Bob McConnell
From: Andy Shellam I'm confused... what's the problem with just trying to hit the update server? If you can then you check for updates, if not then you, erm, don't. Simples, no? True, I think I said this same thing in a previous post - I suggested the DNS option if all the OP wanted to do

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
And I was pointing out that this would not be a valid test when there is a caching DNS on the LAN. I also pointed out how to avoid caching issues - the comment was aimed at the author of the message before mine. Too much of the conversation and most of the attribution was stripped too

[PHP] File upload directive: $_FILES['filename']['name'] instead of $_FILES['filename']['tmp_name']

2009-12-22 Thread Andrei Iarus
Hello,   On my production testing servers (production runs on a centrino and testing runs on Windows) I can only access the temporary uploaded file using ini_get( 'upload_tmp_dir' . '/' . $_FILES['filename']['name']; while the file $_FILES['filename']['tmp_name'] simply does not exist (checked