php4ever Posted May 17, 2009 Share Posted May 17, 2009 I'm using ob_start(); in a script as follows for redirect and I'm seeking an alternative that can work from the shell <?php ob_start(); // MY Script here sleep(10); header ("Location: http://www.jaredritchey.com/project/testing/steptwo.php"); ob_flush(); ?> This works fine however when I move it to the root of my server there is no way to use the browser direct obviously but there must be an alternative. I could setup two CRONs but the problem is that the first script processes a CSV file and the size changes frequently so the time would also change. Any assistance is appreciated. THX, Jared. Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 17, 2009 Share Posted May 17, 2009 Huh? Redirects only work in browser. When run from shell it will not work... You want to call another script when the first one finishes? Why not just require it? Or perhaps use execution operator `` http://www.php.net/language.operators.execution Quote Link to comment Share on other sites More sharing options...
php4ever Posted May 17, 2009 Author Share Posted May 17, 2009 The problem is the script time. If I require it, the server times out. The file being processed is rather large and is in many pieces. Breaking it up seems to work on the server for the time out issue. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted May 17, 2009 Share Posted May 17, 2009 Then disable the execution time limit. set_time_limit Quote Link to comment Share on other sites More sharing options...
php4ever Posted May 17, 2009 Author Share Posted May 17, 2009 Yeah that unfortunately is not an option on this server. That was my first thought. Is there no way to redirect from one script to the next via SHELL. If not I can try and bury it somewhere its not visitor accessible. Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 17, 2009 Share Posted May 17, 2009 Just run them in sequence using pipe? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.