---
title: "RunPhpCommand"
method: POST
path: "/v1/runtime/php/run/"
tags: ["runtime"]
---

# RunPhpCommand

`POST /v1/runtime/php/run/`

Run a php command as the webserver user for a given hostname. <br />CAUTION: This endpoint allows for arbitrary code execution (ACE) and is therefore disabled by default. <br />To enable this endpoint, set the "ENABLE_API_RUNTIME_PHP_RUN_CMD" environment variable to "true" when starting the API/container.<br />Only super admin accounts can use this endpoint.

## Request body

- DtoRunPhpCommandRequest
  - `command` string
  - `hostname` string
  - `timeoutSecs` integer

## Response `200`

OK

- DtoRunPhpCommandResponse
  - `exitCode` integer
  - `stdErr` string
  - `stdOut` string

---

[API](https://skmtc.net/goinfinite/apis/osapi.md) · [All operations](https://skmtc.net/goinfinite/apis/osapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/goinfinite/osapi/revisions/7320a5d8ef9e/schema)
