[{"data":1,"prerenderedAt":619},["ShallowReactive",2],{"navigation":3,"/docs/customizing-the-image/changing-common-php-settings":221,"/docs/customizing-the-image/changing-common-php-settings-surround":614},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","/docs","docs",[9,12,56,85,132,153,178,195,208],{"title":10,"path":6,"stem":11},"","docs/index",{"title":13,"path":14,"stem":15,"children":16,"icon":55},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[17,19,23,27,31,35,39,43,47,51],{"title":18,"path":14,"stem":15},"Introduction",{"title":20,"path":21,"stem":22},"Container Basics","/docs/getting-started/container-basics","docs/1.getting-started/2.container-basics",{"title":24,"path":25,"stem":26},"Installation","/docs/getting-started/installation","docs/1.getting-started/3.installation",{"title":28,"path":29,"stem":30},"These Images vs Others","/docs/getting-started/these-images-vs-others","docs/1.getting-started/4.these-images-vs-others",{"title":32,"path":33,"stem":34},"Choosing an Image","/docs/getting-started/choosing-an-image","docs/1.getting-started/5.choosing-an-image",{"title":36,"path":37,"stem":38},"Default Configurations","/docs/getting-started/default-configurations","docs/1.getting-started/6.default-configurations",{"title":40,"path":41,"stem":42},"Upgrade Guide","/docs/getting-started/upgrade-guide","docs/1.getting-started/7.upgrade-guide",{"title":44,"path":45,"stem":46},"Changelog","/docs/getting-started/changelog","docs/1.getting-started/8.changelog",{"title":48,"path":49,"stem":50},"About","/docs/getting-started/about","docs/1.getting-started/9.about",{"title":52,"path":53,"stem":54},"Contributing","/docs/getting-started/contributing","docs/1.getting-started/99.contributing",false,{"title":57,"path":58,"stem":59,"children":60,"page":55},"Image Variations","/docs/image-variations","docs/2.image-variations",[61,65,69,73,77,81],{"title":62,"path":63,"stem":64},"CLI","/docs/image-variations/cli","docs/2.image-variations/cli",{"title":66,"path":67,"stem":68},"FPM","/docs/image-variations/fpm","docs/2.image-variations/fpm",{"title":70,"path":71,"stem":72},"FPM-Apache","/docs/image-variations/fpm-apache","docs/2.image-variations/fpm-apache",{"title":74,"path":75,"stem":76},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/2.image-variations/fpm-nginx",{"title":78,"path":79,"stem":80},"FrankenPHP","/docs/image-variations/frankenphp","docs/2.image-variations/frankenphp",{"title":82,"path":83,"stem":84},"Unit (Deprecated)","/docs/image-variations/unit","docs/2.image-variations/unit",{"title":86,"path":87,"stem":88,"children":89,"page":55},"Framework Guides","/docs/framework-guides","docs/3.framework-guides",[90,123],{"title":91,"icon":55,"defaultOpen":55,"path":92,"stem":93,"children":94,"page":55},"Laravel","/docs/framework-guides/laravel","docs/3.framework-guides/1.laravel",[95,99,103,107,111,115,119],{"title":96,"path":97,"stem":98},"Automations","/docs/framework-guides/laravel/automations","docs/3.framework-guides/1.laravel/1.automations",{"title":100,"path":101,"stem":102},"Task Scheduler","/docs/framework-guides/laravel/task-scheduler","docs/3.framework-guides/1.laravel/2.task-scheduler",{"title":104,"path":105,"stem":106},"Queue","/docs/framework-guides/laravel/queue","docs/3.framework-guides/1.laravel/3.queue",{"title":108,"path":109,"stem":110},"Horizon","/docs/framework-guides/laravel/horizon","docs/3.framework-guides/1.laravel/4.horizon",{"title":112,"path":113,"stem":114},"Reverb","/docs/framework-guides/laravel/reverb","docs/3.framework-guides/1.laravel/4.reverb",{"title":116,"path":117,"stem":118},"Nightwatch","/docs/framework-guides/laravel/nightwatch","docs/3.framework-guides/1.laravel/5.nightwatch",{"title":120,"path":121,"stem":122},"Octane","/docs/framework-guides/laravel/octane","docs/3.framework-guides/1.laravel/octane",{"title":124,"icon":55,"defaultOpen":55,"path":125,"stem":126,"children":127,"page":55},"WordPress","/docs/framework-guides/wordpress","docs/3.framework-guides/2.wordpress",[128],{"title":129,"path":130,"stem":131},"Using Docker with WordPress","/docs/framework-guides/wordpress/using-wordpress-with-docker","docs/3.framework-guides/2.wordpress/4.using-wordpress-with-docker",{"title":133,"path":134,"stem":135,"children":136,"page":55},"Deployment And Production","/docs/deployment-and-production","docs/4.deployment-and-production",[137,141,145,149],{"title":138,"path":139,"stem":140},"Development to Production","/docs/deployment-and-production/development-to-production","docs/4.deployment-and-production/2.development-to-production",{"title":142,"path":143,"stem":144},"Packaging Your App for Deployment","/docs/deployment-and-production/packaging-your-app-for-deployment","docs/4.deployment-and-production/3.packaging-your-app-for-deployment",{"title":146,"path":147,"stem":148},"Configuring SSL","/docs/deployment-and-production/configuring-ssl","docs/4.deployment-and-production/4.configuring-ssl",{"title":150,"path":151,"stem":152},"Choosing a Host","/docs/deployment-and-production/choosing-a-host","docs/4.deployment-and-production/5.choosing-a-host",{"title":154,"icon":55,"defaultOpen":55,"path":155,"stem":156,"children":157,"page":55},"Advanced Guides","/docs/guide","docs/5.guide",[158,162,166,170,174],{"title":159,"path":160,"stem":161},"Migrating from official PHP images","/docs/guide/migrating-from-official-php-images","docs/5.guide/1.migrating-from-official-php-images",{"title":163,"path":164,"stem":165},"Using Healthchecks With Laravel","/docs/guide/using-healthchecks-with-laravel","docs/5.guide/2.using-healthchecks-with-laravel",{"title":167,"path":168,"stem":169},"Using S6 Overlay","/docs/guide/using-s6-overlay","docs/5.guide/2.using-s6-overlay",{"title":171,"path":172,"stem":173},"Understanding File Permissions","/docs/guide/understanding-file-permissions","docs/5.guide/3.understanding-file-permissions",{"title":175,"path":176,"stem":177},"Configuring Trusted Proxies","/docs/guide/configuring-trusted-proxies","docs/5.guide/4.configuring-trusted-proxies",{"title":179,"icon":55,"defaultOpen":55,"path":180,"stem":181,"children":182,"page":55},"Customization","/docs/customizing-the-image","docs/6.customizing-the-image",[183,187,191],{"title":184,"path":185,"stem":186},"Changing php.ini settings","/docs/customizing-the-image/changing-common-php-settings","docs/6.customizing-the-image/1.changing-common-php-settings",{"title":188,"path":189,"stem":190},"Installing PHP extensions","/docs/customizing-the-image/installing-additional-php-extensions","docs/6.customizing-the-image/2.installing-additional-php-extensions",{"title":192,"path":193,"stem":194},"Adding Start Up Scripts","/docs/customizing-the-image/adding-your-own-start-up-scripts","docs/6.customizing-the-image/3.adding-your-own-start-up-scripts",{"title":196,"path":197,"stem":198,"children":199,"page":55},"Troubleshooting","/docs/troubleshooting","docs/7.troubleshooting",[200,204],{"title":201,"path":202,"stem":203},"Common Issues","/docs/troubleshooting/common-issues","docs/7.troubleshooting/1.common-issues",{"title":205,"path":206,"stem":207},"Getting Help","/docs/troubleshooting/getting-help","docs/7.troubleshooting/2.getting-help",{"title":209,"path":210,"stem":211,"children":212,"page":55},"Reference","/docs/reference","docs/8.reference",[213,217],{"title":214,"path":215,"stem":216},"Environment Variable Specification","/docs/reference/environment-variable-specification","docs/8.reference/1.environment-variable-specification",{"title":218,"path":219,"stem":220},"Command Reference","/docs/reference/command-reference","docs/8.reference/2.command-reference",{"id":222,"title":184,"body":223,"description":607,"extension":253,"links":608,"meta":609,"navigation":531,"path":185,"redirect":608,"seo":612,"stem":186,"__hash__":613},"docs/docs/6.customizing-the-image/1.changing-common-php-settings.md",{"type":224,"value":225,"toc":602},"minimark",[226,233,238,241,256,259,389,392,460,464,478,481,504,510,541,547,576,580,598],[227,228,229],"lead-p",{},[230,231,232],"p",{},"Instead of going through the effort of writing custom scripts or mounting files to change PHP settings, have the power to change common settings with the simplicity of an environment variable.",[234,235,237],"h2",{"id":236},"common-examples","Common Examples",[230,239,240],{},"All our environment variables are documented and can be found in our environment variable specification documentation.",[242,243],"u-button",{"ariaLabel":214,"className":244,"color":252,"label":214,"size":253,"to":215,"trailing-icon":254,"variant":255},[245,246,247,248,249,250,251],"font-bold","ring","ring-inset","ring-blue-600","text-blue-600","hover:ring-blue-500","hover:text-blue-500","primary","md","i-lucide-arrow-right","outline",[230,257,258],{},"Here are a few examples on how you can change common PHP settings.",[260,261,270],"pre",{"className":262,"code":263,"filename":264,"highlights":265,"language":269,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  php:\n    image: serversideup/php:8.2.12-fpm-nginx-bookworm\n    environment:\n      PHP_POST_MAX_SIZE: \"500M\"\n      PHP_UPLOAD_MAX_FILE_SIZE: \"500M\"\n      SSL_MODE: \"mixed\"\n    ports:\n      - 80:8080\n      - 443:8443\n    volumes:\n      - .:/var/www/html/\n","compose.yml",[266,267,268],4,5,6,"yml",[271,272,273,286,294,307,316,327,337,348,356,365,373,381],"code",{"__ignoreMap":10},[274,275,278,282],"span",{"class":276,"line":277},"line",1,[274,279,281],{"class":280},"s4JwU","services",[274,283,285],{"class":284},"s95oV",":\n",[274,287,289,292],{"class":276,"line":288},2,[274,290,291],{"class":280},"  php",[274,293,285],{"class":284},[274,295,297,300,303],{"class":276,"line":296},3,[274,298,299],{"class":280},"    image",[274,301,302],{"class":284},": ",[274,304,306],{"class":305},"sU2Wk","serversideup/php:8.2.12-fpm-nginx-bookworm\n",[274,308,311,314],{"class":309,"line":266},[276,310],"highlight",[274,312,313],{"class":280},"    environment",[274,315,285],{"class":284},[274,317,319,322,324],{"class":318,"line":267},[276,310],[274,320,321],{"class":280},"      PHP_POST_MAX_SIZE",[274,323,302],{"class":284},[274,325,326],{"class":305},"\"500M\"\n",[274,328,330,333,335],{"class":329,"line":268},[276,310],[274,331,332],{"class":280},"      PHP_UPLOAD_MAX_FILE_SIZE",[274,334,302],{"class":284},[274,336,326],{"class":305},[274,338,340,343,345],{"class":276,"line":339},7,[274,341,342],{"class":280},"      SSL_MODE",[274,344,302],{"class":284},[274,346,347],{"class":305},"\"mixed\"\n",[274,349,351,354],{"class":276,"line":350},8,[274,352,353],{"class":280},"    ports",[274,355,285],{"class":284},[274,357,359,362],{"class":276,"line":358},9,[274,360,361],{"class":284},"      - ",[274,363,364],{"class":305},"80:8080\n",[274,366,368,370],{"class":276,"line":367},10,[274,369,361],{"class":284},[274,371,372],{"class":305},"443:8443\n",[274,374,376,379],{"class":276,"line":375},11,[274,377,378],{"class":280},"    volumes",[274,380,285],{"class":284},[274,382,384,386],{"class":276,"line":383},12,[274,385,361],{"class":284},[274,387,388],{"class":305},".:/var/www/html/\n",[230,390,391],{},"You can also adjust environment variables using the Docker CLI.",[260,393,398],{"className":394,"code":395,"filename":396,"language":397,"meta":10,"style":10},"language-bash shiki shiki-themes github-dark","docker run -d \\\n  -p 80:8080 \\\n  -v $(pwd):/var/www/html \\\n  -e PHP_DATE_TIMEZONE=\"America/New_York\" \\\n  serversideup/php:8.2.12-fpm-nginx-bookworm\n","Terminal","bash",[271,399,400,416,426,445,455],{"__ignoreMap":10},[274,401,402,406,409,413],{"class":276,"line":277},[274,403,405],{"class":404},"svObZ","docker",[274,407,408],{"class":305}," run",[274,410,412],{"class":411},"sDLfK"," -d",[274,414,415],{"class":411}," \\\n",[274,417,418,421,424],{"class":276,"line":288},[274,419,420],{"class":411},"  -p",[274,422,423],{"class":305}," 80:8080",[274,425,415],{"class":411},[274,427,428,431,434,437,440,443],{"class":276,"line":296},[274,429,430],{"class":411},"  -v",[274,432,433],{"class":284}," $(",[274,435,436],{"class":411},"pwd",[274,438,439],{"class":284},")",[274,441,442],{"class":305},":/var/www/html",[274,444,415],{"class":411},[274,446,447,450,453],{"class":276,"line":266},[274,448,449],{"class":411},"  -e",[274,451,452],{"class":305}," PHP_DATE_TIMEZONE=\"America/New_York\"",[274,454,415],{"class":411},[274,456,457],{"class":276,"line":267},[274,458,459],{"class":305},"  serversideup/php:8.2.12-fpm-nginx-bookworm\n",[234,461,463],{"id":462},"setting-your-own-phpini","Setting your own php.ini",[230,465,466,467,470,471,474,475,477],{},"PHP will read the ",[271,468,469],{},"php.ini"," file from the ",[271,472,473],{},"/usr/local/etc/php/conf.d/"," directory in alphabetical order. This means you can create your own ",[271,476,469],{}," file and mount it to the container to override the default settings.",[230,479,480],{},"For example, we can create this file in our project directory:",[260,482,487],{"className":483,"code":484,"filename":485,"language":486,"meta":10,"style":10},"language-ini shiki shiki-themes github-dark","mysqli.max_persistent = 300\nopcache.max_file_size = 10M\nopcache.log_verbosity_level = 3\n","zzz-custom-php.ini","ini",[271,488,489,494,499],{"__ignoreMap":10},[274,490,491],{"class":276,"line":277},[274,492,493],{},"mysqli.max_persistent = 300\n",[274,495,496],{"class":276,"line":288},[274,497,498],{},"opcache.max_file_size = 10M\n",[274,500,501],{"class":276,"line":296},[274,502,503],{},"opcache.log_verbosity_level = 3\n",[230,505,506,507,509],{},"Then in our Dockerfile, we can copy this file to the ",[271,508,473],{}," directory:",[260,511,516],{"className":512,"code":513,"filename":514,"language":515,"meta":10,"style":10},"language-dockerfile shiki shiki-themes github-dark","FROM serversideup/php:8.5-fpm-nginx-bookworm\n\nCOPY zzz-custom-php.ini /usr/local/etc/php/conf.d/\n","Dockerfile","dockerfile",[271,517,518,527,533],{"__ignoreMap":10},[274,519,520,524],{"class":276,"line":277},[274,521,523],{"class":522},"snl16","FROM",[274,525,526],{"class":284}," serversideup/php:8.5-fpm-nginx-bookworm\n",[274,528,529],{"class":276,"line":288},[274,530,532],{"emptyLinePlaceholder":531},true,"\n",[274,534,535,538],{"class":276,"line":296},[274,536,537],{"class":522},"COPY",[274,539,540],{"class":284}," zzz-custom-php.ini /usr/local/etc/php/conf.d/\n",[230,542,543,544,546],{},"If you prefer to remove the default ",[271,545,469],{}," file, you can do so by adding the following line to your Dockerfile:",[260,548,550],{"className":512,"code":549,"filename":514,"language":515,"meta":10,"style":10},"FROM serversideup/php:8.5-fpm-nginx-bookworm\n\nRUN rm /usr/local/etc/php/conf.d/serversideup-docker-php.ini\nCOPY zzz-custom-php.ini /usr/local/etc/php/conf.d/\n",[271,551,552,558,562,570],{"__ignoreMap":10},[274,553,554,556],{"class":276,"line":277},[274,555,523],{"class":522},[274,557,526],{"class":284},[274,559,560],{"class":276,"line":288},[274,561,532],{"emptyLinePlaceholder":531},[274,563,564,567],{"class":276,"line":296},[274,565,566],{"class":522},"RUN",[274,568,569],{"class":284}," rm /usr/local/etc/php/conf.d/serversideup-docker-php.ini\n",[274,571,572,574],{"class":276,"line":266},[274,573,537],{"class":522},[274,575,540],{"class":284},[234,577,579],{"id":578},"validating-changes","Validating changes",[230,581,582,583,586,587,597],{},"It's always best to validate your changes by running ",[271,584,585],{},"php -i"," via the command line or using ",[588,589,594],"a",{"href":590,"rel":591,"target":593},"https://www.php.net/manual/en/function.phpinfo.php",[592],"nofollow","_blank",[271,595,596],{},"phpinfo()",".",[599,600,601],"style",{},"html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}",{"title":10,"searchDepth":288,"depth":288,"links":603},[604,605,606],{"id":236,"depth":288,"text":237},{"id":462,"depth":288,"text":463},{"id":578,"depth":288,"text":579},"Learn how to change common PHP settings with environment variables or your own php.ini file.",null,{"head":610,"layout":7},{"title":611},"Changing common PHP settings - Docker PHP - Server Side Up",{"title":184,"description":607},"1LUEvYdPd6YVBhGDFdsDN8Vi_4h_o-fj3ZdlwYYXimw",[615,617],{"title":175,"path":176,"stem":177,"description":616,"children":-1},"Learn how to configure trusted proxies to get accurate client IP addresses when running behind load balancers, CDNs, or reverse proxies.",{"title":188,"path":189,"stem":190,"description":618,"children":-1},"Learn how to add any PHP extension that you need for your application.",1776367058590]