Sengoli sa Lingoloa
rarollaVestaCPphp open_basedir bothata ba phoso ka phanele
PHP open_basedir ke eng?
- PHP open_basedir protection tweak ke mokhoa o bolokehileng oa ts'ireletso o thibelang basebelisi ho sebelisa PHP ho bula lifaele kapa mangolo a fumanehang ka ntle ho ntlo ea bona ntle le haeba foldara eo e sa kenyelletsoa ka ho hlaka.
- Ho nolofalletsa sebopeho sa PHP open_basedir ho tla etsa bonnete ba hore lits'ebetso tsohle tsa faele li lekanyelitsoe ho lifaele tse tlas'a bukana e itseng, ho thibela mangolo a php ho tsoa ho mosebelisi ea itseng ho fumana lifaele ka liakhaonto tse sa lumelloeng tsa mosebelisi.
- Ha mongolo o leka ho bula faele ka mohlala, fopen() kapa gzopen(), sebaka sa faele sea hlahlojoa.
Ho na le lithupelo tse ling tse amanang le liphanele tsa VestaCP mona ▼
Ha faele e feta sefate se boletsoeng kapa se lumelletsoeng, PHP e tla hana ho e bula, phoso e tšoanang le e latelang e ka etsahala:
PHP Warning: require(): open_basedir restriction in effect. File(/home/admin/web/project/www/app/autoload.php) is not within the allowed path(s): (/home/admin/web/project/public_shtml:/home/admin/tmp) in /home/admin/web/project/www/web/app.php on line 6 PHP Warning: require(/home/admin/web/project/www/app/autoload.php): failed to open stream: Operation not permitted in /home/admin/web/project/www/web/app.php on line 6 PHP Fatal error: require(): Failed opening required '/home/admin/web/project/www/web/../app/autoload.php' (include_path='.:/usr/share/php') in /home/admin/web/project/www/web/app.php on line 6
Tharollo
mohato oa 1:Kenya lebitso la domain name "weB service".
mohato oa 2:Fetola "Web Template HTTPD"
- Ka kopo fetola "Web Template HTTPD" ho tloha "default" ho "phpcgi" ▼
Likhahlelo tsa 3:Qala hape tšebeletso ea Apache ka taelo e latelang ▼
service httpd restart
sena keLinuxMathata a tloaelehileng a tsamaiso, hafeela u latela mekhoa e ka holimo, ha ho hlokahale hore u fetole khoutu, u ka e rarolla ka potlako ka mehato ea 3 feela, e bonolo haholo ^ _ ^
Litlhokomelo
- Le ka mohla u se ke ua khetha "phpfcgid", hobane ho bonolo ho sebelisa mohopolo o mongata haholo le ho baka mathata a 500 khafetsa.
Haeba u khetha ho sebelisa template ea "phpfcgid",Chen WeiliangHo khothalletsoa hore u ntlafatse litlhophiso pele u e sebelisa ▼
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) o arolelane "Ke lokela ho etsa eng haeba phoso ea PHP open_basedir e hlaha phanele ea VestaCP? , ho u thusa.
Rea u amohela ho arolelana sehokelo sa sengoloa sena:https://www.chenweiliang.com/cwl-734.html
Rea u amohela ho mocha oa Telegraph oa blog ea Chen Weiliang ho fumana lintlha tsa morao-rao!
📚 Tataiso ena e na le boleng bo boholo, 🌟Ona ke monyetla o sa tloaelehang, se ke oa o fetoa! ⏰⌛💨
Share le rata haeba u rata!
Ho arolelana le lintho tseo u li ratang ke khothatso ea rona e tsoelang pele!