Is it possible to run PHP scripts in the camera? Now now it is.  PHP Me is a powerful and flexible tool to add specific behavior beyond the camera capabilities without ACAP development. Scripts can be triggered with a button in the user interface, URL or by a camera event (e.g. timer recurrence, digital in-port or analytics add-ons).

phpme-mainPHP Me uses the cameras built-in file upload and editcgi.cgi in order to install and edit scripts with a web browser. Note that all scripts must be uploaded to /local/administrator directory.

phpme-uploadIf the script is initiated manually,  a browser window is opened and the result is displayed. If the script is triggered by an event the script will run silent and all output is ignored. It is possible to provide arguments to the script when it is triggered by an event.


Known limitations:

  • In order to get a reasonable size of the cross-compiled version of PHP some functionality had to be excluded.  You may not be able to do everything PHP is able to offer.
  • PHP does not integrate into the web server.  This means that you cannot write stand-alone PHP CGI without PHP Me.
  • The EAP file is about 2 MB and will expand to about 6 MB during installation. This may be a limitation if you have other large add-ons installed on the camera.


  • Axis camera based on ARTPEC 4/5 or ARM
  • Camera FW 5.60 or later

(ZIP-file with EAP file and some basic PHP script examples)


    1. This kind of response is my pay check. Thank you. If you develop an interesting script that may be useful for others I would happily host it on this site.


  1. Is it possible to write this application for the ambarella based cameras? like Axis P1428-E?
    I can provide camera for testing if that is an issue. contact me if that is something you would consider.


    1. As there seems to be an interest I will see what I can do. PHP Me may not fit some of the early Ambarella cameras with limited flash. I don’t think that P1428 should cause any problems.


  2. Hi. This ACAP is my dream 🙂
    But, I tried with an Axis M2025 (FW: 6.15.2) and this ACAP is not working 😦 Do you know any bug or limitations about this camera or fw which higher than 6?
    Thanks for your answer.

    Liked by 1 person

    1. I think the problem is related to the update of OpenSSL library in the cameras in recent firmware. PHP Me is compiled for an earlier OpenSSL version.
      I will see if I can get som time to look at this and recompile PHP Me. I will then contact you off-line to help me validate. When validated I will post the updated version.


      1. Encountered the same issue. Tested it with previous version and it works.
        It should work with the version 1.0
        I guess that Acapshare still have this version.
        If not i still have it.


  3. I’m getting the error “install App: Failed” on an M3044-V on firmware

    I saw the previous comments about the possible OpenSSL library mismatch; has this been resolved?


    1. A lot has changed since I posted PHPMe as a proof-of-concept. It is no longer maintained. Today I solve integration challanges with other solutions. What is your use-case? I may have alternative solutions to suggest.


      1. The use would be to monitor a camera’s I/O, store the number of times an input is triggered as a variable, and use logic to act on that variable once it hits a threshold.


  4. Where doe the logic need to be hosted? In the camera? Once the threshold is reached, what is the action?

    Without knowing the system or limitations…why use the cameras I/O, why not use e.g. RasPi?


    1. We want to keep the logic internal to the camera, so the only device we add to the network is the camera.

      The action we want is a notification, event trigger, or virtual input for a VMS.


  5. Since you have a VMS you also have a place to host additional stuff. Why not host the logic on the same machine? Install PHP, Python or Node.JS there. Better yet, install Node-Red that will give you all the control you need with ease ( With scripting it is easy to setup an HTTP node/api that a camera action can send an HTTP notification upon I/O trigger. You do the rest with scripting. That solution will give you more control and will solve the case for multiple cameras as well.


    1. We do not know if we can add custom code to the VMS or add a Raspberry Pi. What are our options code-wise for the cameras?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s