Pet project to manage seminar registration for Herzogenhorn ... started in January 2017. Proved to be useful in 2017 :-) Ready to be used for any consecutive year.
At the moment there seem to be some problem with recent PHP versions.
This project is archived as its PHP nature doesn't help making it runnable in varous cloud environments. If there's time a Java rewrite may happen ;) In order to get a visual impression of the app have a look at some screenshots.
https://github.com/users/ottlinger/projects/5
In order to just play around with it I've integrated the project into various freely available services.
An overview of existing releases can be found here.
- PHP >=7.3
- with XML module installed
- with MBString extension installed
- with MySQL extension installed
- with intl/i18n extension installed
- (with php-xdebug in case you want local code coverage)
- (with SQLite extension installed (for tests only)
- Configured Mail server so that PHP may send mails
- Webserver (Apache2)
- MySQL database with tables initialized, see herzogenhorn.sql for details
- Clone the project into your webserver's root directory or download it as ZIP if you do not have a Git properly set up
- Bootstrap the database with the help of herzogenhorn.sql and your favourite database admin tool
- Copy and adapt the configuration template as inc/config.ini.php with all your credentials
- Adapt the admin area credentials setup and path to AuthUserFile in .htaccess and .htpasswd
- Use the project and verify with the help of the test scripts under admin that everything works fine :-)
- Check your logs:
$ tail -f /var/log/apache2/*.log
Local installations work fine with PHP7, while some hosters have trouble because of
- UTF-8 issues
- missing modules such as intl for l10n
You need to install php and add some libraries to your local Webserver:
$ sudo apt-get install php7.4-xml php7.4-mbstring php7.4-mysql php7.4-intl
or in case you want to run tests or develop on the project
$ sudo apt-get install php7.4-xml php7.4-mbstring php7.4-mysql php7.4-intl php7.4-sqlite3 php-xdebug sqlite3
$ sudo /etc/init.d/apache2 restart
PHPUnit will be installed via composer, see section about development for further details.
The equivalent installation via homebrew is
$ brew install php@7.4 sqlite3
(deprecated: $ brew install php70 php70-intl php70-xdebug sqlite3)
to make the tests run locally. The PHP extension for sqlite seems to be enabled by default.
If you are using MySQL you may setup your databases locally for easier development:
$ sudo apt install mysql
...
You will be asked for the MySQL root password - remember to remember that password!
...
$ mysqladmin create hornherzogen -u root -p
Enter password: // use above freshly created root user
$ mysql -u root -p
// if you want to connect from local
mysql> grant usage on *.* to dbuser@localhost identified by 'yourpasswordhere';
Query OK, 0 rows affected, 1 warning (0,00 sec)
mysql> grant all privileges on hornherzogen.* to dbuser@localhost;
Query OK, 0 rows affected (0,00 sec)
mysql> exit
$ mysql -u dbuser -p'yourpasswordhere' hornherzogen
// successful if you see:
mysql>
Do not forget to put above credentials into your inc/config.ini.php file.
In case you do not have a phpMyAdmin installed, you might want to give
$ sudo apt install mysql-workbench
a try.
You may now use the bootstrap script herzogenhorn.sql
If you need to remove all tables, use herzogenhorn_remove.sql with GREAT CAUTION!
In case you want to develop the dependency manager can be installed via:
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
You should regularly perform an:
$ ./composer.phar self-update
$ ./composer.phar update
to get updates.
In order to run tests locally you need to run PHPUnit:
$ phpunit
or
$ phpunit -c phpunit.xml
In order to run tests locally (apart from Travis) you may want to configure a handy alias in your .bashrc
:
# PHP aliases
alias phpunit='./vendor/bin/phpunit'
This is necessary if you've installed composer project-locally and have no phpunit installed on the system that is in your $PATH!
In order to see a nicer test output, launch:
$ phpunit --testdox tests
The configuration file needs to be created in order to set certain application parameters. The file needs to reside in inc/config.ini.php
and is not checked in!
Configuration parameter | Comment |
---|---|
Complete email address, may contain a subject line as well | |
Complete link to the seminar announcement (PDF) | |
registrationmail | Email address that all registrations are send to |
sendregistrationmails | Boolean, whether to send registration mails to customers |
sendinternalregistrationmails | Boolean, whether to send mails internally upon registration via web form |
submissionend | Date string after which the application is not possible anymore, format: YYYY-mm-dd |
dbhost | Database hostname with port if necessary |
dbname | Database name |
dbuser | Database username |
dbpassword | Database password |
iban | Target account IBAN information |
bic | Target account BIC information |
accountholder | Target account holder name |
superuser | List of superusers with special permissions in the admin area (comma-separated list as one string) |
See example configurations in configuration example of this project
This a collection of related links that helped working on and with this application:
- Markdown cheatsheet
- Bootstrap UI framework with Starter Template used here
- download v3.3.7
- download with examples v3.3.7
- additional snippets for Bootstrap projects
- additional form helpers such as language list or datepicker
- icon overview
- PHP
- books
$ docker build -t hornherzogen .
.....
Successfully tagged hornherzogen:latest
After building the local last version you may run:
$ docker-compose up
and the see the app under http://localhost:8080
Copyright © 2017-2021 P. Ottlinger, licensed as GPLv3