Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

"zend_mm_heap corrupted " when do socket_close($fd) #581

Closed
momaer opened this issue Mar 25, 2016 · 2 comments
Closed

"zend_mm_heap corrupted " when do socket_close($fd) #581

momaer opened this issue Mar 25, 2016 · 2 comments

Comments

@momaer
Copy link

momaer commented Mar 25, 2016

Environment

PHP 7.0.4 (cli) (built: Mar 25 2016 14:58:54) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

PHP Warning: Module 'pthreads' already loaded in Unknown on line 0
Version => 3.1.6

Linux #7 SMP Mon Aug 24 13:46:31 EDT 2015

Summary

https://github.com/krakjoe/pthreads/blob/master/examples/SocketServer.php

@AedDev
Copy link

AedDev commented Apr 1, 2016

Hi @momaer!

There is an easy solution to fix that. You need to set the environment variable USE_ZEND_ALLOC=0. (Source: http://stackoverflow.com/a/10092026/2560143) I had the same issue but starting my application this way worked for me:

USE_ZEND_ALLOC=0 php app.php

You can write a little startup script or define the variable maybe in your .bash_profile.
For usage in a script use:

export USE_ZEND_ALLOC=0

Kind regards

@krakjoe
Copy link
Owner

krakjoe commented Apr 13, 2016

Resources are unsupported.

Anecdotally, you should try using stream_socket_* functions, as they appear to behave a little better.

If resources break, there is nothing I can do to fix it ... sorry ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants