I am copying a file from a remote server using copy (and also tried various versions with fopen, file_get_contents etc.) but after ~2 minutes the script times out. No errors, no exceptions. In the error log file it says: (70007)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed
Any clue?
Here is my php.ini config for resource limits:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 0 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 104M ; Maximum amount of memory a script may consume (8MB)
and this might be related, too:
; Default timeout for socket based streams (seconds)
default_socket_timeout = 60
I added a new php.ini in the folder
[PHP]
max_input_time = 3600
default_socket_timeout = 3600
max_execution_time = 3600
upload_max_filesize = 10M
But that didn’t help.
EDIT:
It seems to be a problem with the filesize. As soon as it reaches 2MB the server fails. I have to contact my hoster.
Your php.ini file is most likely configured to timeout after 120 seconds. I’m not sure what kind of server you have, but on mine the primary php.ini file is located in:
/etc/php5/apache2/php.ini
If you can’t find it, run phpinfo() in a script and you will find the directory to your main php.ini
Under the RESOURCE LIMITS heading, change the timeout in seconds and restart your server