Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat menggunakan runtime kustom untuk menambahkan
fungsi lain ke aplikasi PHP yang berjalan di lingkungan fleksibel App Engine. Untuk mengonfigurasi
runtime kustom, ganti baris berikut di file app.yaml Anda:
runtime: php
dengan baris ini:
runtime: custom
Anda juga harus menentukan image dasar dengan menambahkan Dockerfile di direktori yang sama yang berisi file app.yaml.
Buka dokumentasi Runtime kustom untuk mempelajari cara menentukan Dockerfile dalam runtime kustom.
Health check
Secara default, semua program yang berjalan di lingkungan fleksibel menerima
permintaan health check.
Image dasar gcr.io/google_appengine/php merespons permintaan health check,
sehingga Anda tidak perlu menulis pengendali health check Anda sendiri. Jika
menggunakan gambar lain, Anda harus menonaktifkan health check, atau menulis kode sendiri
untuk menangani permintaan health check.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[[["\u003cp\u003eCustom runtimes in the App Engine flexible environment allow you to extend the functionality of a PHP application.\u003c/p\u003e\n"],["\u003cp\u003eTo use a custom runtime, you must replace \u003ccode\u003eruntime: php\u003c/code\u003e with \u003ccode\u003eruntime: custom\u003c/code\u003e in your \u003ccode\u003eapp.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eA Dockerfile in the same directory as the \u003ccode\u003eapp.yaml\u003c/code\u003e file is needed to specify a base image for the custom runtime.\u003c/p\u003e\n"],["\u003cp\u003eThe default base image \u003ccode\u003egcr.io/google_appengine/php\u003c/code\u003e automatically handles health check requests, but custom images require manual handling or disabling of health checks.\u003c/p\u003e\n"]]],[],null,["# Customizing the PHP Runtime\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nYou can use [custom runtimes](/appengine/docs/flexible/custom-runtimes) to add\nadditional functionality to a PHP app running in the App Engine flexible environment. To configure\na custom runtime, replace the following line in your [`app.yaml` file](/appengine/docs/flexible/reference/app-yaml): \n\n runtime: php\n\nwith this line: \n\n runtime: custom\n\nYou must also [specify a base image](/appengine/docs/flexible/custom-runtimes/build#base)\nby adding a Dockerfile in the same directory that contains the `app.yaml` file.\n\nVisit the [Custom runtimes](/appengine/docs/flexible/custom-runtimes)\ndocumentation to learn how to define a Dockerfile in a custom runtime.\n\nHealth checking\n---------------\n\nBy default, all programs running in the flexible environment receive\n[health check requests](/appengine/docs/flexible/how-instances-are-managed).\nThe base image `gcr.io/google_appengine/php` responds to the health check\nrequest, so you don't have to write your own health check handler. If you're\nusing a different image, you need to disable health checks, or write your own\ncode to handle health check requests."]]