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

PHP5.6 Fatal Error on line 1314 #7

Closed
GizmoV opened this issue Dec 21, 2017 · 5 comments
Closed

PHP5.6 Fatal Error on line 1314 #7

GizmoV opened this issue Dec 21, 2017 · 5 comments

Comments

@GizmoV
Copy link

GizmoV commented Dec 21, 2017

NGINX:

2017/12/22 00:17:17 [error] 2989#0: *1 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '80.81' (T_DNUMBER) in /var/www/html/index.php(1314) : regexp code on line 1
PHP message: PHP Fatal error: preg_replace(): Failed evaluating code:
" ".link_command("bgp", "neighbors+"80.81.192.6"+routes+all", "Import").": " in /var/www/html/index.php on line 1314" while reading upstream, client: 10.22.15.2, server: lg.cln.net, request: "GET /?router=Jun0-MR&protocol=ipv4&command=bgp&query=neighbors+80.81.192.6 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "lg.cln.net", referrer: "http://lg.cln.net/?command=summary&protocol=ipv4&query=&router=Jun0-MR"

Apache:

[Thu Dec 21 23:42:44.648685 2017] [:error] [pid 583] [client 10.22.15.2:49342] PHP Parse error: syntax error, unexpected '78.25' (T_DNUMBER) in /var/www/html/index.php(1314) : regexp code on line 1, referer: http://lg.cln.net/?command=summary&protocol=ipv4&query=&router=Jun0-MR
[Thu Dec 21 23:42:44.648751 2017] [:error] [pid 583] [client 10.22.15.2:49342] PHP Fatal error: preg_replace(): Failed evaluating code: \n" ".link_command("bgp", "neighbors+"78.25.75.133"+routes+all", "Import").": " in /var/www/html/index.php on line 1314, referer: http://lg.cln.net/?command=summary&protocol=ipv4&query=&router=Jun0-MR

@justkeepquiet
Copy link
Member

Hi,

What version of PHP?

@GizmoV
Copy link
Author

GizmoV commented Dec 22, 2017

5.6.30

@GizmoV GizmoV changed the title PHP5 Fatal Error on line 1314 PHP5.6 Fatal Error on line 1314 Dec 22, 2017
@justkeepquiet
Copy link
Member

By the link in your log the command is executed. Probably, the error is related to parsing output. I will try to rewrite the code in the near future with preg_replace_callback, this will probably solve the problem.

We tested the code on php 5.4.16 on our lg server, there was no error.

@GizmoV
Copy link
Author

GizmoV commented Dec 22, 2017

Thank you for your work! I look forward to the hotfix.
This script is very useful by transit telecom operators.

@justkeepquiet
Copy link
Member

Please check #6

scamp pushed a commit to scamp/lg that referenced this issue Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants