Php 将数据从aprs服务器传输到symfony数据库

Php 将数据从aprs服务器传输到symfony数据库,php,symfony,Php,Symfony,我想将symfony连接到“aprs is”服务器 我的数据由“aprs”服务器接收,我想将它们插入我在symfony条令中创建的数据库中。我的实体已经准备好了,但我不知道怎么做 我可以在“aprs”服务器上建立一个上行链接来重定向数据,但我不知道如何在两侧构建所有链接 以下是aprs is服务器archi的链接: 有关aprs上行链路的信息: $sudo netstat-anp | grep aprsc tcp 0 0 192.168.5.56:50002 0

我想将symfony连接到“aprs is”服务器

我的数据由“aprs”服务器接收,我想将它们插入我在symfony条令中创建的数据库中。我的实体已经准备好了,但我不知道怎么做

我可以在“aprs”服务器上建立一个上行链接来重定向数据,但我不知道如何在两侧构建所有链接

以下是aprs is服务器archi的链接:

有关aprs上行链路的信息: $sudo netstat-anp | grep aprsc

tcp        0      0 192.168.5.56:50002      0.0.0.0:*               LISTEN      21864/aprsc         
tcp        0      0 127.0.0.1:10151         0.0.0.0:*               LISTEN      21864/aprsc         
tcp        0      0 127.0.0.1:10151         127.0.0.1:46962         ESTABLISHED 21864/aprsc         
tcp        0      0 192.168.5.56:50002      192.168.5.54:34070      ESTABLISHED 21864/aprsc         
tcp6       0      0 :::50002                :::*                    LISTEN      21864/aprsc         
unix  3      [ ]         STREAM     CONNECTE      865809   21864/aprsc          
unix  3      [ ]         STREAM     CONNECTE      864810   21864/aprsc          
unix  3      [ ]         STREAM     CONNECTE      864811   21864/aprsc     
有关apache listener的信息
$sudo netstat-anp | grep apache2

tcp6       0      0 :::10150                :::*                    LISTEN      21582/apache2
aprs上的日志连接:

2018/07/31 14:32:49.091674 aprsc[21864:7f5c008b1700] INFO: HTTP thread ready.
2018/07/31 14:32:49.091682 aprsc[21864:7f5bfd55f700] INFO: Uplink: 1 uplinks configured, 0 are connected, need to pick new
2018/07/31 14:32:49.091688 aprsc[21864:7f5bfd55f700] DEBUG: Uplink: trying Http (127.0.0.1:10150)
2018/07/31 14:32:49.091755 aprsc[21864:7f5bfd55f700] INFO: Uplink Http: Connecting to 127.0.0.1:10150 (127.0.0.1:10150) [link 0, addr 1/1]
2018/07/31 14:32:49.091832 aprsc[21864:7f5bfd55f700] DEBUG: Uplink Http: poll after connect returned 1, revents 4
2018/07/31 14:32:49.091840 aprsc[21864:7f5bfd55f700] DEBUG: Uplink Http: successful connect
2018/07/31 14:32:49.091858 aprsc[21864:7f5bfd55f700] INFO: Uplink Http: 127.0.0.1:10150: Connection established on fd 13 using source address 127.0.0.1:58630
2018/07/31 14:32:49.091865 aprsc[21864:7f5bfd55f700] DEBUG: pass_client_to_worker: client on fd 13 to thread 0 with 0 users
2018/07/31 14:32:49.091870 aprsc[21864:7f5bfd55f700] INFO: status: setting error flag no_uplink ttl 3600
2018/07/31 14:32:49.121688 aprsc[21864:7f5c00890700] DEBUG: collect_new_clients(worker 0): closing all existing peergroup peers
2018/07/31 14:32:49.121776 aprsc[21864:7f5c00890700] DEBUG: collect_new_clients(worker 0): added fd 13 to polling list, xfd 0x7f5c00a02000    
2018/07/31 14:32:49.121795 aprsc[21864:7f5c00890700] DEBUG: Worker 0 accepted 1 new clients, 1 new connections, now total 1 clients
2018/07/31 14:32:50.989005 aprsc[21864:7f5c00890700] INFO: 127.0.0.1:10150: Uplink server software: HTTP/1.1 400 Bad Request
2018/07/31 14:32:50.989070 aprsc[21864:7f5c00890700] ERROR: 127.0.0.1:10150: Uplink's welcome message is not recognized: no # in beginning
2018/07/31 14:32:50.989098 aprsc[21864:7f5c00890700] INFO: Uplink TCP 127.0.0.1:10150 (Http) closed after 2 s: Uplink server protocol error, tx/rx 70/483 bytes 0/0 pkts, dropped 0, fd 13, worker 0
2018/07/31 14:32:50.989228 aprsc[21864:7f5c00890700] INFO: 127.0.0.1:10150: Uplink [0] has been closed: Uplink server protocol error
2018/07/31 14:32:50.989255 aprsc[21864:7f5c00890700] DEBUG: found the link to disconnect    
2018/07/31 14:32:53.096709 aprsc[21864:7f5bfd55f700] INFO: Uplink: 1 uplinks configured, 0 are connected, need to pick new
2018/07/31 14:32:53.096795 aprsc[21864:7f5bfd55f700] DEBUG: Uplink: trying Http (127.0.0.1:10150)
2018/07/31 14:32:53.096970 aprsc[21864:7f5bfd55f700] INFO: Uplink Http: Connecting to 127.0.0.1:10150 (127.0.0.1:10150) [link 0, addr 1/1]
2018/07/31 14:32:53.097139 aprsc[21864:7f5bfd55f700] DEBUG: Uplink Http: poll after connect returned 1, revents 4
2018/07/31 14:32:53.097177 aprsc[21864:7f5bfd55f700] DEBUG: Uplink Http: successful connect
2018/07/31 14:32:53.097275 aprsc[21864:7f5bfd55f700] INFO: Uplink Http: 127.0.0.1:10150: Connection established on fd 13 using source address 127.0.0.1:58632
2018/07/31 14:32:53.097305 aprsc[21864:7f5bfd55f700] DEBUG: pass_client_to_worker: client on fd 13 to thread 0 with 0 users
2018/07/31 14:32:53.097324 aprsc[21864:7f5bfd55f700] INFO: status: setting error flag no_uplink ttl 3600
2018/07/31 14:32:53.126840 aprsc[21864:7f5c00890700] DEBUG: collect_new_clients(worker 0): added fd 13 to polling list, xfd 0x7f5c00a02030
2018/07/31 14:32:53.126950 aprsc[21864:7f5c00890700] DEBUG: Worker 0 accepted 1 new clients, 1 new connections, now total 1 clients
2018/07/31 14:32:53.663743 aprsc[21864:7f5c008b1700] DEBUG: http status [127.0.0.1] request /status.json
2018/07/31 14:32:53.664754 aprsc[21864:7f5c008b1700] DEBUG: http_compress_gzip: compressed 7656 bytes to 1743 bytes: 22.8 %
2018/07/31 14:32:54.994428 aprsc[21864:7f5c00890700] INFO: 127.0.0.1:10150: Uplink server software: HTTP/1.1 400 Bad Request
$sudo服务aprsc状态 ● aprsc.service-LSB:启动和停止aprsc

已加载:已加载(/etc/init.d/aprsc;已生成;供应商预设:已启用)


我在这个问题上取得了一些进展:

所发生的是从apache发送到aprs的格式,因为aprs对响应的解释很糟糕。apache服务器发送一个响应,其标题在apache2.conf中配置为: ServerTokens将返回HTTP/1.1以及之后的apache版本(详细信息取决于Servertoken旁边的选项)

但我不知道如何将值“HTTP/1.1”更改为“#APRS”

我试图在mod_header.c中更改它,但我找到的唯一文件是mod_header.so

Active: active (running) since Tue 2018-07-31 16:32:48 CEST; 20min ago
Docs: man:systemd-sysv-generator(8)
Process: 21831 ExecStop=/etc/init.d/aprsc stop (code=exited, status=0/SUCCESS)
Process: 21844 ExecStart=/etc/init.d/aprsc start (code=exited, status=0/SUCCESS)
Tasks: 8 (limit: 4915)
CGroup: /system.slice/aprsc.service
       └─21864 /opt/aprsc/sbin/aprsc -u aprsc -t /opt/aprsc -f test -e             debug -o file -r logs -c /etc/aprsc.conf

systemd[1]: Starting LSB: start and stop aprsc...
aprsc[21844]:  * Preparing chroot for APRS-IS server: aprsc chroot
aprsc[21844]:    ...done.
aprsc[21844]:  *   Checking configuration 'aprsc'
aprsc[21844]:  * Starting APRS-IS server: aprsc
aprsc[21844]:  *   Starting 'aprsc'
aprsc[21844]:    ...done.
systemd[1]: Started LSB: start and stop aprsc.