PHP 5는 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 PHP 5 애플리케이션을 배포할 수 없습니다. 기존 PHP 5 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 PHP 버전으로 마이그레이션하는 것이 좋습니다.
설정
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
PHP 5 앱에는 제대로 구성된 Google Cloud Storage 버킷이 필요합니다. 다행히, 다음을 수행하면 각 앱이 해당 버킷에 쉽게 액세스할 수 있습니다.
- 아직 설정하지 않은 경우 프로젝트에 대해 결제를 사용 설정합니다.
- 프로젝트의 스토리지 브라우저에서 버킷 만들기를 클릭합니다.
Cloud Storage 버킷을 사용하면 비용이 발생할 수 있습니다. 프로젝트마다 무료 저장용량 5GB 및 무료 I/O 작업 할당량을 포함하는 기본 버킷이 있을 수 있습니다.
기본 버킷을 사용할 때 유용한 정보
기본 버킷을 사용할 때는 버킷 이름을 알고 있지 않아도 됩니다. 런타임 시 기본 버킷 이름으로 바뀌는 #default#
를 사용할 수 있기 때문입니다.
예를 들어 Cloud Storage용 App Engine 스트림 래퍼를 사용하여 기본 버킷에 쓸 수 있습니다.
또는
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis API supports first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes.\u003c/p\u003e\n"],["\u003cp\u003ePHP 5 apps require a configured Google Cloud Storage bucket, accessible by enabling billing and creating a bucket in the Storage Browser.\u003c/p\u003e\n"],["\u003cp\u003eEach project has a default bucket that includes 5GB of free storage and a free quota for I/O operations, which might incur additional costs.\u003c/p\u003e\n"],["\u003cp\u003eWhen using a default bucket, you can use \u003ccode\u003e#default#\u003c/code\u003e in place of the bucket name, which will be replaced at runtime, or find it programmatically with \u003ccode\u003eCloudStorageTools::getDefaultGoogleStorageBucketName()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can write to the default bucket using the App Engine stream wrapper, which will leverage functions such as \u003ccode\u003efile_put_contents\u003c/code\u003e and \u003ccode\u003efwrite\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Setup\n\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| php-gen2\n|\n| /services/access). If you are updating to the App Engine PHP 7/8 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/php-differences) to learn about your migration options for legacy bundled services.\n\n\u003cbr /\u003e\n\nYour PHP 5 app requires a properly configured Google Cloud Storage\nbucket. Fortunately, each app can easily gain access to such a bucket if you do\nthe following:\n\n1. [Enable billing](https://console.cloud.google.com/billing) for your project, if you haven't already done so.\n2. Click **Create bucket** in the [Storage Browser](https://console.cloud.google.com/storage/browser) for your project.\n\nNote you might incur costs by using a Cloud Storage bucket. Each project can\nhave a default bucket, which includes\n[5GB of free storage and a free quota for I/O operations](/appengine/docs/quotas#Default_Gcs_Bucket).\n\n### Useful tricks when using default buckets\n\nWhen using a default bucket, you don't actually need to know your bucket name:\nyou can use `#default#` and this will be replaced at runtime by the name of the default bucket.\n| **Note:** The default bucket name is typically `\u003capp_id\u003e.appspot.com`, where `\u003capp_id\u003e` is your app ID. You can find the bucket name in the App Engine Admin console **Application Settings** page, under the label *Google Cloud Storage Bucket* . Alternatively, if you don't want to use `#default#`, you can use the [CloudStorageTools::getDefaultGoogleStorageBucketName()](/appengine/docs/legacy/standard/php/refdocs/classes/google.appengine.api.cloud_storage.CloudStorageTools#method_getDefaultGoogleStorageBucketName) method to find the name programmatically.\n\nFor example, you would write to the default bucket using the App Engine\nstream wrapper for Cloud Storage: \n\n $default_bucket = CloudStorageTools::getDefaultGoogleStorageBucketName();\n file_put_contents(\"gs://${default_bucket}/hello_default.txt\", $newFileContent);\n\nor \n\n $default_bucket = CloudStorageTools::getDefaultGoogleStorageBucketName();\n $fp = fopen(\"gs://${default_bucket}/hello_default_stream.txt\", 'w');\n fwrite($fp, $newFileContent);\n fclose($fp);"]]