Source for file index.php

Documentation is available at index.php

  1. <?php    
  2.  
  3. /**
  4.  * @package MinimalWeblog
  5.  * @version 1.0.2
  6.  */
  7.  
  8. $errors array();
  9.  
  10. if (version_compare(PHP_VERSION'5.0.0''<')) {
  11.     $errors['Sorry, you need at least PHP 5 to run this program, and you are using version ' PHP_VERSION;
  12. }
  13.  
  14.  
  15. if (extension_loaded('mysqli')) {
  16.     $errors['Sorry, you need the "mysqli" extension to run this program';
  17. }
  18.  
  19. ?>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  21.         "http://www.w3.org/TR/html4/strict.dtd">
  22. <html lang="en">
  23. <head>
  24. <title>MinimalWeblog 1.0</title>
  25. <meta name="generator" content="BBEdit 8.6">
  26. <style type="text/css">
  27.     .warning { color: red; }
  28. </style> 
  29. </head>
  30. <body>
  31. <h1>MinimalWeblog 1.0</h1>
  32.  
  33. <?php
  34.  
  35. if (empty($errors)) {
  36.     echo '<p class="warning">' join('<br>'$errors'</p>';
  37.     echo '<p>Your PHP installation does not seem to be compatible with this program.</p>';
  38. else {
  39.     echo '<p>Your PHP installation (version ' PHP_VERSION  ', mysqli extension available) should be able to run this program.</p>';    
  40. }
  41.  
  42. ?>
  43. <p>Assuming your PHP environment is reported as compatible, this program can be installed as follows:</p>
  44. <ol> 
  45.   <li>Either create the database for this program (the default database name is 'minimalweblog'), or define the MINIMALWEBLOG_DB constant in config.inc.php to hold the name of the database you want to use;</li>
  46.   <li> Create the necessary tables in the chosen database by running the SQL statements in the minimalweblog.sql file; </li>
  47.   <li> Create a database user with the minimum access rights needed to use this database; </li>
  48.   <li> Edit the MINIMALWEBLOG_TIMEZONE, MINIMALWEBLOG_HOST, MINIMALWEBLOG_USER and MINIMALWEBLOG_PASS constants in the config.inc.php file as needed; </li>
  49.   <li> Open the <a href="example.php">example.php</a> file in your web browser to check that everything works; </li>
  50.   <li> <strong>Change the default password</strong> (it's "password") <strong>for editing the weblog to something else</strong>, either by using the '<a href="example.php?wl_password=password&amp;wl_mode=edit+setup">edit setup</a>' link which appears after <a href="example.php?wl_mode=login">logging in</a>, or by directly entering the MD5 hash of the password you want in the database. </li>
  51.   <li> By default, editing the weblog is only allowed from localhost.This should be changed if the MinimalWeblog software is installed on a remote server, which is likely to be the case. Edit (recommended) or comment out (if necessary) the MINIMALWEBLOG_HOSTS_EDITING_ALLOWED constant definition in config.inc.php. </li>
  52.   <li> Recommended: move everything except files that will be requested directly by a web browser outside the web server's document root. Edit require() commands and/or your include_path as needed. </li>
  53. </ol>
  54. </body>
  55. </html>

Documentation generated on Sun, 17 Jun 2007 19:20:36 +0200 by phpDocumentor 1.3.2