Permalink
Browse files

Modify docker to use postgres 9.6. Change setup files to reflect Cano…

…py instead of phpwebsite
  • Loading branch information...
Ted Eberhard
Ted Eberhard committed Nov 10, 2017
1 parent ab54afb commit a8a3b649c43c1e0ae71ca76863202ca4f6421020
Showing with 43 additions and 43 deletions.
  1. +8 −8 docker-compose.yml
  2. +18 −18 setup/class/Setup.php
  3. +2 −2 setup/config.php
  4. +8 −8 setup/help/database.en_US.txt
  5. +3 −3 setup/help/permissions.en_US.txt
  6. +4 −4 setup/welcome.php
View
@@ -5,19 +5,19 @@ services:
ports:
- "4306:3306"
environment:
MYSQL_USER: phpwebsite
MYSQL_PASSWORD: phpwebsite
MYSQL_DATABASE: phpwebsite
MYSQL_ROOT_PASSWORD: phpwebsite
MYSQL_USER: canopy
MYSQL_PASSWORD: canopy
MYSQL_DATABASE: canopy
MYSQL_ROOT_PASSWORD: canopy
postgres_db:
image: postgres
image: postgres:9.6
ports:
- "6432:5432"
environment:
POSTGRES_PASSWORD: phpwebsite
POSTGRES_USER: phpwebsite
POSTGRES_DB: phpwebsite
POSTGRES_PASSWORD: canopy
POSTGRES_USER: canopy
POSTGRES_DB: canopy
web:
build: .
View
@@ -1,7 +1,7 @@
<?php
/**
* Setup class controls the first-time installation of phpwebsite
* Setup class controls the first-time installation of Canopy
*
* @author Matthew McNaney <mcnaney at gmail dot com>
* @version $Id$
@@ -271,15 +271,15 @@ public function postConfig()
return true;
} elseif ($checkConnection == 2) {
$sub[] = dgettext('core',
'PhpWebSite was able to connect, but the database already contained tables.');
'Canopy was able to connect, but the database already contained tables.');
if ($this->getConfigSet('dbprefix')) {
$sub[] = dgettext('core',
'Since you set a table prefix, you may force an installation into this database.');
$sub[] = dgettext('core',
'Click the link below to continue or change your connection settings.');
$sub[] = sprintf('<a href="index.php?step=7">%s</a>',
dgettext('core',
'I want to install phpWebSite in this database.'));
'I want to install Canopy in this database.'));
} else {
$sub[] = dgettext('core',
'Create a new database, remove all tables from the database you want to use, or use table prefixing.');
@@ -457,12 +457,12 @@ public function databaseConfig()
$databases = array('mysql' => 'MySQL', 'pgsql' => 'PostgreSQL');
$formTpl['DBTYPE_DEF'] = dgettext('core',
'phpWebSite supports MySQL and PostgreSQL. Choose the type your server currently is running.');
'Canopy supports MySQL and PostgreSQL. Choose the type your server currently is running.');
$formTpl['DBUSER_DEF'] = dgettext('core',
'This is the user name that phpWebSite will use to access its database.')
'This is the user name that Canopy will use to access its database.')
. ' <br /><i>' . dgettext('core',
'Note: it is a good idea to give each phpWebSite installation its own user.') . '</i>';
'Note: it is a good idea to give each Canopy installation its own user.') . '</i>';
if (isset($this->messages['dbuser'])) {
$formTpl['DBUSER_ERR'] = $this->messages['dbuser'];
}
@@ -475,21 +475,21 @@ public function databaseConfig()
$formTpl['DBPREF_DEF'] = dgettext('core',
'If you are installing phpWebSite in a shared environment, you may assign a prefix to tables.<br />We recommend you run without one.');
'If you are installing Canopy in a shared environment, you may assign a prefix to tables.<br />We recommend you run without one.');
if (isset($this->messages['dbpref'])) {
$formTpl['DBPREF_ERR'] = $this->messages['dbpref'];
}
$formTpl['DBHOST_DEF'] = dgettext('core',
'If your database is on the same server as your phpWebSite installation, leave this as &#x22;localhost&#x22;.')
'If your database is on the same server as your Canopy installation, leave this as &#x22;localhost&#x22;.')
. '<br />' . dgettext('core',
'Otherwise, enter the ip or dns to the database server.');
$formTpl['DBPORT_DEF'] = dgettext('core',
'If your host specification requires access via a specific port, enter it here.');
$formTpl['DBNAME_DEF'] = dgettext('core',
'The database\'s name into which you are installing phpWebSite.')
'The database\'s name into which you are installing Canopy.')
. '<br /><i>' . dgettext('core',
'Note: if you have not made this database yet, you should do so before continuing.') . '</i>';
if (isset($this->messages['dbname'])) {
@@ -529,7 +529,7 @@ public function databaseConfig()
$form->addSubmit('default_submit', 'Continue');
$this->content = $this->createForm($form, 'databaseConfig.tpl');
$this->title = 'Configure phpWebSite';
$this->title = 'Configure Canopy';
$this->display();
}
@@ -549,7 +549,7 @@ public function show($content, $title = NULL, $forward = false)
$tpl = new PHPWS_Template;
$tpl->setFile('setup/templates/setup.tpl', true);
if (!isset($title)) {
$title = sprintf(dgettext('core', 'phpWebSite %s Setup'), $version);
$title = sprintf(dgettext('core', 'Canopy %s Setup'), $version);
}
if ($forward && AUTO_FORWARD) {
@@ -583,7 +583,7 @@ public function checkSession()
// step > 2; check for session
if (!isset($_SESSION['session_check'])) {
$this->content[] = dgettext('core',
'phpWebSite depends on sessions to move data between pages.');
'Canopy depends on sessions to move data between pages.');
$this->content[] = sprintf('<a href="help/sessions.%s.txt">%s</a>',
DEFAULT_LANGUAGE, 'Sessions Help');
$this->content[] = sprintf(dgettext('core',
@@ -603,7 +603,7 @@ public function welcome()
switch ($this->testDBConnect(PHPWS_DSN)) {
case '2':
$this->content[] = dgettext('core',
'phpWebSite configuration file and database have been found. We are assuming your installation is complete.');
'Canopy configuration file and database have been found. We are assuming your installation is complete.');
$this->content[] = dgettext('core',
'You should move or delete the setup directory.');
$this->content[] = dgettext('core',
@@ -615,7 +615,7 @@ public function welcome()
case '-1':
$this->content[] = dgettext('core',
'The phpWebSite configuration file exists but it\'s specified database does not.');
'The Canopy configuration file exists but it\'s specified database does not.');
$this->content[] = dgettext('core',
'Create the database set in the config file or delete the config file.');
$this->title = dgettext('core',
@@ -625,7 +625,7 @@ public function welcome()
case '0':
$this->content[] = dgettext('core',
'The phpWebSite configuration file exists but we could not connect to it\'s specified database.');
'The Canopy configuration file exists but we could not connect to it\'s specified database.');
$this->content[] = dgettext('core',
'Check your dsn settings or delete the config file.');
$this->title = dgettext('core',
@@ -753,7 +753,7 @@ public function finish()
{
$this->content[] = '<hr />';
$this->content[] = dgettext('core',
'Installation of phpWebSite is complete.') . '<br />';
'Installation of Canopy is complete.') . '<br />';
$this->content[] = dgettext('core',
'If you experienced any error messages, check your error.log file.') . '<br />';
if (CHECK_DIRECTORY_PERMISSIONS) {
@@ -811,7 +811,7 @@ public function checkServerSettings()
$test['session_auto_start']['pass'] = !(bool) ini_get('session.auto_start'); // need 0
$test['session_auto_start']['fail'] = dgettext('core',
'session.auto_start must be set to 0 for phpWebSite to work. Please review your php.ini file.');
'session.auto_start must be set to 0 for Canopy to work. Please review your php.ini file.');
$test['session_auto_start']['name'] = dgettext('core',
'Session auto start disabled');
$test['session_auto_start']['crit'] = true;
@@ -919,7 +919,7 @@ public function checkServerSettings()
if (!$allow_install) {
$this->title = dgettext('core',
'Cannot install phpWebSite because of the following reasons:');
'Cannot install Canopy because of the following reasons:');
$this->content = '<ul>' . PHPWS_Text::tag_implode('li', $crit) . '</ul>';
$this->display();
} else {
View
@@ -5,10 +5,10 @@
*/
define('DEFAULT_DBTYPE', 'mysql');
// CHANGE BACK
define('DEFAULT_DBUSER', 'phpwebsite');
define('DEFAULT_DBUSER', 'canopy');
define('DEFAULT_DBHOST', 'localhost');
define('DEFAULT_DBPORT', NULL);
define('DEFAULT_DBNAME', 'phpwebsite');
define('DEFAULT_DBNAME', 'canopy');
define('CHECK_DB_CONNECTION', TRUE);
@@ -2,7 +2,7 @@ Database Assistance
---------------------------------------------------------------------
Here are some steps to try and get your database working with
phpWebSite.
Canopy.
Quick note: if using PostgresSQL, please check end of document.
@@ -59,7 +59,7 @@ allowed to access the database server. Make sure your web server is in
the firewall.
(Note: If you DO NOT get an error message, the problem may be
with phpWebSite. Your database may not be supported. Enter a bug
with Canopy. Your database may not be supported. Enter a bug
report.)
Step 2a - Is your database compiled into php?
@@ -78,12 +78,12 @@ database's support. Make sure to restart your web service after
changing php's configuration.
Step 3 - Checking phpWebSite's connection
Step 3 - Checking Canopy's connection
----------------------------------------------------------------------
If you are able to login via a terminal and you have been able to
login using a short php command then you are ready to tackle problems
in phpWebSite.
in Canopy.
Double check the database name, user name, and password. They must be
exact to make a connection.
@@ -100,20 +100,20 @@ however for Postgresql, the port (usually 5432) must be entered.
Step 4 - Your first database
----------------------------------------------------------------------
Once you are connecting, phpWebSite will attempt to create a
Once you are connecting, Canopy will attempt to create a
database for its tables. If you DO NOT get an attempt prompt,
you may need to create it yourself. Log in to your database and create
the database like so:
CREATE DATABASE phpwebsite;
CREATE DATABASE Canopy;
with 'phpwebsite' being the same as the database name you are using on
with 'Canopy' being the same as the database name you are using on
the installation screen.
Final Notes:
---------------------------------------------------------------------
If you are using PostgresSQL, phpWebSite will NOT be able to create a
If you are using PostgresSQL, Canopy will NOT be able to create a
new database for you. You must create a database to install into
beforehand.
@@ -17,7 +17,7 @@ If you are running Apache under Linux/Unix you have two options:
You MUST change the permissions back after setup.
After installation of phpWebSite or its modules, the following directories
After installation of Canopy or its modules, the following directories
should remain writable:
phpwebsite/images/
@@ -34,7 +34,7 @@ phpwebsite/javascript/modules/
Make sure to restrict the permissions on those directories after done with
your installation.
Note: You may be asking "Why doesn't phpWebSite do this for me?"
phpWebSite can call chown and chmod, but php itself would need
Note: You may be asking "Why doesn't Canopy do this for me?"
Canopy can call chown and chmod, but php itself would need
directory permissions. You do not want php to be root or the directory
owner.
View
@@ -6,18 +6,18 @@
include 'src-phpws-legacy/src/version.php';
$content[] = "<b>Welcome to the phpWebSite $version</b><br />
$content[] = "<b>Welcome to the Canopy $version</b><br />
<p>If you are having problems with your installation, please refer to the following sources:<br />
<ul>
<li><a href=\"../docs/INSTALL\">Installation documentation</a></li>
<li><a href=\"../docs/Editor.txt\">WYSIWYG editor information</a></li>
<li><a href=\"../docs/Theme_Creation.txt\">Theme creation documentation</a></li>
<li><a href=\"http://sourceforge.net/forum/forum.php?forum_id=556851\">phpWebSite 1.0 forum</a></li>
<li><a href=\"http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_Main_Page\">phpWebSite Wiki</a></li>
<li><a href=\"http://sourceforge.net/forum/forum.php?forum_id=556851\">Canopy 1.0 forum</a></li>
<li><a href=\"http://phpwebsite-comm.sourceforge.net/wiki/index.php?title=En_Main_Page\">Canopy Wiki</a></li>
<li><a href=\"http://ezine.dc4db.net/is20070201.en.html\">Theming Step by Step</a></li>
<li><a href=\"http://phpwsforums.com/\">Unofficial Help Forums</a></li>
<li>Visit our chatroom at irc.freenode.net - #phpwebsite</li>
<li>Visit our chatroom at irc.freenode.net - #Canopy</li>
</ul>
</p>

0 comments on commit a8a3b64

Please sign in to comment.