Welcome Guest, Not a member yet? Register   Sign In
File not executed when running from terminal
#2

[eluser]ivantcholakov[/eluser]
Maybe command line requests are not detected properly on this machine. You may try this file for testing, it implements the CI's method for CLI detection:

detect_cli.php

Code:
<?php

if (php_sapi_name() == 'cli' or defined('STDIN'))
{
    echo 'CLI detected'."\n";
    echo 'Trying to dump $_SERVER[\'argv\']:'."\n";
    var_dump($_SERVER['argv']); // Test the script with parameters, see whether they pass.
    echo "\n";
} else {
    echo 'CLI NOT detected'."\n";
}


Messages In This Thread
File not executed when running from terminal - by El Forum - 08-07-2013, 08:20 PM
File not executed when running from terminal - by El Forum - 08-08-2013, 12:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB