X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=extlib%2FDB%2FDataObject%2FcreateTables.php;h=1295d252b88e4328b54a3e515421dcdb8f9e2923;hb=77d780a59e45701839f77a7d15996c90a07b2bd5;hp=d54d28c245176b71e90a43baf9b97120ac9c590a;hpb=ee942a76967e8f7f92c0169c4f7f6a8493454ae3;p=quix0rs-gnu-social.git diff --git a/extlib/DB/DataObject/createTables.php b/extlib/DB/DataObject/createTables.php index d54d28c245..1295d252b8 100644 --- a/extlib/DB/DataObject/createTables.php +++ b/extlib/DB/DataObject/createTables.php @@ -27,13 +27,17 @@ define('DB_DATAOBJECT_NO_OVERLOAD',1); //require_once 'DB/DataObject/Generator.php'; require_once 'DB/DataObject/Generator.php'; +if (php_sapi_name() != 'cli') { + PEAR::raiseError("\nERROR: You must turn use the cli sapi to run this", null, PEAR_ERROR_DIE); +} + if (!ini_get('register_argc_argv')) { PEAR::raiseError("\nERROR: You must turn register_argc_argv On in you php.ini file for this to work\neg.\n\nregister_argc_argv = On\n\n", null, PEAR_ERROR_DIE); exit; } if (!@$_SERVER['argv'][1]) { - PEAR::raiseError("\nERROR: createTable.php usage:\n\nC:\php\pear\DB\DataObjects\createTable.php example.ini\n\n", null, PEAR_ERROR_DIE); + PEAR::raiseError("\nERROR: createTable.php usage:\n\n" .$_SERVER['argv'][0] . " example.ini\n\n", null, PEAR_ERROR_DIE); exit; }