webman 打包成 phar 之后,直接啟動(dòng)可以的,只要是守護(hù)啟動(dòng),提示成功,但是查看進(jìn)程其實(shí)沒有啟動(dòng)起來都
php8.0 start.phar start -d 提示
查詢 提示
php8.0 start.phar status
Workerman[./dm_pay_system.phar] status
Workerman[./dm_pay_system.phar] not run
查詢進(jìn)程也是找不到
從截圖看啟動(dòng)命令并不是 php8.0 start.phar start -d
root@iZbp1f2en293wuktj3vx1cZ:/data/www/dmPaySystem/build# ps auxf |grep 8787
root 6291 0.0 0.0 14432 1024 pts/2 S+ 10:53 0:00 | | _ grep --color=auto 8787
root@iZbp1f2en293wuktj3vx1cZ:/data/www/dmPaySystem/build# ps auxf |grep dm_pay_system
root 6603 0.0 0.0 14432 1008 pts/2 S+ 10:54 0:00 | | _ grep --color=auto dm_pay_system
php8.0 dm_pay_system.phar start -d
Workerman[dm_pay_system.phar] start in DAEMON mode
---------------------------------------------------- WORKERMAN ----------------------------------------------------
Workerman version:4.1.4 PHP version:8.0.22 Event-Loop:\Workerman\Events\Select
----------------------------------------------------- WORKERS -----------------------------------------------------
proto user worker listen processes status
tcp root dm_pay_system http://0.0.0.0:8787 16 [OK]
tcp root monitor none 1 [OK]
tcp root plugin.webman.redis-queue.consumer none 6 [OK]
-------------------------------------------------------------------------------------------------------------------
Input "php dm_pay_system.phar stop" to stop. Start success.
這里是打包配置:
<?php
return [
'enable' => true,
'phar_file_output_dir' => BASE_PATH . DIRECTORY_SEPARATOR . 'build',
'phar_filename' => 'dm_pay_system.phar',
'signature_algorithm'=> Phar::SHA256, //set the signature algorithm for a phar and apply it. The signature algorithm must be one of Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, or Phar::OPENSSL.
'private_key_file' => '', // The file path for certificate or OpenSSL private key file.
'exclude_pattern' => '#^(?!.*(config/plugin/webman/console/app.php|webman/console/src/Commands/(PharPackCommand.php|ReloadCommand.php)|LICENSE|composer.json|.github|.idea|doc|docs|.git|.setting|runtime|test|test_old|.env.example|composer.lock|tests|Tests|vendor-bin|.md))(.*)$#',
'exclude_files' => [
'.env', 'LICENSE', 'composer.json', 'composer.lock','start.php', '.env.example', '.gitignore', 'README.md', 'windows.bat', 'windows.php'
]
];
[pid 2656] write(1, "\nFatal error: Uncaught Error: Ca"..., 1821 <unfinished ...>
[pid 2687] <... lseek resumed> ) = 0
[pid 2656] <... write resumed> ) = 1821
[pid 2687] lseek(3, 0, SEEK_CUR) = 0
[pid 2687] close(3) = 0
[pid 2656] write(1, "\nFatal error: Uncaught TypeError"..., 177 <unfinished ...>
[pid 2687] close(1) = 0
[pid 2656] <... write resumed> ) = 177
[pid 2687] close(2) = 0
[pid 2656] close(2) = 0
[pid 2656] close(1 <unfinished ...>
[pid 2687] openat(AT_FDCWD, "/data/release/dmPaySystem/63_1681_20221212_184623/build/runtime/logs/stdout.log", O_WRONLY|O_CREAT|O_APPEND, 0666 <unfinished ...>
[pid 2656] <... close resumed> ) = 0
[pid 2687] <... openat resumed> ) = 1
[pid 2687] fstat(1, <unfinished ...>
[pid 2656] close(0 <unfinished ...>
[pid 2687] <... fstat resumed> {st_mode=S_IFREG|0666, st_size=474399, ...}) = 0
[pid 2676] munmap(0x7fb92be00000, 2097152 <unfinished ...>
[pid 2687] lseek(1, 0, SEEK_CUR <unfinished ...>
[pid 2656] <... close resumed> ) = 0
[pid 2676] <... munmap resumed> ) = 0
[pid 2685] munmap(0x7fb92be00000, 2097152) = 0
[pid 2685] munmap(0x7fb92ba00000, 2097152) = 0
[pid 2687] <... lseek resumed> ) = 0
[pid 2676] munmap(0x7fb92ba00000, 2097152 <unfinished ...>
[pid 2656] munmap(0x7fb92be00000, 2097152 <unfinished ...>
[pid 2685] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7fb92ba999f0} ---
[pid 2656] <... munmap resumed> ) = 0
[pid 2687] lseek(1, 0, SEEK_CUR <unfinished ...>
[pid 2676] <... munmap resumed> ) = 0
[pid 2687] <... lseek resumed> ) = 0
[pid 2656] munmap(0x7fb92ba00000, 2097152) = 0
[pid 2686] munmap(0x7fb92be00000, 2097152 <unfinished ...>
[pid 2656] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7fb92ba999f0} ---
[pid 2676] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7fb92ba999f0} ---
[pid 2686] <... munmap resumed> ) = 0
[pid 2686] munmap(0x7fb92ba00000, 2097152) = 0
[pid 2686] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7fb92ba999f0} ---
[pid 2685] +++ killed by SIGSEGV +++
[pid 2656] +++ killed by SIGSEGV +++
[pid 2687] openat(AT_FDCWD, "/data/release/dmPaySystem/63_1681_20221212_184623/build/runtime/logs/stdout.log", O_WRONLY|O_CREAT|O_APPEND, 0666 <unfinished ...>
[pid 2686] +++ killed by SIGSEGV +++
[pid 2676] +++ killed by SIGSEGV +++
<... openat resumed> ) = 2
fstat(2, {st_mode=S_IFREG|0666, st_size=474399, ...}) = 0
lseek(2, 0, SEEK_CUR) = 0
lseek(2, 0, SEEK_CUR) = 0
write(1, "\nFatal error: Uncaught Error: Ca"..., 2328) = 2328
write(1, "\nFatal error: Uncaught TypeError"..., 177) = 177
close(2) = 0
close(1) = 0
close(0) = 0
munmap(0x7fb92be00000, 2097152) = 0
munmap(0x7fb92ba00000, 2097152) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7fb92ba999f0} ---
+++ killed by SIGSEGV +++
[pid 4912] write(1, "\nFatal error: Uncaught Error: Call to undefined function posix_isatty()
這個(gè)函數(shù)能不能想其他函數(shù)一樣進(jìn)行提示呢