Skip to content

Fix missing declaration for symbol 'ngx_http_lua_ffi_exec_regex' #113

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

Closed
wants to merge 1 commit into from

Conversation

vkill
Copy link

@vkill vkill commented Jul 7, 2019

Hi there

When I run with official image and test it, the 500 happened. because OR require pcre-dev in runtime. please review it. thx.

docker run --name or_re_test_1 --rm -p 9001:81 -v $(pwd)/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf openresty/openresty:alpine
172.17.0.1 - - [07/Jul/2019:12:41:55 +0000] "GET /re HTTP/1.1" 500 183 "-" "curl/7.58.0"
2019/07/07 12:41:55 [error] 6#6: *1 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/ngx/re.lua:47: missing declaration for symbol 'ngx_http_lua_ffi_exec_regex'
stack traceback:
coroutine 0:
	[C]: in function 'require'
	content_by_lua(nginx.conf:24):2: in main chunk, client: 172.17.0.1, server: , request: "GET /re HTTP/1.1", host: "127.0.0.1:9001"

The nginx.conf

worker_processes  1;

events {
    worker_connections 4;
}

http {
    server {
        listen 81;

        location /re {
            content_by_lua_block {
                local ngx_re = require "ngx.re"

                local res, err = ngx_re.split("a,b,c,d", ",")
                if err then
                    ngx.log(ngx.ERR, "failed: ", err)
                    return
                end

                for i = 1, #res do
                    ngx.say(res[i])
                end
            }
        }
    }
}

@vkill
Copy link
Author

vkill commented Jul 7, 2019

Fix #108

@neomantra
Copy link
Member

Used the approach from this in a broader changeset. See fce29af.

@neomantra neomantra closed this Jul 12, 2019
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.

2 participants