[Tickets #14237] Test tmpdir in test.php
noreply at bugs.horde.org
noreply at bugs.horde.org
Tue Feb 2 09:27:03 UTC 2016
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/14237
------------------------------------------------------------------------------
Ticket | 14237
Created By | skhorde at smail.inf.fh-bonn-rhein-sieg.de
Summary | Test tmpdir in test.php
Queue | Horde Base
Version | 5.2.8
Type | Enhancement
State | New
Priority | 1. Low
Milestone |
Patch | 1
Owners |
------------------------------------------------------------------------------
skhorde at smail.inf.fh-bonn-rhein-sieg.de (2016-02-02 09:27) wrote:
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'));
More information about the bugs
mailing list