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

ngx_var_get nginx Signal 11 #175

Open
Qwoker opened this issue Aug 6, 2023 · 4 comments
Open

ngx_var_get nginx Signal 11 #175

Qwoker opened this issue Aug 6, 2023 · 4 comments

Comments

@Qwoker
Copy link

Qwoker commented Aug 6, 2023

Hello!
Where i call ngx_var_get with undefined var name example ngx_var_get("fijadsasd") or ngx_var_get("test33") (this variables is null and not set in nginx) i try open page and got crash nginx with signal 11

@Qwoker Qwoker changed the title ngx_var_get nginx empty response ngx_var_get nginx Signal 11 Aug 6, 2023
@joanhey
Copy link
Contributor

joanhey commented Aug 7, 2023

ngx_var_get() and ngx_var_set() are for the nginx variables, nothing from PHP.

https://www.javatpoint.com/nginx-variables

If in an nginx config, you call a variable that is NOT set before, you will always get a signal 11 error. With or without ngx-php.

@Qwoker
Copy link
Author

Qwoker commented Aug 7, 2023

ngx_var_get() and ngx_var_set() are for the nginx variables, nothing from PHP.

https://www.javatpoint.com/nginx-variables

If in an nginx config, you call a variable that is NOT set before, you will always get a signal 11 error. With or without ngx-php.

everything is correct if I call a function with a non-existent variable in nginx i got crash with signal 11
UPD: if i try call NULL variable on nginx a got "nil", but in PHP i got crashed with signal 11

@joanhey
Copy link
Contributor

joanhey commented Aug 7, 2023

I'll add a test for null variables. And if needed a fix.

@Qwoker
Copy link
Author

Qwoker commented Aug 7, 2023

I'll add a test for null variables. And if needed a fix.

I check sources PHP ZEND on repository. I found only RETURN_NULL(); but i don't know why nginx got crash.

If you know how fix it? do it, please)

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

2 participants