Bug 18849 - Ampache does not work out of the box
Summary: Ampache does not work out of the box
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2016-07-03 17:28 CEST by Pana Sum
Modified: 2020-06-19 12:26 CEST (History)
7 users (show)

See Also:
Source RPM: ampache-3.8.2-2.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Pana Sum 2016-07-03 17:28:02 CEST
Description of problem:

This report consists on two parts that make ampache not run out of the box. A first one is caused by an error in a path, the second one is caused by missing requirements.


FIRST ISSUE

After installing ampache, accessing to localhost/ampache in firefox returns an error. File â/etc/httpd/conf/sites.d/ampache.conf is pointing to /usr/share/ampache both in the Alias and Directory part. However, the ampache installation directory is /usr/share/ampache/ampache-3.8.2. So the installation directory should be modified, or the content of the file should be changed to the following:

# Ampache configuration

Alias /ampache /usr/share/ampache/ampache-3.8.2
<Directory /usr/share/ampache/ampache-3.8.2>
    Require all granted
</Directory>


SECOND ISSUE
After fixing the first issue, accessing to localhost/ampache in firefox goes to the ampache configuration, which shows some errors as some requirements are missing (probably new requirements of this new version).

Required:
- php-pdo-5.6.23-1.mga6.x86_64
- php-pdo_mysql-5.6.23-1.mga6.x86_64

Recommended:
- php-curl-5.6.23-1.mga6.x86_64
- php-gd-5.6.23-1.mga6.x86_64

In addition, it also recommends setting PHP max upload size to >=20: "This tests whether Ampache can upload medium files (>= 20M). This is not strictly necessary, but may result in a better experience. ". This should be done in /etc/php.ini, increasing upload_max_filesize from 16M to 20M, and post_max_size from 8M to 20M. Since this is a system-wide configuration file, I am not sure if increasing these values is OK for you.



After installing them and restarting httpd, opening in firefox localhost/ampache, ampache works, so they should be installed together with ampache.


Version-Release number of selected component (if applicable):
3.8.2

How reproducible:
Always

Steps to Reproduce:
1. Install ampache
2. Try to run it accesing to localhost/ampache in firefox
3. Fix file ampache.conf, so this first issue is fixed
4. Restart the httpd server. The first problem is fixed, but the second one appears.
Marja Van Waes 2016-07-04 07:36:50 CEST

Assignee: bugsquad => shlomif
CC: (none) => marja11

Comment 1 Diego Bello 2017-01-16 03:55:43 CET
I was going to report this same bug but luckily someone had the same issue before :)

I had the same issues, with the apache config file and later with missing dependencies.

Ampache also requires a mysql database that needs to be configured and setup but I'm not sure this is something in the scope of this package.

CC: (none) => dbello

Johnny A. Solbu 2020-03-02 16:08:13 CET

Version: Cauldron => 7
Assignee: shlomif => cooker
CC: (none) => cooker

Comment 2 Johnny A. Solbu 2020-03-02 16:09:26 CET
Fixed in cauldron.
The cauldron version doesn't build, but that is not this issue. :-)

Status: NEW => ASSIGNED

Johnny A. Solbu 2020-03-02 16:09:54 CET

Summary: Ampache 3.8.2 in mga6 sta1 does not work out of the box => Ampache does not work out of the box

Comment 3 Johnny A. Solbu 2020-06-15 15:19:55 CEST
(Gaah, I forgot to send this to the QA team. :-) )


I have uploaded a fixed version of this package.


Suggested advisory:
========================
A packaging error resulted in ampache being installed in the wrong location.
And required dependencies where not satisfied.

This updates fixes these issues.


Updated packages in 7/core/updates_testing
========================

ampache-3.8.8-3.1.mga7 (noarch package)

Source RPMS:
ampache-3.8.8-3.1.mga7

Assignee: cooker => qa-bugs

Comment 4 Len Lawrence 2020-06-16 02:00:43 CEST
mga7, x86_64
Starting with version 3.8.8-3, followed the instructions about modifying ampache.conf and was able to start ampache at localhost/ampache albeit with the expected errors - i.e. the Ampache Debug page.
The man page is inaccessible:
/usr/share/doc/ampache/man/man1/ampache.1

Updated to version 3.8.8-3.1
Restarted httpd again.
$ vi ampache.conf
....
Alias /ampache /usr/share/ampache/ampache-3.8.8
<Directory /usr/share/ampache/ampache-3.8.8>
    Require all granted
</Directory>

Pointed browser at localhost/ampache and raised an "Access forbidden!" error.
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

This may well be expected because no setting up has been done.

At a guess the update is OK.
Still no man pages though:
$ apropos ampache
ampache: nothing appropriate.
$ locate man1/ampache.1
/usr/share/ampache/docs/man/man1/ampache.1
Looks like it may be misplaced.

CC: (none) => tarazed25

Comment 5 Len Lawrence 2020-06-16 08:11:55 CEST
Made sure that with no previous installation the updated ampache would work out of the box by moving to another machine and installing the update.  Restarted apache.  Checked localhost/ampache in firefox and saw the debug page which flagged various errors.  Those were to be expected.  Continuing to the installation page reduced the errors to three:
PHP PDO extension not enabled
MySQL (no database)
ampache.cfg.php not writable

Tried to start the installation by creating a mySQL database with user ampache which simply blanked the page and hung.  Backed out and tried skip.  Blank page.
Given the limitations of my system there is no point in pushing this any further.
The overall impression is that ampache works if the background requirements are met.  Those are outside my competence.

Leaving this for a day or two.  Then, if there are no objections, shall send it on.
Comment 6 Johnny A. Solbu 2020-06-16 08:54:09 CEST
(In reply to Len Lawrence from comment #4)
> Updated to version 3.8.8-3.1
> Restarted httpd again.
> $ vi ampache.conf
> ....
> Alias /ampache /usr/share/ampache/ampache-3.8.8
> <Directory /usr/share/ampache/ampache-3.8.8>
>     Require all granted
> </Directory>
> 
> Pointed browser at localhost/ampache and raised an "Access forbidden!" error.
> You don't have permission to access the requested directory. There is either
> no index document or the directory is read-protected.
> 
> This may well be expected because no setting up has been done.

This is the error we are fixing. :-)
The installed folder on the already shipped package is
  «/usr/share/ampache/ampache-3.8.2»
whereas the apache alias points to
  «/usr/share/ampache»
In the updated package the installed folder and the apache alias matches.

This was due to a packaging error, not an error in the tarball.


> The man page is inaccessible:
> /usr/share/doc/ampache/man/man1/ampache.1

> Still no man pages though:
> $ apropos ampache
> ampache: nothing appropriate.
> $ locate man1/ampache.1
> /usr/share/ampache/docs/man/man1/ampache.1
> Looks like it may be misplaced.

I will check and fix the manpage in Cauldron.
Didn't know ampache had a manpage. :-)
Comment 7 Len Lawrence 2020-06-16 11:21:19 CEST
OK, thanks Johnny.  So we can send this on its way.

Whiteboard: (none) => MGA7-64-OK

Comment 8 Thomas Andrews 2020-06-18 03:21:36 CEST
Validating. Advisory in Comment 3.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Nicolas Lécureuil 2020-06-19 11:24:30 CEST

CC: (none) => mageia
Keywords: (none) => advisory

Comment 9 Mageia Robot 2020-06-19 12:26:36 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2020-0149.html

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.