0

I'm downloading HTML table from remote server, with file_get_contents which get around 25mb. But the server start loading the page and then respond with error 404. I have checked many times and html page is accessible without problems. I have done some test with other pages on the same server and they are working but the size of them is much smaller, around 3mb.

In php.ini file max_file_size is set to 128mb, i tried with 256mb but no changes.

5
  • max_file_size is for uploading. Maybe your server is timing out. Set max_execution_time to something higher. Commented Apr 10, 2014 at 11:59
  • see this stackoverflow.com/questions/4501757/… Commented Apr 10, 2014 at 12:03
  • Set maximum execution time 0 in your htaccess file like this: php_value max_execution_time 0 Commented Apr 10, 2014 at 12:14
  • max_execution_time is 30 sec. i think thats more than enough. And memory_limit is 128mb Commented Apr 10, 2014 at 14:31
  • Also i'm using nginx. Commented Apr 10, 2014 at 14:33

2 Answers 2

1

One possibility might be that your php is hitting the max_execution_time

Please check this in order to manipulate this variable

You can set this up in your php.ini file also ( depending on how you host your script )

Also check your apache error log and see what can cause this.

Are you sure it's 404 and not 500 internal error ?

Sign up to request clarification or add additional context in comments.

Comments

0

Solved, it was limited by nginx. I changed fastcgi_read_timeout to 300;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.