Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build with PHP 7.4 #97

Merged
merged 3 commits into from Nov 20, 2020
Merged

fix build with PHP 7.4 #97

merged 3 commits into from Nov 20, 2020

Conversation

tony2001
Copy link
Contributor

In 7.4 the API was slightly changed, so meminfo now needs a small patch to support it.

@WyriHaximus
Copy link
Contributor

Can confirm that this compiles on php 7.4, the function is available, it seems to write out to the stream, but it currently leads to a SIGSEGV.

@WyriHaximus
Copy link
Contributor

Tried directly on a machine and not in docker this time and it also SIGSEGV's with the following command: php -r "meminfo_dump(fopen('/tmp/my_dump_file.json', 'w'));sleep(1);echo file_get_contents('/tmp/my_dump_file.json');"

@mleczakm
Copy link

Any idea how get it working on php 7.4, will it be difficult? We have been using this extension for discovering memory leaks in workers (great tool, big thanks to the makers!) and would like to continue using it on php 7.4.

@tony2001
Copy link
Contributor Author

Check out the latest version of this branch, plz. Let me know if you find any issues, I'll try to fix them ASAP.

@WyriHaximus
Copy link
Contributor

Can confirm that building the extension into 7.4 Docker images now works again and the simple write check doesn't segfault anymore 👍

@WyriHaximus
Copy link
Contributor

Just opened #103 to fix the failing test and also test PHP 7.4 on the CI

@kelunik
Copy link

kelunik commented May 23, 2020

I can also confirm that it works mostly fine. I had an issue with FFI objects (see #104) and another issue with invalid JSON UTF-8 encoding that could be fixed with running the output through jq.

@malarzm
Copy link

malarzm commented Jul 10, 2020

Faced no issues when working with a quite big Symfony app and a functional test suite. Would be great to see this PR merged!

@vudaltsov
Copy link

Got a compilation problem, replacing ulong with zend_ulong on line 180 fixed the issue.

Corrected and rebased version in my fork: https://github.com/vudaltsov/php-meminfo/tree/php74_support

@BitOne BitOne merged commit b9dd30b into BitOne:master Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants