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

PHP Warning: shmop_close(): no shared memory segment with an id of [0] #7

Open
easyremember opened this issue Jan 6, 2017 · 0 comments

Comments

@easyremember
Copy link

When I used simpleshm, I encountered a problem with prompt "PHP Warning: shmop_close(): no shared memory segment with an id of [0] ......... ".

In my scenario, I just newed a simpleshm and checked whether Id exists. If the id doesn't exists, I will return from the function. Then it comes above problem.

I think the existing implementation needs to be enhanced to avoid this problem. After reviewed the code, one suggestion to use a flag to indicate whether $this->shmid has been set (i.e, in the write function and in construct function, and check this flag in destruct function).

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

No branches or pull requests

1 participant