/
Improved command-line features
Improved command-line features
Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/008c58b0f123ded6#
Right now In-Portal presumes, that it's being used from command live, when either of "$argv" or "$argc" variables are present. This incorrect and it should do php_sapi() == 'cli' check instead.
Also mentioned above variables might be absent thanks to http://php.net/manual/en/ini.core.php#ini.register-argc-argv. That's why we should directly check $_SERVER['argv'] and $_SERVER['argc'] instead. This would improve command line detection especially on servers where PHP isn't installed using mod_php.