Yun Dou

Results 98 comments of Yun Dou

@theofidry micro do support phar (this issue is due to compression and a missing phar patch which make sfx built in project workflow donot support it) For laravel, laravel hardcoded...

> @ryangjchandler Did you ever sort this out? I'm currently getting `internal corruption of phar "app.phar" (truncated manifest header)`. I'm also using Box (via [laravel-zero](https://github.com/laravel-zero/laravel-zero)) and then `cat micro.sfx app...

You may set ini config `openssl.capath` to an exist ca path, see https://www.php.net/manual/en/openssl.configuration.php or specify a ca cert used: https://stackoverflow.com/a/15362509/17803469 I think make a bundled ca cert load from memory...

> You may set ini config `openssl.capath` to an exist ca path, see https://www.php.net/manual/en/openssl.configuration.php > > or specify a ca cert used: https://stackoverflow.com/a/15362509/17803469 > > I think make a bundled...

1. 你的phar压缩过吗 已知压缩过的phar有点小毛病,需要构建时打patch:https://github.com/easysoft/phpmicro/blob/master/patches/phar.patch 2. ini头啥样的,给个hexdump看看呗

看起来这个头没啥问题,phar是不是压缩过的我就不知道了,压缩过的phar应该只有乱码,没有这个报错 我调查一下,如果是micro的bug我修下,但如果是比较坏的情况,swoole对phar的支持有问题就比较麻烦(micro和swow对phar的支持有些魔法,不知道是不是兼容现在版本的swoole)

> @ikilobyte 你好,我的php项目已经打包成了phar文件,但是运行的时候需要`php test.phar start`这样起服务,我直接`copy /b micro.sfx + test.phar test.exe`,然后运行test.exe不行,需要怎么做才能把这个启动命令也打到二进制文件呢?我想要的结果是,直接运行test.exe就相当于执行`php test.phar start`这个命令。谢谢 1. 请单独开issue 2. micro作为底层的东西,不应该提供这种功能 如果需要的话建议通过custom phat stub或框架设置来实现

micro是一个sapi,micro不是php解释器 你需要按照readme的指示构建micro

> > micro是一个sapi,micro不是php解释器 > > 你需要按照readme的指示构建micro > > 我好像有点明白了,如果构建动态的 micro ,是不是意味着,redis 等系列的so扩展 都不能内置了,都必须要动态加载? 不是,仍然可以静态链接任意扩展,只要他们的config.m4/config.w32没有写歪来(如果写歪了可以摇我来修

可以用[lwmbs](https://github.com/dixyes/lwmbs) 或者找一个现成的: https://github.com/dixyes/lwmbs/actions/runs/4571610889 micro或者micro-cli(它的sapi名称是cli,用于兼容一些php库)开头的,选shared glibc版本就行 它的扩展和[static-php-cli](https://github.com/crazywhalecc/static-php-cli)的选择有所不同,比如我这个懒狗懒得填坑一直没做swoole(lib(std)c++的支持太痛苦了)