lundi 10 décembre 2018

PHP Background Processing Script is not working on Server

I'm using Laravel 5.4 in my localhost the background script works perfectly fine but when i upload script to server and try to run it. It doesn't work.

Below is the script

<?php
                   public function test1(Request $request) {
                      ob_start();
                      ignore_user_abort(true);

                      echo json_encode([]);

                      header("Connection: close");
                      header("Content-Length:" . (string) ob_get_length());

                      ob_flush();
                      ob_end_clean();
                      ob_implicit_flush(true);
                      ob_end_flush();

                      for($i=0;$i<1000000;$i++){
                              Log::info($i);
                      }
                  }

IN LOCAL PC I USE WINDOWS OS, XAMP AND ON SERVER Linux

THANKS IN ADVANCE



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire