phpshellcakephpcakephp-3.0php-7.0

CakePHP 3 shell script increase execution timeout limit


I'm new at cakephp 3 and I'm developing an app using it and php 7.0.

I have a shell script at /app/src/Shell, that connects to a webservice and consumes JSON data.

The problem is, it's taking more than 30 secs to retrieve the data.

I already tried to change the max_execution_time at /etc/php/7.0/cli/php.ini and /etc/php/7.0/apache2/php.ini, but no success.

Am I missing something? Is there a config in cakephp that needs to be changed?

Thanks.


Solution

  • Edit: After what @mark said in his comment, I did some research and found out the solution. The thing is, I'm using the Http Client Class of cakephp 3. Reading the docs, I realized that you can pass the 'timeout' parameter at the moment that the object is been created.

    But, also following the @mark's comment, change the timeout value, is not a good practice.

    Thank you all for the help!