basic PHP server

  • I attempted to follow some dated forum posts for the LAMP addon and although I got close was never able to get a php server fully working. LAMP addon - Linux, Apache, MySQL PHP bundle

    The last posts of the thread suggest using docker, but im having even less success with that (i can muck around, but am no expert)

    is there a simple way to get a basic php server running on libreleec? i dont need SQL, i dont need the latest version of PHP... just a basic instance.

    Im running

    LibreELEC (official): 8.2.5 (Odroid_C2.aarch64)


  • Unrelated to my media setup i'm seeing if i can use my odroid c2 boxes running Libreelec for a small side project of mine.

    This is where my limited knowledge is made apparent; I just need the equivalent of a hello world script to run on my odroid.

  • I have a php addon at stash that has basically just the php-cgi binary that allows to run php scripts - if this is enough I have a look if I can port it to your version.

  • If its not too much trouble that would be a big help. I've tried compiling my own but it became clear pretty quickly i'm out of my league.

    Edited once, last by apeg ().

  • I'll try it this evening, but i have tried:


    i had to edit:



    1. LOCPATH=$ADDON_DIR/lib/locale exec $ADDON_DIR/bin/httpd -d "$ADDON_HOME/srvroot" -f "$ADDON_HOME/srvroot/conf/httpd.conf" -E $ADDON_HOME/httpd.log -e info


    1. LOCPATH=$ADDON_DIR/lib/locale exec httpd -d "$ADDON_HOME/srvroot" -f "$ADDON_HOME/srvroot/conf/httpd.conf" -e $ADDON_HOME/httpd.log -e info

    *notice the httpd absolute path change along with the -E -> -e option

    following i then disabled mySQL (i dont need it) but when i try and start the httpd service i get the following error:

    1. ● httpd.service - Apache Httpd Server
    2. Loaded: loaded (/storage/.kodi/addons/service.web.lamp/system.d/httpd.service; enabled; vendor preset: disabled)
    3. Active: activating (auto-restart) (Result: resources) since Thu 2018-04-19 18:54:27 UTC; 1s ago
    4. Process: 30937 ExecStart=/bin/sh -c exec sh /storage/.kodi/addons/service.web.lamp/bin/httpd.start (code=exited, status=0/SUCCESS)
    5. Apr 19 18:54:27 LibreELEC systemd[1]: Failed to start Apache Httpd Server.
    6. Apr 19 18:54:27 LibreELEC systemd[1]: httpd.service: Unit entered failed state.
    7. Apr 19 18:54:27 LibreELEC systemd[1]: httpd.service: Failed with result 'resources'.

    Unfortunately this is as close as I've got.

    Edited once, last by apeg ().

  • I'm not sure why you change anything in start scripts because they are fine according to

    1. ./httpd -h
    2. -e level : show startup errors of level (see LogLevel)
    3. -E file : log startup errors to file

    Also removing absolute path was probably bad idea.

    But as CvH wrote there are some architectures differences with those builds. Some are 32 bits, some are 64. Seems you are using 64 bit and addon above should work. Just try running httpd from command line to see if it starts. Same for php.

    Done giving support here because of last events.

  • Your right, the E->e doesn't seems to effect the result at this point. But the absolute path does.

    either way its still giving me to the same end error.

    I just tried both the packages on fresh images and i cant get them to install:

    i've also tried via command line and same result... or rather, no results

    1. kodi-send -a "InstallAddon(service.web.lamp)"

    Would trying to compile my own php binary be less/more work than attempting to troubleshoot the lamp install?

    all i really need is basic php support.


    Edited 3 times, last by apeg ().

  • this is where my lack of knowledge starts to shine through. A while back I did compile a few builds for my odroid, but this was pre libreeleec and openelec. (and very guided)

    I can’t figure out why none of these builds will install. From the UI kodi doesn’t even acknowledge I attempted to install. I select the zip file and… nothing.

    The lamp addon does significantly more than I need, I don’t even need the latest version of PHP… just basic functionality, is there no other avenue I could explore?

    Thanks again for the help so far

    Edited once, last by apeg ().

  • I still see no reason why it doesn't work for you. As I wrote did you tried running php from command line? If it doesn't then whole addon is bad.

    1. /storage/.kodi/addons/service.web.lamp/bin/php -v

    Done giving support here because of last events.

  • Well, turns out i was close...

    Just noticed that version was put up... and that did the trick perfectly!

    Thanks to whoever put that up, the least i can do is donate some beer money for the help... was that you vpeter or CvH?

    Edited 2 times, last by apeg ().

  • I did made this version at the start because you wrote this is what you are using. But if you didn't even try it.....

    Done giving support here because of last events.

  • My fault vpeter, originally CvH and i were talking about the v102 and i didn't even notice the v104 increment.

    Heck i even copied and pasted your link not even noticing it was 104.

    Either way, thanks again for the help, and thanks for releasing v104! did the trick perfectly.

  • Hello @vpeter,

    I tried on my H96 Pro+ (Amlogic S912) but all executable are not working:

    # ./httpd

    -sh: ./httpd: not found

    The architecture of my Coreelec 8.95.6 is:

    Linux vdr 3.14.29 #1 SMP Tue Dec 4 13:13:34 GMT 2018 aarch64 GNU/Linux

    and seems to fit to your binaries:

    # file httpd

    httpd: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/, for GNU/Linux 3.7.0, stripped

    What's my fault?

    Thanks a lot

  • File not found: Are you really in correct folder? Seems so.

    I'm not familiar with such error. Also no such system here to test.

    Done giving support here because of last events.