php probe for zipkin and opentracing

Overview

molten

Readme in Chinese 中文

Build Status

molten is transparency tool for application tracing it self module call.

It trace php app core call and output zipkin/opentracing format trace log.

Provides features about muliti trace sapi, multi sampling type, upload tracing status, module control and muliti sink type.

It very easy to build a distributed systems tracing infrastructure base on php, already run on thousand instance on production env.

Table of contents


  1. Installing
  2. QuickStart
  3. Configure
  4. Function
  5. Verify
  6. Features
  7. Contributing
  8. License

Installing

Everything you should need to install molten on your system.

phpize
./configure
make && make install

make install copies molten.so to and appropriate location, but you still need to enable the module int the PHP config file, To do so, either edit your php.ini or add ad molten.ini file in /etc/php5/conf.d with the following contents:extension=molten.so.

at ./configure phase, you can also add --enable-zipkin-header=yes to support zipkin B3 header.

if you want molten support POST method , at the compile phase you should check libcurl-devel is installed.

QuickStart

cd example
sh run.sh

open http://127.0.0.1:9411/zipkin/ in your browser, you can see the tracing detail in it.

if you think above is too simple, you also can do this.

cd example
sh complex.sh

it is cool, alright?

NOTICE if you not see the trace, you select EndTime +1 hour.

Configure

Base Config

molten.enable set 1 enable or set 0 disable, default 1.

molten.service_name is to set service name for label app service name. now we support add ini_set('molten.service_name', 'YOUR_PROJECT_NAME'); to code to trace different projects using same php enveroment.

molten.tracing_cli set 1 to trace, cli sapi, 0 not trace, just use for trace unit test, default 0.

molten.open_report set 1 to open report php error, default 0.

Sampling Config

molten.sampling_type sampling type choose to use sampling by rate(1) or request(2), default is 1.

molten.sampling_request sampling by request, set to per min request num, defualt is 1000.

molten.sampling_rate determine a request sampled or not by rate, default is 64.

Control Config

molten.notify_uri the uri for molten to notify manger.

Report Config

report module output type is same as sink module

molten.report_interval reporter call interval, default 60.

molten.report_limit reporter list limit current only for error num, default 100.

Sink Config

molten.sink_type sink type, 1 write log, log path is depend on molten.sink_log_path, 2 write log to standand output, 3 write log to syslog, 4 use curl to send trace log, http uri depend on molten.sink_http_uri.

molten.output_type output spans on one line(1) or one line one span(2).

molten.sink_log_path locate log path.

molten.sink_http_uri locate log http uri.

molten.sink_syslog_unix_socket transform log to syslog udp unix domain collector.

Spans Config

molten.span_format span format, you can select zipkin or zipkin_v2 or opentracing for different tracing system.

Function

molten_span_format() get current span format, return zipkin or opentraceing (string).

molten_get_traceid() get current context traceid, return hex string.

molten_set_traceid($trace_id) set current context traceid, return void.

Verify

php -d extension=molten.so -d molten.enable=1 -d molten.sink_type=2 -d molten.tracing_cli=1 -d molten.sampling_rate=1 -r '$c=curl_init("http://localhost:12345");curl_exec($c);'

You can see output below:

[{"traceId":"%s","name":"php_curl","version":"php-4","id":"1.1","parentId":"1","timestamp":%d,"duration":%d,"annotations":[{"value":"cs","timestamp":%d,"endpoint":{"serviceName":"%s","ipv4":"%s"}},{"value":"cr","timestamp":%d,"endpoint":{"serviceName":"%s","ipv4":"%s"}}],"binaryAnnotations":[{"key":"http.url","value":"http:\/\/localhost:12345\/","endpoint":{"serviceName":"%s","ipv4":"%s"}},{"key":"error","value":"Failed
connect to localhost:12345; Connection
refused","endpoint":{"serviceName":"%s","ipv4":"%s"}}]},{"traceId":"%s","name":"cli","version":"php-4","id":"1","timestamp":%d,"duration":%d,"annotations":[{"value":"sr","timestamp":%d,"endpoint":{"serviceName":"%s","ipv4":"%s"}},{"value":"ss","timestamp":%d,"endpoint":{"serviceName":"%s","ipv4":"%s"}}],"binaryAnnotations":[{"key":"path","value":"-","endpoint":{"serviceName":"%s","ipv4":"%s"}}]}]

Features

the Config Block above, you can see which feature we support.

Interceptor

we intercept curl,pdo,mysqli,redis,mongodb,memcached extension to build execute time span info. for chain http request, we replace curl_exec,curl_setopt,curl_setopt_array to add http request trace header (x-w-traceid, x-w-spanid and so on).

the span_format is the way to custom span format, for two popular kinds (zipkin and opentracing).

Sampling

different sampling type and change parameter to control sampling, rate or request.

Sink

Sink is the output where you locate, molten support to standard fd, file, http and others (continue), on this way, we can choose where to output trace log.

Control

Use http to control our sampling.

see molten status, request http://domain/molten/status use GET method.

the output is below, already adapt the style of prometheus.

# HELP molten_request_all Number of all request.
# TYPE molten_request_all counter
molten_request_all %d
# HELP molten_request_capture Number of request be capture.
# TYPE molten_request_capture counter
molten_request_capture %d
# HELP molten_sampling_type the type of sampling.
# TYPE molten_sampling_type gauge
molten_sampling_type %d
# HELP molten_sampling_rate the rate of sampling.
# TYPE molten_sampling_rate gauge
molten_sampling_rate %d
# HELP molten_sampling_request the request be capture one min.
# TYPE molten_sampling_request gauge
molten_sampling_request %d

modify molten sampling, request http://domain/molten/status use POST method,

body is json format, field has the same meaning of config.

{"enable":1,"samplingType":2,"samplingRate":20,"samplingRequest":100}

Report

Report base import info which we do not sampled like error list.

Contributing

Welcome developers who willing to make it better.

the mail list below you can contract for discuss and improve more power.

[email protected]

[email protected]

You may contribute in the following ways:

License

Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html

Comments
  • PHP5.6 安装成功运行 run.sh 出错

    PHP5.6 安装成功运行 run.sh 出错

    如题,PHP5.6 安装过程没有任何报错。但运行 run.sh 不成功。

    sh run.sh

    which: no docker in (/usr/local/sbin: …… 运行以下也没有任何反应

    php -d extension=molten.so -d molten.enable=1 -d molten.sink_type=2 -d molten

    .tracing_cli=1 -d molten.sampling_rate=1 -r '$c=curl_init("http://localhost:12345");curl_exec($c); '
    是否一定要求有 docker 环境呢?另外Molten 是否对 PHP 版本有要求,发现在 PHP5.3里貌似不能安装。

    question 
    opened by long904 53
  • Can't load extension

    Can't load extension

    PHP Warning: PHP Startup: Unable to load dynamic library 'modules/molten.so' - modules/molten.so: undefined symbol: MOLTEN_ERROR in Unknown on line 0

    And indeed, lot of -Wimplicit-function-declaration during the build, some of them

    /tmp/Molten-0.1.0beta/php7_wrapper.h:245:5: attention : implicit declaration of function « php_array_merge_recursive » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/molten.c:681:5: attention : implicit declaration of function « mo_intercept_uninit » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/molten.c:643:5: attention : implicit declaration of function « mo_intercept_init » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/molten.c:557:5: attention : implicit declaration of function « mo_shm_ctor » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/molten_ctrl.c:178:17: attention : implicit declaration of function « check_hit_ratio » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/common/molten_shm.c:28:9: attention : implicit declaration of function « MOLTEN_ERROR » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/common/molten_lock.c:151:9: attention : implicit declaration of function « unlink » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/common/molten_lock.c:162:5: attention : implicit declaration of function « close » [-Wimplicit-function-declaration]
    /tmp/Molten-0.1.0beta/molten_chain.c:121:9: attention : implicit declaration of function « rand64hex » [-Wimplicit-function-declaration]
    ...
    
    
    bug enhancement 
    opened by remicollet 21
  • 采样率现在是否有问题?

    采样率现在是否有问题?

    我测试的时候,已经设置了molten.sampling_rate=1,但还是有只有比较小的机会才会输出。 php -d extension=molten.so -d molten.enable=1 -d molten.sink_type=2 -d molten.tracing_cli=1 -d molten.sampling_rate=1 -r '$c=curl_init("http://localhost:12345");curl_exec($c);'

    bug 
    opened by maxincai 10
  • 构建的JSON Span内容是否考虑做下兼容?

    构建的JSON Span内容是否考虑做下兼容?

    2018-03-08 03:51:36.823  WARN 5 --- [nio-9411-exec-8] zipkin.server.ZipkinHttpCollector        : 
    Cannot decode spans due to IllegalArgumentException(Expected value to be a boolean, string or number 
    but was NULL at path $[2].binaryAnnotations[2].value reading List<Span> from json: 
    

    查看对应的binaryAnnotations 确实是value 是null

    "key": "http.response",
    "value": null,
    "endpoint": {
    "serviceName": "xxxx",
    "ipv4": "xxxx",
    "port": 80
    }
    }
    

    另外有部分zipkin的日志是这种

     java.lang.IllegalArgumentException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $ reading List<Span> from json: {"error":[]}
    
    

    找了下以前的issue似乎也有类似的问题,这种情况是不是可以考虑忽略下?

    opened by googlerobot 9
  • undefined symbol: php_pdo_get_exception in Unknown on line 0

    undefined symbol: php_pdo_get_exception in Unknown on line 0

    PHP Warning: PHP Startup: Unable to load dynamic library '/home/Molten-master/modules/molten.so' - /home/Molten-master/modules/molten.so: undefined symbol: php_pdo_get_exception in Unknown on line 0

    php_pdo_get_exception这个方法没有定义怎么回事,我按照方法安装了,还是报错,能提供个微信群吗

    opened by daiqichun 8
  • php7.2 安装 Molten 出现 Segmentation fault

    php7.2 安装 Molten 出现 Segmentation fault

    你好 php7.2 安装 Molten 出现 Segmentation fault

    PHP版本:

    PHP 7.2.14 (cli) (built: Jan  8 2019 14:05:15) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.14, Copyright (c) 1999-2018, by Zend Technologies
    

    PHP扩展:

    [PHP Modules]
    amqp
    apcu
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    exif
    fileinfo
    filter
    ftp
    gd
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mbstring
    mcrypt
    molten
    mongodb
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_pgsql
    pdo_sqlite
    pgsql
    Phar
    posix
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    wddx
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    

    Molten 会跟某个 PHP扩展有冲突吗?

    奇怪的是 我在另外一台机器上 php7.2 安装 Molten 运行正常的
    帮忙看看谢谢

    opened by wujunze 6
  • 运行正常,但无法上报zipkin服务器

    运行正常,但无法上报zipkin服务器

    描述:Molten和zipkin在同一台服务器上,php版本:PHP 7.1.8 1.使用curl是可以正常上报数据的。 curl -X POST
    http://127.0.0.1:9411/api/v1/spans
    -H 'cache-control: no-cache'
    -H 'content-type: application/json'
    -d '' 2. molten.sink_type=2,可以正常输出trance json串的 3. nc -l 1111,然后运行命令 php -d molten.enable=1 -d molten.sampling_type=1 -d molten.sink_type=4 -d molten.tracing_cli=1 -d molten.sink_http_uri=http://127.0.0.1:1111/api/v1/spans -d molten.service_name=php_test -d molten.sampling_rate=1 -r '$c=curl_init("http://localhost:12345");curl_exec($c);' qq 20171207140637 4.日志输出:

    qq 20171207140731

    已经调试了一整天但依然无法自行解决问题,麻烦帮忙看下,谢谢!

    opened by zefengguo 6
  • PHP71 cli执行run.sh无法写入zipkin

    PHP71 cli执行run.sh无法写入zipkin

    php71 -d molten.enable=1 -d molten.sink_type=4 -d molten.tracing_cli=1 -d molten.sink_http_uri=http://127.0.0.1:9411/api/v1/spans -d molten.service_name=php_test -d molten.sampling_rate=1 -r '$c=curl_init("http://10.11.4.55");curl_exec($c);'

    zipkin启动命令行,并且创建了相应的数据 java -jar zipkin.jar --STORAGE_TYPE=mysql --MYSQL_DB=zipkindb --MYSQL_USER=root --MYSQL_PASS=xxx --MYSQL_HOST=127.0.0.1--MYSQL_TCP_PORT=3306

    开始以为是php-fpm启动的原因,停掉后执行还是写不进去zipkin。

    另外,我使用nginx+php-fpm(php7)环境时,也是无法写数据到zipkin,低版本的php5.6当时测试时是没有问题的。我的molten配置如下 molten.enable = 1 molten.sink_log_path = '/tmp/tracing' molten.service_name = 'xxx' molten.tracing_cli = 1 molten.sampling_type = 2 molten.sampling_request = 100 molten.sampling_rate = 1 molten.span_format = 'zipkin' molten.report_interval = 60 molten.notify_uri = '' molten.report_limit = 100 molten.sink_type = 4 molten.output_type = 1 molten.sink_http_uri = 'http://127.0.0.1:9411/api/v1/spans' molten.sink_syslog_unix_socket = '' molten.sink_kafka_brokers= '' molten.sink_kafka_topic = ''

    opened by ycaihappy 6
  • 编译问题

    编译问题

    --with-mysql 指定值后报错,默认不会报错,默认是mysqlnd吧, --with-mysqli=/usr/bin/mysql_config

    /usr/local/php5.5/include/php/ext/mysqli/php_mysqli_structs.h:63:23: fatal error: my_global.h: 没有那个文件或目录

    opened by magnetoeric 6
  • Segmentation fault with PHP 7.2

    Segmentation fault with PHP 7.2

    Tests are also failing, but could not get any more info from them. So i made report with gdb...

    Any ideas what could be the cause?

    PHP:

    PHP 7.2.3-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Mar  6 2018 12:03:48) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.3-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    
    root@roses:~/Molten/example# gdb php
    GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from php...(no debugging symbols found)...done.
    (gdb) run -d extension=molten.so -d molten.enable=1 -d molten.sink_type=2 -d molten.tracing_cli=1 -d molten.sampling_rate=1 -r '$c=curl_init("http://localhost:1");curl_exec($c);'
    Starting program: /usr/bin/php -d extension=molten.so -d molten.enable=1 -d molten.sink_type=2 -d molten.tracing_cli=1 -d molten.sampling_rate=1 -r '$c=curl_init("http://localhost:1");curl_exec($c);'
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    [New Thread 0x7fffe7676700 (LWP 12846)]
    [Thread 0x7fffe7676700 (LWP 12846) exited]
    [{"traceId":"993eadb0d8dad3fa","name":"php_curl","version":"php-4","id":"9a62332b17f96ad3","parentId":"885500d93341be44","timestamp":1521723157392157,"duration":31502,"annotations":[{"value":"cs","timestamp":1521723157392157,"endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}},{"value":"cr","timestamp":1521723157423659,"endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}}],"binaryAnnotations":[{"key":"http.url","value":"http:\/\/localhost:1\/","endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}},{"key":"error","value":"Failed to connect to localhost port 1: Connection refused","endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}}]},{"traceId":"993eadb0d8dad3fa","name":"cli","version":"php-4","id":"885500d93341be44","timestamp":1521723157391992,"duration":31749,"annotations":[{"value":"sr","timestamp":1521723157391992,"endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}},{"value":"ss","timestamp":1521723157423741,"endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}}],"binaryAnnotations":[{"key":"path","value":"Standard input code","endpoint":{"serviceName":"default","ipv4":"10.19.0.6"}}]}]
    
    Program received signal SIGSEGV, Segmentation fault.
    0x00005555557d5d50 in zend_function_dtor ()
    (gdb) where
    #0  0x00005555557d5d50 in zend_function_dtor ()
    #1  0x00005555557f225b in zend_hash_str_del ()
    #2  0x00007fffe5bcb444 in molten_clear_reload_function () at /root/Molten/molten.c:234
    #3  zm_shutdown_molten (type=<optimized out>, module_number=<optimized out>) at /root/Molten/molten.c:623
    #4  0x00005555557e8433 in ?? ()
    #5  0x00005555557e007c in ?? ()
    #6  0x00005555557f3208 in zend_hash_graceful_reverse_destroy ()
    #7  0x00005555557e1ace in ?? ()
    #8  0x0000555555780a9b in php_module_shutdown ()
    #9  0x00005555556420b5 in ?? ()
    #10 0x00007ffff5fe5f45 in __libc_start_main (main=0x555555641d00, argc=13, argv=0x7fffffffe5c8, init=<optimized out>, fini=<optimized out>, 
        rtld_fini=<optimized out>, stack_end=0x7fffffffe5b8) at libc-start.c:287
    #11 0x0000555555642273 in _start ()
    
    

    Looks like https://github.com/chuan-yun/Molten/blob/master/molten.c#L216 tryies to restore overloaded function which is no longer there ....

    13:18:35 INFO   /root/Molten/molten.c:585: molten start
    13:18:35 INFO   /root/Molten/molten_log.c:31: [sink][http] http data sender, post_uri:
    13:18:35 INFO   /root/Molten/molten_log.c:184: [sink] has libcurl
    13:18:35 INFO   /root/Molten/molten_log.c:200: [sink] current select sink_type:4, input type4
    13:18:35 INFO   /root/Molten/molten.c:656: molten request init
    113:18:35 INFO   /root/Molten/molten.c:700: molten request shutdown
    13:18:35 INFO   /root/Molten/molten_log.c:477: [sink] mo log flush 
    13:18:35 INFO   /root/Molten/molten_log.c:526: [sink] mo log flush detail size:473
    13:18:35 INFO   /root/Molten/molten_log.c:428: [sink] mo log write sink_type [4]
    13:18:35 INFO   /root/Molten/molten_log.c:31: [sink][http] http data sender, post_uri:http://127.0.0.1:9411/api/v1/spans
    13:18:35 INFO   /root/Molten/molten_log.c:47:  curl request code:0
    Segmentation fault (core dumped)
    (gdb) bt
    #0  0x00005555557d5d50 in zend_function_dtor ()
    #1  0x00005555557f225b in zend_hash_str_del ()
    #2  0x00007fffe5bcb444 in molten_clear_reload_function () at /root/Molten/molten.c:234
    #3  zm_shutdown_molten (type=<optimized out>, module_number=<optimized out>) at /root/Molten/molten.c:623
    #4  0x00005555557e8433 in ?? ()
    #5  0x00005555557e007c in ?? ()
    #6  0x00005555557f3208 in zend_hash_graceful_reverse_destroy ()
    #7  0x00005555557e1ace in ?? ()
    #8  0x0000555555780a9b in php_module_shutdown ()
    #9  0x00005555556420b5 in ?? ()
    #10 0x00007ffff5fe5f45 in __libc_start_main (main=0x555555641d00, argc=17, argv=0x7fffffffe578, init=<optimized out>, fini=<optimized out>, 
        rtld_fini=<optimized out>, stack_end=0x7fffffffe568) at libc-start.c:287
    (gdb) frame 2
    #2  0x00007fffe5bcb444 in molten_clear_reload_function () at /root/Molten/molten.c:234
    234	              zend_hash_str_del(CG(function_table), p->save_func, strlen(p->save_func)); 
    (gdb) print p
    $1 = (const mo_reload_def *) 0x7fffe5ddb530 <prd+48>
    (gdb) print p->save_func
    $3 = 0x7fffe5bd7578 "origin_molten_curl_setopt_array"
    (gdb) print p->orig_func
    $4 = 0x7fffe5bd74e9 "curl_setopt_array"
    (gdb) print p->over_func
    $5 = 0x7fffe5bd74e2 "molten_curl_setopt_array"
    
    
    opened by dz0ny 5
  • 编译不了,报错

    编译不了,报错

    环境: vagrant&ubuntu14.04 & php5.6.29

    错误信息: In file included from /home/vagrant/Molten/molten_intercept.c:18:0: /usr/local/webserver/php5629/include/php/ext/mysqli/php_mysqli_structs.h:63:23: fatal error: my_global.h: No such file or directory

    bug 
    opened by Leon2012 5
  • php74 不支持

    php74 不支持

    hp_pcre_match_impl(cache, subject, strlen(subject), result, subpats, 0, 0, 0, 0 TSRMLS_CC); ^~~~~~~ In file included from /usr/src/php/ext/molten/molten_intercept.h:38, from /usr/src/php/ext/molten/molten_intercept.c:16: /usr/local/include/php/ext/pcre/php_pcre.h:45:70: note: expected 'zend_string *' {aka 'struct _zend_string *'} but argument is of type 'char *' PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, ~~~~~~~~~~~~~^~~~~~~~~~~ /usr/src/php/ext/molten/molten_intercept.c:338:45: warning: passing argument 3 of 'php_pcre_match_impl' makes pointer from integer without a cast [-Wint-conversion] php_pcre_match_impl(cache, subject, strlen(subject), result, subpats, 0, 0, 0, 0 TSRMLS_CC); ^~~~~~~~~~~~~~~ In file included from /usr/src/php/ext/molten/molten_intercept.h:38, from /usr/src/php/ext/molten/molten_intercept.c:16: /usr/local/include/php/ext/pcre/php_pcre.h:45:89: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'size_t' {aka 'long unsigned int'} PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, ~~~~~~^~~~~~~~~~~~ /usr/src/php/ext/molten/molten_intercept.c:338:70: warning: passing argument 5 of 'php_pcre_match_impl' makes integer from pointer without a cast [-Wint-conversion] php_pcre_match_impl(cache, subject, strlen(subject), result, subpats, 0, 0, 0, 0 TSRMLS_CC); ^~~~~~~ In file included from /usr/src/php/ext/molten/molten_intercept.h:38, from /usr/src/php/ext/molten/molten_intercept.c:16: /usr/local/include/php/ext/pcre/php_pcre.h:46:21: note: expected 'int' but argument is of type 'zval *' {aka 'struct _zval_struct *'} zval *subpats, int global, int use_flags, zend_long flags, zend_off_t start_offset); ~~~~^~~~~~ /usr/src/php/ext/molten/molten_intercept.c:338:9: error: too many arguments to function 'php_pcre_match_impl' php_pcre_match_impl(cache, subject, strlen(subject), result, subpats, 0, 0, 0, 0 TSRMLS_CC); ^~~~~~~~~~~~~~~~~~~ In file included from /usr/src/php/ext/molten/molten_intercept.h:38, from /usr/src/php/ext/molten/molten_intercept.c:16: /usr/local/include/php/ext/pcre/php_pcre.h:45:14: note: declared here PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, ^~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/molten/molten_intercept.c: In function 'mongodb_record': /usr/src/php/ext/molten/molten_intercept.c:1174:29: warning: implicit declaration of function 'Z_OBJDEBUG_P'; did you mean 'Z_OBJCE_P'? [-Wimplicit-function-declaration] HashTable *debug_hash = Z_OBJDEBUG_P(obj, is_temp); ^~~~~~~~~~~~ Z_OBJCE_P /usr/src/php/ext/molten/molten_intercept.c:1174:29: warning: initialization of 'HashTable *' {aka 'struct _zend_array *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] /usr/src/php/ext/molten/molten_intercept.c: In function 'mongodb_server_record': /usr/src/php/ext/molten/molten_intercept.c:1211:29: warning: initialization of 'HashTable *' {aka 'struct _zend_array *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] HashTable *debug_hash = Z_OBJDEBUG_P(obj, is_temp); ^~~~~~~~~~~~ /usr/src/php/ext/molten/molten_intercept.c: In function 'es_request_record': /usr/src/php/ext/molten/molten_intercept.c:1345:94: warning: passing argument 6 of 'pit->psb->span_add_ba' from incompatible pointer type [-Wincompatible-pointer-types] pit->psb->span_add_ba(span, "sa", "true", frame->exit_time, "es", url->host, url->port, BA_SA); ~~~^~~~~~ /usr/src/php/ext/molten/molten_intercept.c:1345:94: note: expected 'char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'} /usr/src/php/ext/molten/molten_intercept.c: In function 'convert_args_to_string': /usr/src/php/ext/molten/molten_intercept.c:101:14: warning: 'strncat' specified bound 1 equals source length [-Wstringop-overflow=] string = strncat(string, " ", 1); ^~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/molten/molten_intercept.c:117:22: warning: 'strncat' specified bound 1 equals source length [-Wstringop-overflow=] string = strncat(string, ",", 1); ^~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/molten/molten_intercept.c:124:18: warning: 'strncat' specified bound 3 equals source length [-Wstringop-overflow=] string = strncat(string, ARGS_ELLIPSIS, ARGS_ELLIPSIS_LEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    opened by lijiefeng-lee 0
  • feat: Make sink_http_uri settable in php

    feat: Make sink_http_uri settable in php

    0x00 Purpose

    When we have multi environment, such as Development or Production, we want to use different jaeger/zipkin for tracing, so this feature will let you make it!

    0x01 Usage

    ini_set('molten.sink_http_uri', 'http://127.0.0.1:9411/api/v1/spans')
    

    0x02 Example

    php -d extension=molten.so -d molten.enable=1 -d molten.open_report=1 -d molten.span_format="zipkin" -d molten.sink_type=4 -d molten.tracing_cli=1 -d molten.sampling_rate=1 -r 'ini_set("molten.service_name", "this_is_my_service");ini_set("molten.sink_http_uri", "http://127.0.0.1:9411/api/v1/spans");$c=curl_init("http://localhost:12345");curl_exec($c);'
    
    opened by toby1991 0
  • mac os 10.13.6 编译安装make 报错  unknown type name 'ulong'

    mac os 10.13.6 编译安装make 报错 unknown type name 'ulong'

    ./php7_wrapper.h:285:58: error: unknown type name 'ulong' static inline int mo_zend_hash_index_find(HashTable *ht, ulong h, void **v) ^ ./php7_wrapper.h:296:63: error: unknown type name 'ulong' static inline int mo_zend_hash_index_zval_find(HashTable *ht, ulong h, void **v) ^ ./php7_wrapper.h:341:60: error: unknown type name 'ulong' static inline int mo_zend_hash_index_update(HashTable *ht, ulong h, voi... ^ ./php7_wrapper.h:366:57: error: unknown type name 'ulong' static inline int mo_zend_hash_index_del(HashTable *ht, ulong h) ^ /Users/hanxiaotong/Desktop/Molten-master/molten.c:179:88: error: use of undeclared identifier 'HASH_FLAG_PERSISTENT' ...origin_curl_setopt = pemalloc(sizeof(zend_internal_function), HASH_FLAG... ^ /Users/hanxiaotong/Desktop/Molten-master/molten.c:182:86: error: use of undeclared identifier 'HASH_FLAG_PERSISTENT' ...origin_curl_exec = pemalloc(sizeof(zend_internal_function), HASH_FLAG_P... ^ /Users/hanxiaotong/Desktop/Molten-master/molten.c:185:94: error: use of undeclared identifier 'HASH_FLAG_PERSISTENT' ...= pemalloc(sizeof(zend_internal_function) , HASH_FLAG_PERSISTENT); ^ /Users/hanxiaotong/Desktop/Molten-master/molten.c:188:86: error: use of undeclared identifier 'HASH_FLAG_PERSISTENT' ...origin_curl_reset = pemalloc(sizeof(zend_internal_function), HASH_FLAG_P... ^ 8 errors generated. make: *** [molten.lo] Error 1

    opened by David-lavida 1
Owner
ChuanYun
ChuanYun
MOP is a php query handling and manipulation library providing easy and reliable way to manipulate query and get result in a fastest way

Mysql Optimizer mysql optimizer also known as MOP is a php query handling and manipulation library providing easy and reliable way to manipulate query

null 2 Nov 20, 2021
This project is very diverse and based upon many languages and libraries such as C++, Python, JavaScript, PHP and MQTT

ADMS-Real-time-project This project is very diverse and based upon many languages and libraries such as C++, Python, JavaScript, PHP and MQTT Advance_

Nitya parikh 1 Dec 1, 2021
Php-gamer - A repo with PHP 8.1, Swoole and Laminas. And of course, Docker in the front.

PHP-Gamer Instructions for run this app: First time $ git clone [email protected]:fatorx/php-gamer.git $ cd php-gamer $ chmod +x docker-build.sh $ chmod

Fabio de Souza 6 Oct 6, 2022
php-vips is a binding for libvips 8.7 and later that runs on PHP 7.4 and later

PHP binding for libvips php-vips is a binding for libvips 8.7 and later that runs on PHP 7.4 and later. libvips is fast and needs little memory. The v

libvips 411 Jan 8, 2023
Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion.

Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.

Łukasz Lach 112 Nov 24, 2022
YesilCMS is based on BlizzCMS and specifically adapted for VMaNGOS Core and includes new features and many bug fixes.

YesilCMS · YesilCMS is based on BlizzCMS and specifically adapted for VMaNGOS Core and includes new features and many bug fixes. Features In addition

yesilmen 12 Jan 4, 2023
WPForms coding standards are based on the WordPress Coding Standards and the PHPCompatibility Coding Standards and help create strict and high-quality code.

WPForms coding standards are based on the WordPress Coding Standards and the PHPCompatibility Coding Standards and help create strict and high-quality code.

Awesome Motive, Inc. 7 Nov 29, 2022
A redacted PHP port of Underscore.js with additional functions and goodies – Available for Composer and Laravel

Underscore.php The PHP manipulation toolbelt First off : Underscore.php is not a PHP port of Underscore.js (well ok I mean it was at first). It's does

Emma Fabre 1.1k Dec 11, 2022
:date: The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects

sabre/vobject The VObject library allows you to easily parse and manipulate iCalendar and vCard objects using PHP. The goal of the VObject library is

sabre.io 532 Dec 25, 2022
Allows generate class files parse from json and map json to php object, including multi-level and complex objects;

nixihz/php-object Allows generate class files parse from json and map json to php object, including multi-level and complex objects; Installation You

zhixin 2 Sep 9, 2022
PeachPie - the PHP compiler and runtime for .NET and .NET Core

PeachPie Compiler The open-source PHP compiler to .NET If you run into any inconsistencies, bugs or incompatibilities, kindly let us know and we'll do

PeachPie Compiler Platform 2.1k Dec 22, 2022
This project backports features found in the latest PHP versions and provides compatibility layers for some extensions and functions

This project backports features found in the latest PHP versions and provides compatibility layers for some extensions and functions. It is intended to be used when portability across PHP versions and extensions is desired.

Symfony 2.2k Dec 29, 2022
JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

Eboubaker Eboubaker 2 Jul 31, 2022
A PHP spreadsheet reader (Excel XLS and XLSX, OpenOffice ODS, and variously separated text files) with a singular goal of getting the data out, efficiently

spreadsheet-reader is a PHP spreadsheet reader that differs from others in that the main goal for it was efficient data extraction that could handle l

Nuovo 666 Dec 24, 2022
This is the US hardened version of PHP-Nuke Titanium and is secure and safe

This is the US hardened version of PHP-Nuke Titanium and is secure and safe. Built on PHP Version 7.4.30 - Forums - Blogs - Projects - Advanced Site Map - Web Links - Groups - Advanced Theme Support - Downloads - Advertising - Network Advertising - Link Back System - FAQ - Bookmark Vault - Private Virtual Cemetery - Loan Amortization - Image Hosting

Ernest Allen Buffington (The Ghost) 12 Dec 25, 2022
Cadre is a free and open-source PHP staff management system that is built on Bootstrap and Core Boxx.

CADRE Cadre is a free and open-source PHP Staff Management System. Not the best in the world, but this simple portal has the basic features to help sm

Code Boxx 3 Sep 26, 2022
Dobren Dragojević 6 Jun 11, 2023
Backwards compatibility Extension and Library for PHP 8.x and later

colopl_bc Provides various compatibility functions required for PHP (temporary) migration. WARNING This extension is intended for temporary use only.

COLOPL,Inc. 10 Jun 13, 2023
A PHP 5.3+ and PHP 7.3 framework for OpenGraph Protocol

Opengraph Test with Atoum cd Opengraph/ curl -s https://getcomposer.org/installer | php php composer.phar install --dev ./vendor/atoum/atoum/bin/atoum

Axel Etcheverry 89 Dec 27, 2022