vjardin / bcgen

A bytecode generator (compiler) for PHP7
56 stars 19 forks source link

Check/difference PHP Version? #11

Open stefanwerfling opened 5 years ago

stefanwerfling commented 5 years ago

I have create on difference Server to Docker container with PHP7. On server 1 create php bytecode and copy all to Server 2 Docker Container. The Ngnix on Server 2 write to Log: nginx errors “recv() failed (*: Connection reset by peer) while reading response header from upstream”

When i create new php bytecode on Server 2 it works.

Server 1: PHP Version 7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0 Linux ba379afcdad3 3.19.0-74-generic #82~14.04.1-Ubuntu SMP Fri Oct 21 15:43:47 UTC 2016 x86_64

Server 2: PHP Version 7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0 Linux afccfcb416d6 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

How i/to can fix this problem/check difference version? Is there workaround? I want create on my server bytecode and share to customers.

Can you help me?

vjardin commented 5 years ago

There are some knows issues when compilation/execution environment are changed. It needs to be analyzed and fixed. Your contributions are welcomed on this topic.

ghost commented 5 years ago

There are some knows issues when compilation/execution environment are changed. It needs to be analyzed and fixed. Your contributions are welcomed on this topic.

Just say it right: It's requires check on HashTable differences between two php versions. Any extension, function, constant registering order changes causing incompatibility.

stefanwerfling commented 2 years ago

Perhaps a check function would be possible in the extentsion with which you can check whether you can run the file (hash sum from the header with hash sum from the PHP register (environment parameters such as CPU, functions, etc.)?