file_get_contents çalışmıyor

1 Cevap php

I () file_get_contents ile bir dosyayı okumaya çalışıyorum - uzak bir HTTP dosya var, ve ben URL'yi kontrol ettik ve iyi. Sadece çalışmıyor.

Noktasına daha fazla hata iletisi standart Firefox sunucu hatası:

Bağlantısı sıfırlandı

The connection to the server was reset while the page was loading.

... Ziyade PHP hata herhangi bir biçimde daha. Burada yanlış oluyor ne herhangi bir fikir - Ayrıca sadece bu yüzden betik çalıştırma sınırı vurmak olamaz geri gelmek için bir kaç saniye sürdü?

Bu btw Windows üzerinde çalışan, Apache 2 üzerinde PHP 5 bulunuyor.

To clarify it's my connection to my .php file that is having this issue. Even if the remote file wasn't there I'd at least expect an error - that my webserver is apparently dropping the connection rather than at least giving an error message is the issue.

* Güncelleme 2: yerine file_get_contents ve fopen ile aynı sorun *

Güncelleme 3: Hatta sunucu çökmesini olabilir:

[Sun Mar 28 17:46:21 2010] [notice] Server built: Dec 10 2008 00:10:06
[Sun Mar 28 17:46:21 2010] [notice] Parent: Created child process 2720
[Sun Mar 28 17:46:21 2010] [notice] Child 2720: Child process is running
[Sun Mar 28 17:46:21 2010] [notice] Child 2720: Acquired the start mutex.
[Sun Mar 28 17:46:21 2010] [notice] Child 2720: Starting 64 worker threads.
[Sun Mar 28 17:46:21 2010] [notice] Child 2720: Starting thread to listen on port 80.
[Sun Mar 28 17:46:24 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Sun Mar 28 17:46:24 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Sun Mar 28 17:46:24 2010] [notice] Server built: Dec 10 2008 00:10:06
[Sun Mar 28 17:46:24 2010] [notice] Parent: Created child process 4912
[Sun Mar 28 17:46:24 2010] [notice] Child 4912: Child process is running
[Sun Mar 28 17:46:24 2010] [notice] Child 4912: Acquired the start mutex.
[Sun Mar 28 17:46:24 2010] [notice] Child 4912: Starting 64 worker threads.
[Sun Mar 28 17:46:24 2010] [notice] Child 4912: Starting thread to listen on port 80.
[Sun Mar 28 17:46:31 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Sun Mar 28 17:46:31 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Sun Mar 28 17:46:31 2010] [notice] Server built: Dec 10 2008 00:10:06
[Sun Mar 28 17:46:31 2010] [notice] Parent: Created child process 2560
[Sun Mar 28 17:46:31 2010] [notice] Child 2560: Child process is running
[Sun Mar 28 17:46:31 2010] [notice] Child 2560: Acquired the start mutex.
[Sun Mar 28 17:46:31 2010] [notice] Child 2560: Starting 64 worker threads.
[Sun Mar 28 17:46:31 2010] [notice] Child 2560: Starting thread to listen on port 80.
[Sun Mar 28 17:46:34 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Sun Mar 28 17:46:34 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Sun Mar 28 17:46:34 2010] [notice] Server built: Dec 10 2008 00:10:06
[Sun Mar 28 17:46:34 2010] [notice] Parent: Created child process 712
[Sun Mar 28 17:46:34 2010] [notice] Child 712: Child process is running
[Sun Mar 28 17:46:34 2010] [notice] Child 712: Acquired the start mutex.
[Sun Mar 28 17:46:34 2010] [notice] Child 712: Starting 64 worker threads.
[Sun Mar 28 17:46:34 2010] [notice] Child 712: Starting thread to listen on port 80.
[Sun Mar 28 17:49:19 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Sun Mar 28 17:49:19 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations

1 Cevap

Kullan cUrl ve bir vekil tarafından bağlantı yapmak: CURLOPT_HTTPPROXYTUNNEL