diff --git a/htdocs/manageFilesFolders.php b/htdocs/manageFilesFolders.php index 5fd3ca310..4f8d6c59f 100755 --- a/htdocs/manageFilesFolders.php +++ b/htdocs/manageFilesFolders.php @@ -63,14 +63,14 @@ */ if ($_POST['ACTION'] == "fileUpload") { /* - * I spent 3 hours trying to find out why when I upload multiples file $_FILES return empty, - * I did noticed it was only when I select files that exceed 3m so I thought it was something - * related to the MAX_UPLOAD_SIZE that for my surprice came as default as 20m which was very - * confusing. Later I discovery the problem was in the POST_MAX_SIZE been 3m, so it happen - * that not only MAX_UPLOAD_SIZE is responsible and that is why I'd like to know there is no + * I spent 3 hours trying to find out why when I upload multiples file $_FILES return empty, + * I did noticed it was only when I select files that exceed 3m so I thought it was something + * related to the MAX_UPLOAD_SIZE that for my surprice came as default as 20m which was very + * confusing. Later I discovery the problem was in the POST_MAX_SIZE been 3m, so it happen + * that not only MAX_UPLOAD_SIZE is responsible and that is why I'd like to know there is no * error message that shows the cause. - */ - + */ + $uFiles = getFiles(); //print "
"; print_r($uFiles); print "
"; //??? // are there any files? @@ -82,7 +82,7 @@ if (count($uFiles['ufile']) == 0) { // if 0 there are no files $messageWarning .= "

No files were uploaded.

"; - } + } /* * let's start building the path to move the files to * as a relative path. @@ -112,7 +112,7 @@ if(!file_exists($Audio_Folders_Path . "/" . $moveFolder)) { // no, so create the folder $exec = 'mkdir "' . $moveFolder . '"; chown -R pi:www-data "' . $moveFolder . '"; sudo chmod -R 777 "' . $moveFolder . '"'; - exec($exec); + exec($exec); $messageAction .= "Will create new folder and move files to: '" . $moveFolder . "'"; } else { // folder exists already :( @@ -126,7 +126,7 @@ if(realpath($moveFolder) == realpath($Audio_Folders_Path)) { $messageWarning .= $lang['manageFilesFoldersErrorNoNewFolder']; } - + // if no error message if ($messageWarning == "") { // move files to folder @@ -161,12 +161,12 @@ if($messageWarning == "") { /* * create folder - */ + */ $exec = 'mkdir "'.$Audio_Folders_Path.'/'.$newDirPathRel.'"; sudo chmod -R 777 "'.$Audio_Folders_Path.'/'.$newDirPathRel.'"; chown -R pi:www-data "' . $Audio_Folders_Path.'/'.$newDirPathRel . '"'; exec($exec); $messageSuccess = "

".$lang['manageFilesFoldersSuccessNewFolder']." '".$newDirPathRel."'

"; - - + + } } @@ -278,13 +278,6 @@ } } - // check if we can preselect an audiofolder if NOT a foldername was posted - if (!isset($fpost['folder'])) { - if (array_key_exists($fpost['cardID'], $shortcuts)) { - $fpost['folder'] = $shortcuts[$fpost['cardID']]; - } - } - // go through all folders foreach ($audiofolders as $keyfolder => $audiofolder) { @@ -340,19 +333,19 @@ class="form-control input-md" type="text"> -
+
- +
- +
- +
- +
@@ -368,16 +361,16 @@ class="form-control input-md" type="text"> print " selected=selected"; } print ">".$audiofolder."\n"; - + } ?> - +
- +
- +
diff --git a/misc/sampleconfigs/lighttpd.conf.buster-default.sample b/misc/sampleconfigs/lighttpd.conf.buster-default.sample index a5a0f8c9a..534fba3fb 100755 --- a/misc/sampleconfigs/lighttpd.conf.buster-default.sample +++ b/misc/sampleconfigs/lighttpd.conf.buster-default.sample @@ -35,8 +35,8 @@ index-file.names = ( "index.php", "index.html" ) url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) -compress.cache-dir = "/var/cache/lighttpd/compress/" -compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" ) +deflate.cache-dir = "/var/cache/lighttpd/compress/" +deflate.mimetypes = ( "application/javascript", "text/css", "text/html", "text/plain" ) # default listening port for IPv6 falls back to the IPv4 port include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port @@ -45,7 +45,7 @@ include "/etc/lighttpd/conf-enabled/*.conf" #server.compat-module-load = "disable" server.modules += ( - "mod_compress", + "mod_deflate", "mod_dirlisting", "mod_staticfile", ) diff --git a/scripts/installscripts/install-jukebox.sh b/scripts/installscripts/install-jukebox.sh index 9ce101dbb..54da685e3 100644 --- a/scripts/installscripts/install-jukebox.sh +++ b/scripts/installscripts/install-jukebox.sh @@ -826,6 +826,8 @@ web_server_config() { local sudoers="/etc/sudoers" echo "Configuring web server..." + # make sure lighttp can access the home directory of the user + sudo chmod o+x ${HOME_DIR} # Web server configuration settings # -rw-r--r-- 1 root root 1040 Apr 30 09:19 /etc/lighttpd/lighttpd.conf sudo cp "${jukebox_dir}"/misc/sampleconfigs/lighttpd.conf.buster-default.sample "${lighthttpd_conf}"