6.0.0-git
2019-05-19

[#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 2016-02-02 (1202 days ago)
Due
Updated 2017-10-20 (576 days ago)
Assigned
Resolved 2016-02-11 (1193 days ago)
Milestone 5.2.10
Patch Yes

History
2017-10-20 20:33:48 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
2016-02-12 10:42:17 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
2016-02-11 14:50:30 Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 5.2.10
Reply to this comment
Thanks!
2016-02-11 14:49:13 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
2016-02-02 09:27:03 skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Test tmpdir in test.php
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ Yes
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