Nako ya go dira ga PHP
Lefelo lengwe le lengwe le dira ka mofuta wa PHP o o o tlhophang. Mo godimo ga mofuta, WasFor e go letla go phimola ditaelo tsa php.ini ka bongwe ka saete ntle le go ama porofaele ya sefara ka bophara.
Tlhopha mofuta
Diwebosaete → saete → Dipeakanyo → Mofuta wa PHP o thathamisa mefuta e kentsweng noutu. Go e fetola go kwala gape sokete ya FPM ya vhost mme go laisa gape fela letamo leo — mafelo a mangwe a nna a direla.
PHP 8.1 Legacy applications
PHP 8.2 Current LTS-style choice
PHP 8.3 Recommended defaultTshwantsha mofuta o letlhomeso la gago le o bolelang. Go dirisa letlhomeso la segompieno mo nakong ya bogologolo ya go dira ke selo se se tlwaelegileng se se bakang diphoso tsa
500tse di sa itsiweng morago ga go fuduga.
Kafa diphetolo di dirang ka gone
Dikarolo tse tharo di kopana ka nako ya go dira:
| Tlhatlhagano | Mongwe | Sekai |
|---|---|---|
| Porofaele ya sefara | Motsamaisi | WFP0X |
| Diphimolo tsa saete | Moreki | WFP0X |
| Kopo | WFP0X | Go baakanngwa ga sekoupu sa kopo |
Taelo e ruiwa go fitlha saete e e seta. Boleng jo bo phimotsweng jwa null kgotsa selotlolo se se tlogetsweng bo kaya "tswelela o rua". Seno se dira gore go babalesege go fetola sefara ya thulaganyetsoruri moragonyana ntle le go gakgamatsa lefelo lengwe le lengwe.
Ditaelo tse di tshegediwang
| Taelo | Tlhatlhamano | Tlhokomologo | Dintlha |
|---|---|---|---|
| WFP0X | 64M - 1G | 128M | E amogela megatlana ya M/G |
| WFP0X | 30 – 300 | 60 | Metsotswana; 0 ga e a letlelelwa |
| WFP0X | 30 – 300, -1 | 60 | -1 e kaya e e senang selekanyo |
| WFP0X | 2M - 512M | 64M | E tshwanetse go nna ≤ post_max_size |
| WFP0X | 2M - 512M | 64M | E tshwanetse go nna ≥ bogolo jwa go laisa |
| WFP0X | 1000 – 10000 | 1000 | Godisetsa diforomo tse dikgolo |
| WFP0X | On / Off | WFP0X | Boloka Off e le mo tlhagisong |
| WFP0X | dipalo kgotsa E_* | WFP0X | E amogela E_ALL & ~E_DEPRECATED |
| WFP0X | Leina la IANA | WFP0X | sk WFP0X |
| WFP0X | 1440 – 86400 | 1440 | Metsotswana |
Netefatso e diragala pele ga sengwe se kwalwa. Boleng jo bo kwa ntle ga selekanyo bo ganwa ka phoso ya maemo a tshimo; ga e ke e tshwarwa ka tidimalo.
Laola diphimolo mo phaneleng
- Bula lefelo → PHP.
- Fetola Phimola go bapa le taelo.
- Tsenya boleng o bo o boloka.
- Netefatsa phetogo mo kholomong ya E a atlega.
Phanele e totobatsa ditlhagiso tse di jaaka post_max_size e nnye go feta upload_max_filesize, e e neng e tla kgaola dilaiso ka tidimalo.
Laola diphetolo ka API
GET /api/user/sites/42/php/settings
Authorization: Bearer <access-token>{
"ok": true,
"data": {
"php_version": "8.3",
"runtime": "fpm",
"supported": ["memory_limit", "max_execution_time", "upload_max_filesize"],
"inherited": { "memory_limit": "128M", "max_execution_time": "60" },
"overrides": { "memory_limit": "256M" },
"effective": { "memory_limit": "256M", "max_execution_time": "60" },
"limits": { "memory_limit": { "min": "64M", "max": "1G" } },
"warnings": []
}
}Ntšhwafatsa diphetolo ka selo se se sa felelang; dinotlolo tse o di tlogetseng di boloka seemo sa tsone sa ga jaana:
PUT /api/user/sites/42/php/settings
Content-Type: application/json
{ "overrides": { "memory_limit": "256M", "display_errors": "Off" } }Go emisa go phimola taelo, romela null:
{ "overrides": { "memory_limit": null } }Seta gape phimolo nngwe le nngwe:
POST /api/user/sites/42/php/settings/resetLenaane la dikatoloso tse di leng teng mo mofuteng o o tlhophilweng:
GET /api/user/sites/42/php/extensionsDintlha tsa tiriso
- Diphetolo di kwalelwa mo karolwaneng ya
php.iniya saete nngwe le nngwe, e seng mo faeleng ya lefatshe lotlhe. max_execution_timega e akaretse nako e e dirisitsweng mo go thibeleng megala ya tsamaiso; dirisa modiri wa mola mo ditirong tse ditelele.upload_max_filesizelepost_max_sizedi tshwanetse go tsamaya mmogo. Setapost_max_sizee kgolo go se kae.- Morago ga go fetola
error_reporting, tlhagisa gape kgang mme o tlhole pegelo ya phoso ya saete;display_errorse ama fela mmele wa karabo. - Matangwana a FPM a laisiwa gape ka bontle. Dikopo tsa mo sefofaneng di felela ka thulaganyo ya bogologolo.
Amana
- Diwebosaete tsa di-vhost le go tsenngwa tirisong
- Modirisi API ya tshupiso e e feletseng ya ntlha ya bokhutlo
- Tharabololo ya mathata fa phetogo e baka
502