-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jaymz Goktug YUKSEL wrote:
> Hello everyone,
>  
> I have a php code that processes only one unit at a time, because if I
> process all 650 units, it time outs. So when I try to run the program
> with WGET, I go like
>  
> process.php?no=0
>  
> and when this executes itself and finishes, it redirects itself to
> process.php?no=1 and this is supposed to go until it reaches 650.
>  
> However when it comes to 19 it stops and it says
>  
> Maximum redirection (20) reached. So it connot redirect more than 20
> pages. I need to redirect more.
>  
> Do you think you can help me with this? Is there a command to override
> the maximum redirections?

Unfortunately, there isn't. There should be, and I've submitted bug
20499 to address this in 1.12: https://savannah.gnu.org/bugs/index.php?20499

In the meantime, you could grab the source code and modify it. The line

  #define MAX_REDIRECTIONS 20

could be increased as desired; then just build your custom make and use
that instead.

However, a better approach might be to go back to processing it all in
one web page. A few options for this are:

  - Have the php script output a blank line, or status update, or
something, after every unit processed. All the mainstream browsers, at
least, don't set their timeouts from the beginning of page download;
they set their timeouts based on the last time they received input. I'm
unsure how wget handles this; if it doesn't behave as typical browsers
do, please file a bug on this.

  - Have the php script kick off processing in the background. This
seems the most robust solution, as it doesn't require that the user
agent behave as you desire it to. A snazzy version could have the php
script query the background script periodically, to get a progress
update (or, have the processing script write update to a file, which the
php script could read to obtain status).

- --
HTH,
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGm8WH7M8hyUobTrERCBIyAJ0YwrxWFG77E7y9TfXnf5Ec4m/7GgCdE0KD
Hj3ussiDNCeIJziXNNvJ8HY=
=/otR
-----END PGP SIGNATURE-----

Reply via email to