Package: mlmmj-php-web-admin
Version: 1.5.2-1
Severity: important
Tags: patch

Dear Maintainer,

The Debian version of this package requires a .htaccess file to work 
correctly, this is a problem for users that aren't using Apache.

I cannot address the issue of compatibility with non-Apache servers in regard
to the necessity of using HTTP Basic Authentication to protect the admin
interface.  Someone else will have to supply a patch for that.

But the Debian-supplied .htaccess file also presents a problem for Apache users
who are not using libapache2-mod-php as is increasingly the norm.

The line: php_value include_path "/usr/share/mlmmj-php-web-admin"

Causes a fatal error when mod-php is not in-use, but the result of the line
being there is necessary to make the script work with Debian packaging.

There is however, a different way to solve this issue, which both makes the
script work with PHP-FPM or PHP-CGI, in addition to mod-php, and also with 
non-Apache Web servers. (note again this does not address the Basic Auth issue)
The admin script can be patched to provide the same functionality in PHP.

Below are two patches.  One removes the line from .htaccess that causes an
inability to start Apache when mod-php is not enabled.

The second patch alters the PHP script to do the same thing the .htaccess file
was trying to do.


--- /usr/share/mlmmj-php-web-admin/htdocs/.htaccess.orig  2025-10-11 
09:23:37.000000000 -0400
+++ /usr/share/mlmmj-php-web-admin/htdocs/.htaccess   2025-10-11 
12:42:09.154962565 -0400
@@ -2,4 +2,3 @@
 AuthType Basic
 AuthName "mlmmj web-interface on Debian GNU/Linux"
 AuthUserFile /etc/mlmmj-php-web-admin/htpasswd
-php_value include_path "/usr/share/mlmmj-php-web-admin"


--- /usr/share/mlmmj-php-web-admin/htdocs/index.php.orig        2023-06-20 
03:40:05.000000000 -0400
+++ /usr/share/mlmmj-php-web-admin/htdocs/index.php     2025-10-11 
12:25:13.906398366 -0400
@@ -27,6 +27,7 @@
  * IN THE SOFTWARE.
  */
 
+set_include_path(get_include_path().PATH_SEPARATOR."/usr/share/mlmmj-php-web-admin");
 require(dirname(dirname(__FILE__))."/conf/config.php");
 require(dirname(__FILE__)."/class.rFastTemplate.php");


-- System Information:
Debian Release: 12.12
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 
'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-37-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US (charmap=UTF-8) (ignored: LC_ALL set 
to en_US.UTF-8), LANGUAGE=en_US.UTF-8
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mlmmj-php-web-admin depends on:
ii  mlmmj         1.3.0-4
ii  php8.2 [php]  8.2.29-1~deb12u1

mlmmj-php-web-admin recommends no packages.

mlmmj-php-web-admin suggests no packages.

-- Configuration Files:

-- no debconf information

Reply via email to