Supervisor: PHP ??????? ?? ??? ???? ?? ???
Supervisor? ?? ?? ??, ??? ??? ? ?? ????? ??? ???? PHP ????? ???? ????? ???? ??? ?? ??? ?????. ? ?????? Supervisor ??, PHP ?????? ?? ? ??? ??? ?? ???? ??? ?? ??? ?????.
??? ??
Supervisor? ??? ?? ???? ????? ??? ???? ? ?????.
- ??? ????? ???? ?? ?????.
- ? ?? ????? ?? ?? ??? ??.
- ??? ? ? ????? ??.
??? ???? PHP ????? ?? ?????.
- ??? ??? ?? Laravel ???
- WebSocket ??? ?? ???? ????.
- ?? ??? ??? ??? ?????.
Supervisor ??
???/???:
sudo apt update sudo apt install supervisor
CentOS/RedHat:
sudo yum install epel-release sudo yum install supervisor
?? ? ??? ??? ? ???:
sudo systemctl start supervisord sudo systemctl enable supervisord
??? ??
Supervisor? ?? ??(????? /etc/supervisor/conf.d/
? ??)? ???? ?? ????? ?????.
?? ?? ?:
?? ???? /etc/supervisor/conf.d/my_php_worker.conf
???:
[program:my_php_worker] command=php /path/to/worker.php autostart=true autorestart=true stderr_logfile=/var/log/my_php_worker.err.log stdout_logfile=/var/log/my_php_worker.out.log
--tries=3
??(command
??? ?)? ?? ? ??? ??? 3??? ?????.
?? ??:
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start my_php_worker:*
?? ?? ??
??? ?? ??? ?? ??? ??? ??? ????.
-
command
: ??? ?????. ?:command=php /path/to/worker.php
-
autostart
: Supervisor? ????? ???? ?????. ?:true
(???),false
. ?:autostart=true
-
autorestart
: ?? ? ???? ?? ?????. ?:true
,false
,unexpected
. ?:autorestart=unexpected
-
startsecs
: ????? ??? ??? ???? ?? ?? ???(?)???. ???: 1. ?:startsecs=5
-
startretries
: ?? ? ?? ??? ?? ?????. ???: 3. ?:startretries=5
-
exitcodes
: ???? ???? ???? ?? ?????. ???: 0,2. ?:exitcodes=0,1
-
stopwaitsecs
: ?? ?? ? ??? ??? ???? ??(?)???. ???: 10. ?:stopwaitsecs=20
-
redirect_stderr
: ?? ??? ?? ???? ???????. ?:true
,false
(???). ?:redirect_stderr=true
-
stdout_logfile
/stderr_logfile
: ?? ?? ? ??? ?? ?? ?? ?????. ?:stdout_logfile=/var/log/my_program.out.log
-
stdout_logfile_maxbytes
/stderr_logfile_maxbytes
: ?? ? ?? ?? ?? ?????. ???: 50MB. ?:stdout_logfile_maxbytes=10MB
-
stdout_logfile_backups
/stderr_logfile_backups
: ??? ??? ?? ?? ????. ???: 10. ?:stdout_logfile_backups=3
-
user
: ????? ??? ??? ??????. ?:user=www-data
-
environment
: ?? ??. ?:environment=APP_ENV="production",DB_HOST="localhost"
-
priority
: ?? ??(?? ?? ?? ??) ???: 999. ?:priority=100
-
directory
: ?? ????. ?:directory=/path/to/your/app
-
stopasgroup
: ????? ? ???? ?? ??? ????. ?:true
,false
(???). ?:stopasgroup=true
-
killasgroup
:stopwaitsecs
??? ????? ?? ?? ????? ??? ?????. ?:true
,false
(???). ?:killasgroup=true
PHP ?? ?? ??
-
Laravel ???: ???? ?? ??? ??
queue:work
??? ?????.sudo apt update sudo apt install supervisor
-
??? ??: ?? ??? ??? ???? ??? ?? cron? ?????.
sudo yum install epel-release sudo yum install supervisor
-
?? ?? ????: WebSocket ??? ?? ?? ????? ?????.
sudo systemctl start supervisord sudo systemctl enable supervisord
??? ?? ???
??? ?? ? Supervisor? ????? ?????.
-
??? ??? ???:
sudo systemctl enable supervisord
-
??? ??(??? ??):
sudo systemctl start supervisord
?? ??
- ???? ???? ??? ?????.
-
stdout_logfile_maxbytes
?stdout_logfile_backups
? ???? ?? ??? ?????. -
environment
???? ???? ??? ?????.
??
Supervisor? ????? ????? ???? PHP ????? ???? ?????. ? ???? ??, ?? ? ?? ??????? ?? ???? ??? ???? PHP ????? ????? ???? ?? ??? ?????.
? ??? PHP ???? ?? ??? ???? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!
-

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











ToversionAphp ??, forclarityandeasofrouting, ac

TOSECURELYHANDLEAUSTENCENDACTIONANDACTERIZINGINPHP, FORCUCTSESTEPS : 1. ALWAYSHASHPASSWORTHPASSWORD_HASH () ? VERVERIFYUSINGPANSWORD_VERIFY (), usePREPAREDSTATEMENTSTOPREVENTSQLINGERGED, andSTOREUSERSESSEATAIN $ _SESSIONSAFTERLOGIN.2.impleplempletrole ?? ACCESSC

ProceduralAndObject-OrientedProgramming (OOP) InphpDiffersiMINTIFINTIONTERINGLISTURE, ??? ? ? DATAHANDLING

phpdoesnothaveAbuilt-inweakMapButofferSweakReference.1.WeakReenceAllowsholdingReferences withoutpreventinggarbageCollection.2.ItusteForCaching, Eventlisteners, andMetAdataWithoutAftingObjectLifeCycles.3.youcoucococococococcinccing

PHP?? ?? ???? ???? ????? ??? ?? ??? ???? ?? ??? ??? ??? ???? ????. 1. finfo_file ()? ???? ?? ?? ??? ???? ???/jpeg? ?? ?? ?? ? ?????. 2. uniqid ()? ???? ??? ?? ??? ???? ? Web ?? ????? ??????. 3. php.ini ? html ??? ?? ?? ??? ???? ???? ??? 0755? ?????. 4. Clamav? ???? ???? ???? ??? ??????. ??? ??? ?? ???? ????? ???? ?? ??? ????? ???? ??? ? ??? ?????.

?, PHP? ?? ?? ?? ?????? ?? MongoDB ? Redis? ?? NOSQL ??????? ?? ??? ? ????. ?? MongoDBPHP ???? (PECL ?? Composer? ?? ??)? ???? ????? ????? ??? ?????? ? ???? ????? ??, ??, ?? ? ?? ??? ?????. ??, Predis ????? ?? Phpredis ??? ???? Redis? ???? ?? ? ?? ? ??? ???? ??? ????? Phpredis? ???? ?? Predis? ?? ??? ?????. ? ? ?? ??? ???? ? ????? ????.

PHP?? ==? ==? ?? ???? ?? ??? ??????. == ?? ??? ?? ?? ?????. ?? ??, 5 == "5"? true? ????, ?? ??? ???? ?? ?? ??? ????? ????? (? : 5 === "5"? false? ?????. ?? ?????? ===? ? ???? ?? ?????? == ?? ??? ??? ???? ?????.

PHP?? ?? ??? ??? ???? ??? ??? ????. 1. ?? ??? ?? ? ?? ??? ??? ???? ???? ??? ? ????. ??? ??? ???? ????? ????? ???? ????. 2. ?? ?? ?? - ??, ??? ???? ?? ??? ?????. 3. ?? ???? ??? ??? ???? ??? ??? ?????. 4. Division? / ??? ???? 0?? ??? ?? ????? ??? ?? ??? ?? ? ? ????. 5. ???? ??? ???? ?? ?? ? ?? ??? ???? ? ??? ? ???, ??? ?? ? ? ??? ??? ???? ?????. ? ???? ???? ???? ??? ??? ??? ???? ?? ??? ? ??????? ????.
