Search code examples
phpcodeigniter-4

set_time_limit() not success in codeigniter 4


helloo..

I have a problem when use curl function in codeigniter 4. I want to upload a big data to server but when run the aplication i get error :

Request Timeout This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

I have added set_time_limit(3600) but still error.

public function uploadDataJabs()
{
  
    $client = \Config\Services::curlrequest();
    set_time_limit(3600);   
            
    }

Please help

Thank you.


Solution

  • If you do set_time_limit(0); means the script can run forever (however this is not recommended). You can check the function manual for more infos.