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

getting error: Undefined variable: url #1

Open
9H1LO opened this issue Nov 21, 2017 · 2 comments
Open

getting error: Undefined variable: url #1

9H1LO opened this issue Nov 21, 2017 · 2 comments

Comments

@9H1LO
Copy link

9H1LO commented Nov 21, 2017

[Nov 21 14:17:45] debug: # [172.16.10.60] (PID=32116) Connected from port 50680
[Nov 21 14:17:45] debug: # [172.16.10.60] (PID=32116) Received => ▒▒▒{ "Address" : "0x3C0A10AC", "Channel" : 0, "Descrip" : "", "Event" : "MotionDetect", "SerialID" : "0012123bd301", "StartTime" : "2017-11-21 14:17:31", "Status" : "Start", "Type" : "Alarm" }
PuTTY[Nov 21 14:17:45] info: # [172.16.10.60] parsing 'hisilicon' message ...
[Nov 21 14:17:45] debug: # [172.16.10.60] processing actions...
[Nov 21 14:17:45] info: # [172.16.10.60] ACTION=custom_url , url = http://172.16.10.100:8081/CMD?Light_Liv_Entrance=0
[Nov 21 14:17:45] warning: [PHP Warning] Missing argument 2 for PhpCameraAlarmProcess::action_custom_url(), called in /root/cam_test/lib/process.php on line 56 and defined [l:113]
[Nov 21 14:17:45] debug: [PHP Notice] Undefined variable: url
[Nov 21 14:17:45] err: # ERR! callUrl canceled : No URL provided [l:107]
[Nov 21 14:17:45] warning: [PHP Warning] socket_shutdown(): unable to shutdown socket [107]: Transport endpoint is not connected [l:56]
[Nov 21 14:17:45] debug: # [172.16.10.60] (PID=32116) Disconnected
[Nov 21 14:17:46] debug: # [172.16.10.60] (PID=32116) Connected from port 50681
[Nov 21 14:17:46] debug: # [172.16.10.60] (PID=32116) Received => ▒▒▒{ "Address" : "0x3C0A10AC", "Channel" : 0, "Descrip" : "", "Event" : "MotionDetect", "SerialID" : "00222222222", "StartTime" : "2017-11-21 14:17:32", "Status" : "Stop", "Type" : "Alarm" }
[Nov 21 14:17:46] info: # [172.16.10.60] parsing 'hisilicon' message ...
[Nov 21 14:17:46] debug: # [172.16.10.60] process canceled : ignored 'Stop' status
[Nov 21 14:17:46] warning: [PHP Warning] socket_shutdown(): unable to shutdown socket [107]: Transport endpoint is not connected [l:56]
[Nov 21 14:17:46] debug: # [172.16.10.60] (PID=32116) Disconnected

setup config:
$cfg['cameras']['172.16.10.60']['type']= 'hisilicon';
$cfg['cameras']['172.16.10.60']['actions']['url_custom']['url'] = 'http://172.16.10.100:8081/CMD?Light_Liv_Entrance=0'; // custom URL

@9H1LO
Copy link
Author

9H1LO commented Nov 21, 2017

[Nov 21 14:29:36] debug: # [172.16.10.60] processing actions...
[Nov 21 14:29:36] info: # [172.16.10.60] ACTION=custom_url , url = http://172.16.10.100:8081/CMD?Light_Liv_Entrance=100
[Nov 21 14:29:36] warning: [PHP Warning] Missing argument 2 for PhpCameraAlarmProcess::action_custom_url(), called in /root/cam_test/lib/process.php on line 56 and defined [l:113]
[Nov 21 14:29:36] debug: [PHP Notice] Undefined variable: url
[Nov 21 14:29:36] err: # ERR! callUrl canceled : No URL provided [l:107]

@9H1LO 9H1LO changed the title getting error getting error: Undefined variable: url Nov 21, 2017
@9H1LO
Copy link
Author

9H1LO commented Nov 21, 2017

i think i fixed it....in process.php line 56: $this->action_custom_url($params['url']);
but action_custom_url has: private function action_custom_url($ip,$url){ == so it expects both parameters (even though it only seems to then use one !?)
so i changed line 56 to: $this->action_custom_url($ip,$params['url']);
and its now calling the URL

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

No branches or pull requests

1 participant