[geeklog-cvs] geeklog-1.3/public_html/admin/install check.php,1.4,1.5

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Wed Aug 11 14:35:18 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html/admin/install
In directory www:/tmp/cvs-serv12817

Modified Files:
	check.php 
Log Message:
Added checks for the 'pdfs' and 'data' directories.


Index: check.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/install/check.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** check.php	17 Jun 2003 09:53:18 -0000	1.4
--- check.php	11 Aug 2004 18:35:15 -0000	1.5
***************
*** 1,3 ****
--- 1,4 ----
  <?php
+ 
  /* Reminder: always indent with 4 spaces (no tabs). */
  // +---------------------------------------------------------------------------+
***************
*** 5,12 ****
  // +---------------------------------------------------------------------------+
  // | check.php                                                                 |
- // | Geeklog check installation script                                         |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2002 by the following authors:                              |
  // |                                                                           |
  // | Authors: Dirk Haun        - dirk at haun-online.de                           |
--- 6,13 ----
  // +---------------------------------------------------------------------------+
  // | check.php                                                                 |
  // |                                                                           |
+ // | Geeklog check installation script                                         |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2002-2004 by the following authors:                         |
  // |                                                                           |
  // | Authors: Dirk Haun        - dirk at haun-online.de                           |
***************
*** 41,48 ****
  require_once ('../../lib-common.php');
  
! $numTests = 4;    // total number of tests to perform
  $successful = 0;  // number of successful tests
! $failed = 0;      // number of failed tests
! $notTested = 0;   // number of tests that were skipped (for disabled features)
  
  echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' . LB;
--- 42,49 ----
  require_once ('../../lib-common.php');
  
! $numTests   = 6;  // total number of tests to perform
  $successful = 0;  // number of successful tests
! $failed     = 0;  // number of failed tests
! $notTested  = 0;  // number of tests that were skipped (for disabled features)
  
  echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' . LB;
***************
*** 72,78 ****
      }
      echo 'for writing.</font><br>Please check that you have set the <b>logs</b> directory <em>and</em> the files <b>error.log</b> and <b>access.log</b> in that directory to <b>chmod 775</b>.' . LB;
!     $logPerms = sprintf ("%3o", fileperms ($_CONF['path_log']) & 0777);
!     $errPerms = sprintf ("%3o", fileperms ($_CONF['path_log'] . 'error.log') & 0777);
!     $accPerms = sprintf ("%3o", fileperms ($_CONF['path_log'] . 'access.log') & 0777);
      echo '<table cellspacing="0" cellpadding="0" border="0">' . LB;
      echo "<tr><td>Current permissions for <b>logs</b>: </td><td>$logPerms</td></tr>" . LB;
--- 73,79 ----
      }
      echo 'for writing.</font><br>Please check that you have set the <b>logs</b> directory <em>and</em> the files <b>error.log</b> and <b>access.log</b> in that directory to <b>chmod 775</b>.' . LB;
!     $logPerms = sprintf ("%3o", @fileperms ($_CONF['path_log']) & 0777);
!     $errPerms = sprintf ("%3o", @fileperms ($_CONF['path_log'] . 'error.log') & 0777);
!     $accPerms = sprintf ("%3o", @fileperms ($_CONF['path_log'] . 'access.log') & 0777);
      echo '<table cellspacing="0" cellpadding="0" border="0">' . LB;
      echo "<tr><td>Current permissions for <b>logs</b>: </td><td>$logPerms</td></tr>" . LB;
***************
*** 90,95 ****
      if (!$file = @fopen ($_CONF['rdf_file'], 'w')) {
          echo '<font color="#ff0000">Could not open the RDF file ' . $_CONF['rdf_file'] . ' for writing.</font><br>Please check that you have set both the <b>backend</b> directory <em>and</em> the <b>geeklog.rdf</b> file in that directory to <b>chmod 775</b>.' . LB;
!         $endPerms = sprintf ("%3o", fileperms ($_CONF['path_html'] . 'backend/') & 0777);
!         $rdfPerms = sprintf ("%3o", fileperms ($_CONF['rdf_file']) & 0777);
          echo '<table cellspacing="0" cellpadding="0" border="0">' . LB;
          echo "<tr><td>Current permissions for <b>backend</b>: </td><td>$endPerms</td></tr>" . LB;
--- 91,96 ----
      if (!$file = @fopen ($_CONF['rdf_file'], 'w')) {
          echo '<font color="#ff0000">Could not open the RDF file ' . $_CONF['rdf_file'] . ' for writing.</font><br>Please check that you have set both the <b>backend</b> directory <em>and</em> the <b>geeklog.rdf</b> file in that directory to <b>chmod 775</b>.' . LB;
!         $endPerms = sprintf ("%3o", @fileperms ($_CONF['path_html'] . 'backend/') & 0777);
!         $rdfPerms = sprintf ("%3o", @fileperms ($_CONF['rdf_file']) & 0777);
          echo '<table cellspacing="0" cellpadding="0" border="0">' . LB;
          echo "<tr><td>Current permissions for <b>backend</b>: </td><td>$endPerms</td></tr>" . LB;
***************
*** 111,115 ****
      if (!$file = @fopen ($_CONF['path_html'] . 'images/userphotos/test.gif', 'w')) {
          echo '<font color="#ff0000">Could not write to <b>' . $_CONF['path_html'] . 'images/userphotos/</b>.</font><br>Please make sure this directory exists and is set to <b>chmod 775</b>.<br>' . LB; 
!         echo 'Current permissions for <b>userphotos</b>: ' . sprintf ("%3o", fileperms ($_CONF['path_html'] . 'images/userphotos/') & 0777);
          $failed++;
      } else {
--- 112,116 ----
      if (!$file = @fopen ($_CONF['path_html'] . 'images/userphotos/test.gif', 'w')) {
          echo '<font color="#ff0000">Could not write to <b>' . $_CONF['path_html'] . 'images/userphotos/</b>.</font><br>Please make sure this directory exists and is set to <b>chmod 775</b>.<br>' . LB; 
!         echo 'Current permissions for <b>userphotos</b>: ' . sprintf ("%3o", @fileperms ($_CONF['path_html'] . 'images/userphotos/') & 0777);
          $failed++;
      } else {
***************
*** 128,132 ****
      if (!$file = @fopen ($_CONF['path_html'] . 'images/articles/test.gif', 'w')) {
          echo '<font color="#ff0000">Could not write to <b>' . $_CONF['path_html'] . 'images/articles/</b>.</font><br>Please make sure this directory exists and is set to <b>chmod 775</b>.<br>' . LB; 
!         echo 'Current permissions for <b>articles</b>: ' . sprintf ("%3o", fileperms ($_CONF['path_html'] . 'images/articles/') & 0777);
          $failed++;
      } else {
--- 129,133 ----
      if (!$file = @fopen ($_CONF['path_html'] . 'images/articles/test.gif', 'w')) {
          echo '<font color="#ff0000">Could not write to <b>' . $_CONF['path_html'] . 'images/articles/</b>.</font><br>Please make sure this directory exists and is set to <b>chmod 775</b>.<br>' . LB; 
!         echo 'Current permissions for <b>articles</b>: ' . sprintf ("%3o", @fileperms ($_CONF['path_html'] . 'images/articles/') & 0777);
          $failed++;
      } else {
***************
*** 141,144 ****
--- 142,174 ----
  }
  
+ if ($_CONF['pdf_enabled'] != 0) {
+     echo '<p>Testing <b>pdfs</b> directory ' . $_CONF['path_pdf'] . ' ...<br>' . LB;
+     if (!$file = @fopen ($_CONF['path_pdf'] . 'test.pdf', 'w')) {
+         echo '<font color="#ff0000">Could not write to <b>' . $_CONF['path_pdf'] . '</b>.</font><br>Please make sure this directory exists and is set to <b>chmod 775</b>.<br>' . LB; 
+         echo 'Current permissions for <b>pdfs</b>: ' . sprintf ("%3o", @fileperms ($_CONF['path_pdf']) & 0777);
+         $failed++;
+     } else {
+         fclose ($file);
+         unlink ($_CONF['path_pdf'] . 'test.pdf');
+         echo '<b>pdfs</b> directory is okay.' . LB;
+         $successful++;
+     }
+ } else {
+     echo '<p>PDF support is disabled - <b>pdfs</b> directory not tested.' . LB;
+     $notTested++;
+ }
+ 
+ echo '<p>Testing <b>data</b> directory ' . $_CONF['path_data'] . ' ...<br>' . LB;
+ if (!$file = @fopen ($_CONF['path_data'] . 'test.txt', 'w')) {
+     echo '<font color="#ff0000">Could not write to <b>' . $_CONF['path_data'] . '</b>.</font><br>Please make sure this directory exists and is set to <b>chmod 775</b>.<br>' . LB; 
+     echo 'Current permissions for <b>data</b>: ' . sprintf ("%3o", @fileperms ($_CONF['path_data']) & 0777);
+     $failed++;
+ } else {
+     fclose ($file);
+     unlink ($_CONF['path_data'] . 'test.txt');
+     echo '<b>data</b> directory is okay.' . LB;
+     $successful++;
+ }
+ 
  echo "<p><strong>Results:</strong> " . ($numTests - $notTested) . " of $numTests tests performed: $successful successful, ";
  if ($failed > 0) {




More information about the geeklog-cvs mailing list