Re: [uWSGI] php plugin ends with sapi global error, no start (SOLVED)
Hi, Glad you got that working. > However, it is for me still a riddle, why the result of "ldd > php71_plugin.so" pointed to the wrong library. I cannot comment on that as I don't know yet where it pointed :). Could you post output from "ldd php71_plugin.so | grep php"? Right now I can make few assumptions and hopefully point you in the right direction. >> 1 - download php and build it with: ./configure >> --prefix=/usr/local/php71-emb --enable-mbstring --enable-embed Which release of php have you downloaded? Current git master produces libphp8.so. I'm assuming you've downloaded php71 release. >> make, and make install. Where did that put libphp7.so? Somewhere near /usr/local/php71-emb/lib/libphp7.so, right? When starting uwsgi, are you using --dlopen /usr/lib/libphp7.1.so (Debian's libphp-embed) or --dlopen /usr/local/php71-emb/lib/libphp7.so (built from source)? -- Krzysztof Warzecha ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Re: [uWSGI] php plugin ends with sapi global error, no start (SOLVED)
Dear Krzysztof, You were absolutely right. The --dlopen flag did it for me. However, it is for me still a riddle, why the result of "ldd php71_plugin.so" pointed to the wrong library. As I accomplished that, everything worked fine for me. Do you still want the result of the ldd command ? best, Tamer On 04.02.19 01:21, Krzysztof Warzecha wrote: Steps to reproduce: 1 - download php and build it with: ./configure --prefix=/usr/local/php71-emb --enable-mbstring --enable-embed make, and make install. Is there any reason why you are not using libphp7.1-embed from the repositories? (I'm assuming you are running Debian) 2 - build the plugin: UWSGICONFIG_PHPDIR=/usr/local/php71-emb python uwsgiconfig.py --plugin plugins/php default php71 FYI I'm using: - name: "pushd php-plugins; ./configure && make; popd" command: > chdir=/home/uwsgi-build/src/ creates=/home/uwsgi-build/src/{{ item.name }}_plugin.so env CC=clang UWSGICONFIG_PHPPATH=/usr/bin/{{ item.config }} python uwsgiconfig.py --plugin plugins/php core {{ item.name }} with_items: - { name: php72, config: php-config7.2 } - { name: php71, config: php-config7.1 } - { name: php70, config: php-config7.0 } - { name: php56, config: php-config5.6 } Looking at plugins/php/uwsgiplugin.py it seems that your version is doing basically the same thing. Could you show us the output from "ldd php71_plugin.so"? It should import sapi_globals from libphp7.so. Is it possible that you don't have libphp7.so in your system, but libphp7.1.so? Could you try to execute something like this? ./uwsgi --dlopen /usr/lib/libphp7.1.so --plugin php71 --master --socket :3030 --processes 4 ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Re: [uWSGI] php plugin ends with sapi global error, no start
> Steps to reproduce: > 1 - download php and build it with: ./configure > --prefix=/usr/local/php71-emb --enable-mbstring --enable-embed > make, and make install. Is there any reason why you are not using libphp7.1-embed from the repositories? (I'm assuming you are running Debian) > 2 - build the plugin: UWSGICONFIG_PHPDIR=/usr/local/php71-emb python > uwsgiconfig.py --plugin plugins/php default php71 FYI I'm using: - name: "pushd php-plugins; ./configure && make; popd" command: > chdir=/home/uwsgi-build/src/ creates=/home/uwsgi-build/src/{{ item.name }}_plugin.so env CC=clang UWSGICONFIG_PHPPATH=/usr/bin/{{ item.config }} python uwsgiconfig.py --plugin plugins/php core {{ item.name }} with_items: - { name: php72, config: php-config7.2 } - { name: php71, config: php-config7.1 } - { name: php70, config: php-config7.0 } - { name: php56, config: php-config5.6 } Looking at plugins/php/uwsgiplugin.py it seems that your version is doing basically the same thing. Could you show us the output from "ldd php71_plugin.so"? It should import sapi_globals from libphp7.so. Is it possible that you don't have libphp7.so in your system, but libphp7.1.so? Could you try to execute something like this? ./uwsgi --dlopen /usr/lib/libphp7.1.so --plugin php71 --master --socket :3030 --processes 4 -- Krzysztof Warzecha ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
[uWSGI] php plugin ends with sapi global error, no start
Hi everybody, I built the uWSGI php plugin, and I am not getting it to run. I tried it with all latest versions of php 7.1, 7.2 and 7.3 and I get always the same errors displayed. Anybody knows why and what is going wrong up here ? If anybody can tell me what i did wrong, I would kindly thank you. best, Tamer -- Steps to reproduce: 1 - download php and build it with: ./configure --prefix=/usr/local/php71-emb --enable-mbstring --enable-embed make, and make install. 2 - build the plugin: UWSGICONFIG_PHPDIR=/usr/local/php71-emb python uwsgiconfig.py --plugin plugins/php default php71 and make the simple test: ./uwsgi --plugin php71 --master --socket :3030 --processes 4 the outout: !!! UNABLE to load uWSGI plugin: ./php71_plugin.so: undefined symbol: sapi_globals !!! *** Starting uWSGI 2.1-dev-99c74add (64bit) on [Sun FebĀ 3 21:19:47 2019] *** compiled with version: 6.3.0 20170516 on 03 February 2019 20:04:55 os: Linux-4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) nodename: mx-in machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 6 current working directory: /usr/local/uwsgi-g detected binary path: /usr/local/uwsgi-g/uwsgi dropping root privileges as early as possible your processes number limit is 63656 your memory page size is 4096 bytes detected max file descriptor number: 1024 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to TCP address :3030 fd 3 dropping root privileges after socket binding dropping root privileges after plugin initialization your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds your request buffer size is 4096 bytes mapped 364800 bytes (356 KB) for 4 cores *** Operational MODE: preforking *** *** no app loaded. GAME OVER *** ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi