Snippets

ESTI design php hell

Created by Robert Poz
subscr@techstudio2:~$ cat /etc/php5/cli/php.ini  |grep max_execution_time
max_execution_time = 30

subscr@techstudio2:~$ cat test.php
<?php
echo ini_get('max_execution_time');
?>

subscr@techstudio2:~$ php test.php -c /etc/php5/cli/php.ini
0

Comments (9)

  1. Robert Poz

    "When running PHP from the command line the default setting is 0." - as I understand the default value is 0 , but once it's set to different value it should have not be default anymore. Default value in computer systems means usually value for not directly defined values for some properties - in this case shouldn't it be different!

  2. Sergey Tsoy

    ; Note: This directive is hardcoded to 0 for the CLI SAPI

    So for command line apps it's always 0

  3. Robert Poz

    http://php.net/manual/en/features.commandline.introduction.php

    According to doc above, it's all messed up - means that in CentOS the default PHP binary is compiled with --disable-cli, which totally doesn't make sense in context of existence of /etc/php5/cli/php.ini config file.

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.