Lines Matching refs:cmd

61 PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC)  in php_exec()  argument
74 if ((c = strchr(cmd, ' '))) { in php_exec()
78 if (strstr(cmd, "..")) { in php_exec()
83 b = strrchr(cmd, PHP_DIR_SEPARATOR); in php_exec()
86 if (b && *b == '\\' && b == cmd) { in php_exec()
92 …spprintf(&d, 0, "%s%s%s%s%s", PG(safe_mode_exec_dir), (b ? "" : "/"), (b ? b : cmd), (c ? " " : ""… in php_exec()
100 cmd_p = cmd; in php_exec()
113 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to fork [%s]", cmd); in php_exec()
211 char *cmd; in php_exec_ex() local
217 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &cmd, &cmd_len, &ret_code) == FAILURE… in php_exec_ex()
221 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/z/", &cmd, &cmd_len, &ret_array, &ret_co… in php_exec_ex()
231 ret = php_exec(mode, cmd, NULL, return_value TSRMLS_CC); in php_exec_ex()
237 ret = php_exec(2, cmd, ret_array, return_value TSRMLS_CC); in php_exec_ex()
282 char *cmd; in php_escape_shell_cmd() local
288 cmd = safe_emalloc(2, l, 1); in php_escape_shell_cmd()
297 memcpy(cmd + y, str + x, mb_len); in php_escape_shell_cmd()
312 cmd[y++] = '\\'; in php_escape_shell_cmd()
314 cmd[y++] = str[x]; in php_escape_shell_cmd()
346 cmd[y++] = '^'; in php_escape_shell_cmd()
348 cmd[y++] = '\\'; in php_escape_shell_cmd()
352 cmd[y++] = str[x]; in php_escape_shell_cmd()
356 cmd[y] = '\0'; in php_escape_shell_cmd()
361 cmd = erealloc(cmd, y + 1); in php_escape_shell_cmd()
364 return cmd; in php_escape_shell_cmd()
373 char *cmd; in php_escape_shell_arg() local
378 cmd = safe_emalloc(4, l, 3); /* worst case */ in php_escape_shell_arg()
381 cmd[y++] = '"'; in php_escape_shell_arg()
383 cmd[y++] = '\''; in php_escape_shell_arg()
393 memcpy(cmd + y, str + x, mb_len); in php_escape_shell_arg()
403 cmd[y++] = ' '; in php_escape_shell_arg()
407 cmd[y++] = '\''; in php_escape_shell_arg()
408 cmd[y++] = '\\'; in php_escape_shell_arg()
409 cmd[y++] = '\''; in php_escape_shell_arg()
413 cmd[y++] = str[x]; in php_escape_shell_arg()
417 cmd[y++] = '"'; in php_escape_shell_arg()
419 cmd[y++] = '\''; in php_escape_shell_arg()
421 cmd[y] = '\0'; in php_escape_shell_arg()
426 cmd = erealloc(cmd, y + 1); in php_escape_shell_arg()
428 return cmd; in php_escape_shell_arg()
438 char *cmd = NULL; in PHP_FUNCTION() local
445 cmd = php_escape_shell_cmd(command); in PHP_FUNCTION()
446 RETVAL_STRING(cmd, 0); in PHP_FUNCTION()
459 char *cmd = NULL; in PHP_FUNCTION() local
466 cmd = php_escape_shell_arg(argument); in PHP_FUNCTION()
467 RETVAL_STRING(cmd, 0); in PHP_FUNCTION()