Noob cant get alprd to work

476 views
Skip to first unread message

Axryx

unread,
Jun 17, 2016, 2:25:10 PM6/17/16
to OpenALPR
So i have everything setup for alprd.
Config file:
; This configuration file overrides the default values specified
; in /usr/share/openalpr/config/alprd.defaults.conf
[daemon]

; Declare each stream on a separate line
; each unique stream should be defined as stream = [url]



site_id = site-name

store_plates = 0
store_plates_location = /var/www/html/plates/

; upload address is the destination to POST to
upload_data = 1
country = eu



detect.php:

<?php
foreach(json_decode(file_get_contents('php://input')) as $Detect)
        {
                $Detect["uuid"];//: "e11e0acc-6aaf-4817-9299-9e6773043b8e"
                $Detect["camera_id"];//: 1,
                $Detect["site_id"];//: "watchtower-hq",
                $Detect["img_width"];//: 640,
                $Detect["img_height"];//: 480,
                $Detect["epoch_time"];//: 1402161050,
                $Detect["processing_time_ms"];//: 138.669163,
                foreach($Detect["results"] as $Plate)
                {
                        echo $Plate["plate"];
                }
        }
?>
No number plate detected.




And when i go to http://192.168.0.46/detect.php even when a numberplate is detected in console i see nothing. 
Please help i need this asap

Matt

unread,
Jun 17, 2016, 2:54:07 PM6/17/16
to OpenALPR
The daemon will POST your data to that address.  I'm not sure if that code is the right way to pull POST data...

Perhaps try starting with var_dump of the HTTP request to see if it's making it:
var_dump($_REQUEST);

You can also run wireshark or tcpdump to see the packets send between those servers just to verify that it's being sent.

-Matt
Message has been deleted

Axryx

unread,
Jun 17, 2016, 4:03:19 PM6/17/16
to OpenALPR
SO thanks for your reply but when i run
var_dump($_REQUEST);

i just get 
array(0) { }

How can i fix this
Thanks 
Gavin

Matt

unread,
Jun 17, 2016, 4:12:34 PM6/17/16
to OpenALPR
The ALPR daemon POSTs to a web server.  In your case, your PHP script would need to be running as a web server.

If you just want data from OpenALPR, you may be better off pulling from the beanstalkd queue.  it's named alprd.  Beanstalkd has client libraries in PHP:

More doc on alprd is available here:

-Matt
Reply all
Reply to author
Forward
0 new messages