Ampache on RPi zero w

Hi,

I have dietpi installed on raspberry pi zero w
I installed Ampache from dietpi-software
my pi has static ip 192.168.2.50
when i open the page 192.168.2.50/ampache it says

Error
You may have reached this page because Ampache was unable to load the required dependencies
Please visit the wiki for help

looking at the ampache wiki i found the following
"Attention: Composer version 2.x is not compatible to Ampache. Take care to use the latest 1.x version."

when i checked composer version in my rpi it says V2.0.8

also during installation of ampache i noticed some warnings/issues like “composer plugins not compatible”, i dont exactly remember them.

i tried to downgrade composer from V2.0.8 to V1.10.19, but when i reinstall ampache it updates composer to V2.0.8

Can anyone help me installing Ampache…
Thanks in advance…

Note: i also have pihole running on the same rpi zero w

update:

reinstalled Ampache using below command
dietpi-software reinstall 40

attached log file
log.txt (11.3 KB)

Hi,

many thanks for your message. Indeed the issue is with the Composer version. Following is stated on ampache wiki

Composer
Since 3.8.1, Composer is used to manage dependencies. You should download it and install it (e.g: mv composer.phar /usr/local/bin/composer), then run composer install --prefer-source --no-interaction on Ampache directory. Attention: > Composer version 2.x is not compatible to Ampache. Take care to use the latest 1.x version.

Let me check with the developer on this how to mitigate.

for reference, pull request created DietPi-Software | Ampache - change Composer by Joulinar · Pull Request #3956 · MichaIng/DietPi · GitHub

Did you do the apt update && apt upgrade?

Hi WarHawk,

dietpi is already doing that every time I install any software through dietpi-software.

I installed and reinstalled Ampache through dietpi-software.

Hi Joulinar,

Thanks for confirming the bug.
Do I have to wait till v6.34 is released or is there a workaround.

kk345
You could hack dietpi-software yourself. it’s not that complicated. Basicaly that’s the lines to be replaced

https://github.com/MichaIng/DietPi/pull/3956/files

Hi,

Now I am able to install ampache without any issues.
Opening 192.168.2.50/ampache it asked for update from webpage and I did it. Then i was greeted with login page and able to login. Now I have 2 issues

After login I am able play play music add to catalog. But I always see a banner saying

Your Ampache config file is out of date!
Download a new config file to manually update | Write a new config file directly to disk

After clicking “write a new config file directly to disk” does nothing, it still shows the same. Did a reboot. Logged in and I still see

Your Ampache config file is out of date!
Download a new config file to manually update | Write a new config file directly to disk

Am I missing something?
I checked /var/www/ampache/config/ampache.cfg.php and its available.

As per system settings in webpage Subsonic backend is enabled but I am unable to use subsonic clients (I tried subsonic and ultrasonic apps from fdroid)

I am a novice to Linux and webservers. I checked ampache wiki too.

Thanks in advance

ah ok I see there is an issue with file permissions. Thx for reporting. Pls do following

chown -R www-data:www-data /var/www/ampache/

To be on safe side, restart your system afterwards. Now you should be able to update the configuration file from the Gui

After changing file permissions and rebooting I am able to Write a new config file directly to disk from GUI, but still cant access from subsonic clients.

Checked 192.168.2.50/ampache/test.php
“Configuration file readability warning: This test attempts to read config/ampache.cfg.php. If this fails the file is either not in the correct location, or not readable.
If you are installing Ampache for the first time you can ignore this warning and proceed to the installer. Web Installation.”

Did a reboot and again checked 192.168.2.50/ampache/test.php still says “Configuration file readability warning.”

strange, where do you have that error message?

Did a clean install of dietpi and pihole.
Modified dietpi-software for composer, installed ampache. Then permission by
chown -R www-data:www-data /var/www/ampache/

Checked ampache settings and by default subsonic backend is enabeled in ampache. But still unable to connect from subsonic clients from android.

Ampache test page gives a warning on config file readability.


Am I missing anything…

well the warning is in green. I did a test, removed permission on the file and warning becomes red. Honestly not sure what a green warning means.

Ok i am giving up on ampacbe as I am unable to configure it to use with subsonic clients and upnp.

Thanks for the help Mr. Joulinar.

Now I am trying different media servers…

Installed jellyfin from dietpi-software. Cannot connect to
http://192.168.1.100:8096/
Do I need to configure it…
I am running pihole on same rpi0w

Edit:

Just found jellyfin for ARMv6
https://dietpi.com/forum/t/raspberry-pi-1-b-model-issues-with-media/4616/1

Yes, Jellifin will be fixed on upcoming release 6.34 (already in beta)

jellyfin failed to start
again came back to ampache…
can anyone help me change lighttpd as per ampache wiki

As per ampache wiki

  1. https://github.com/ampache/ampache/wiki/Installation
    Lighttpd:
$HTTP["host"] == "example.com" {
    server.document-root = "/srv/http/vhosts/example.com/public/"
    url.rewrite-if-not-file += (
        "^/(.*)\.(css|js|jpg|png|gif)$" => "$0",
        "^/rest/(.+)\.view$" => "/rest/index.php?ssaction=$1",
        "^/rest/fake/(.+)$" => "/play/$1",
        "^/play/art/([^/]+)/([^/]+)/([0-9]+)/thumb([0-9]*)\.([a-z]+)$" => "/image.php?object_type=$2&object_id=$3&auth=$1&thumb=$4&name=art.jpg",
        "^/play/([^/]+)/([^/]+)/([^/]+)/([^/]+)(/.*)?$" => "/play/$5?$1=$2&$3=$4",
        "^/play/([^/]+)/([^/]+)(/.*)?$" => "/play/$3?$1=$2",
        "^/play(/[^/]+|[^/]+/|/?)$" => "/play/index.php",
        "^/channel/([0-9]+)/(.*)$" => "/channel/index.php?channel=$1&target=$2"
    )
}
  1. https://github.com/ampache/ampache/wiki/API
    For lighttpd following lines need to be added:
url.rewrite-if-not-file += (
  "^/rest/(([^\?]+)\.view)(\?(.*))?" => "/rest/index.php?ssaction=$2&$4",
  "^/play/ssid/([^/]+)/type/([^/]+)/oid/([^/]+)/uid/([^/]+)/client/([^/]+)/noscrobble/([^/]+)/bitrate/([^/]+)/player/([^/]+)/name/([^/]+)(/.*)?$" => "/play/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&bitrate=$7&player=$8&name=$9"
)

Can i just add the above 2 codes to lighttpd.config at the end of file… do i need to change anything…
The wiki says if opening http://localhost/ampache/rest/ping.view gives below o/p then subsonic clients can be used. i tried to open 192.168.1.100/ampache/rest/ping.view but is not reachable.

<subsonic-response version="1.10.1" status="failed">
    <error code="10" message="Required parameter is missing."/>
</subsonic-response>

To enable UPnP/DLNA:
url rewriting is enabled in settings. But i think point 1 & 2 needs to be implemented for url rewriting.

Also wiki says, If your installation is within a subfolder ‘/ampache’ you must take care for your Rewrite Rules within ‘[ampachepath]/play/.htaccess’…

Thanks in advance

I guess a RPi zero w is armv6l as well.

Currently there is an issue on jellyfin site pulling incorrect executable https://dietpi.com/forum/t/raspberry-pi-1-b-model-issues-with-media/4616/22

Thanks for that. Could you guys help with ampache and lighttpd config. My above post has all details.