]> git.mxchange.org Git - friendica.git/blob - testargs.php
See issue 1218: generate $argv and $argc from $_SERVER if it wasn't defined.
[friendica.git] / testargs.php
1 <?php
2
3 /**
4  *
5  * File: testargs.php
6  *
7  * Purpose:
8  * During installation we need to check if register_argc_argv is
9  * enabled for the command line PHP processor, because otherwise
10  * deliveries will fail. So we will do a shell exec of php and
11  * execute this file with a command line argument, and see if it
12  * echoes the argument back to us. Otherwise notify the person
13  * that their installation doesn't meet the system requirements.
14  *
15  */
16
17
18 if(($argc > 1) && isset($argv[1]))
19         echo $argv[1];
20 elseif(($_SERVER["argc"] > 1) && isset($_SERVER["argv"][1]))
21         echo $_SERVER["argv"][1];
22 else
23         echo '';