6.0.0-beta1
11/6/25

[#14237] Test tmpdir in test.php
Summary Test tmpdir in test.php
Queue Horde Base
Queue Version 5.2.8
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de
Created 02/02/2016 (3565 days ago)
Due
Updated 10/20/2017 (2939 days ago)
Assigned
Resolved 02/11/2016 (3556 days ago)
Milestone 5.2.10
Patch Yes

History
10/20/2017 08:33:48 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit c3e8ad168fcc516bc0a7598bc6752042df18e404
Author: Jan Schneider <jan@horde.org>
Date:   Thu, 11 Feb 2016 15:48:45 +0100

[jan] Check if temporary directory is writable 
(skhorde@smail.inf.fh-bonn-rhein-sieg.de, Request #14237).

  M docs/CHANGES
  M lib/Test.php
  M package.xml

https://github.com/horde/base/commit/c3e8ad168fcc516bc0a7598bc6752042df18e404
02/12/2016 10:42:17 AM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 376f8c1c2da4adb410471ccf207ffb37ca310da5
Author: Jan Schneider <jan@horde.org>
Date:   Thu Feb 11 15:48:45 2016 +0100

     [jan] Check if temporary directory is writable 
(skhorde@smail.inf.fh-bonn-rhein-sieg.de, Request #14237).

  horde/lib/Test.php |   11 +++++++++++
  horde/package.xml  |   19 +++++++++++++++++--
  2 files changed, 28 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/376f8c1c2da4adb410471ccf207ffb37ca310da5
02/11/2016 02:50:30 PM Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 5.2.10
Reply to this comment
Thanks!
02/11/2016 02:49:13 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 92a567cfaf84e00f8dbcdcd6bd9f28a992bdd802
Author: Jan Schneider <jan@horde.org>
Date:   Thu Feb 11 15:48:45 2016 +0100

     [jan] Check if temporary directory is writable 
(skhorde@smail.inf.fh-bonn-rhein-sieg.de, Request #14237).

  horde/docs/CHANGES |    2 ++
  horde/lib/Test.php |   11 +++++++++++
  horde/package.xml  |    4 ++--
  3 files changed, 15 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/92a567cfaf84e00f8dbcdcd6bd9f28a992bdd802
02/02/2016 09:27:03 AM skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Test tmpdir in test.php
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ Yes
State ⇒ New
Reply to this comment
please add a test to test.php, in order to check if Horde can write to 
the configured tmpdir, e.g.:

diff -r 196e5df19f18 var/www/horde/lib/Test.php
--- a/var/www/horde/lib/Test.php        Tue Feb 02 09:12:37 2016 +0100
+++ b/var/www/horde/lib/Test.php        Tue Feb 02 10:21:35 2016 +0100
@@ -952,6 +952,15 @@
              ? '<strong style="color:green">Yes</strong>'
              : '<strong style="color:red">No</strong><br /><strong 
style="color:orange">If caching javascript and CSS files by storing 
them in static files (HIGHLY RECOMMENDED), this directory must be 
writable as the user the web server runs as%s.</strong>';

+        /* Determine if 'tmpdir' is writable by the web user. */
+        $tmpdir = Horde::getTempDir();
+        $ret .= sprintf('<li>Is tmpdir <tt>%s</tt> writable by the 
web server user%s? ',
+                    htmlspecialchars($tmpdir),
+                    $user ? (' (' . $user['name'] . ')') : '');
+        $ret .= is_writable($tmpdir)
+            ? '<strong style="color:green">Yes</strong>'
+            : '<strong style="color:red">No</strong><br />';
+
          if (extension_loaded('imagick')) {
              $im = new Imagick();
              $imagick = is_callable(array($im, 'getIteratorIndex'));

Saved Queries