-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Here are some non-obvious notes about the site:
To create a super admin that can see across localities, set member's locality to Admin
in the database.
If you try too many times logging into your account with an incorrect password (i.e. during development), your account will be locked down. Clear your login_attempts table so you can login again.
Login redirects will break when you put print
or echo
statements in authentication functions to debug or add extra spaces/text outside of any <?php ?>
tags. Your error logs will complain header has already been sent before you can try to set it to another Location
The year variable is stored in navigation.php
as $year
, update to propagate throughout the site.
Edit includes/localities.txt
in the format: value|name
, for example:
Cambridge, MA|Cambridge, MA
Boston, MA|Boston, MA
If portal/admin/register.php
breaks in production, it's usually b/c the .htaccess
file isn't setup correctly. Check to make sure the path is correct:
AuthUserFile #absolute_path_to_.htpasswd#
AuthName Register
AuthType Basic
<Files "register.php">
require valid-user
</Files>
To generate new users to add to the .htpasswd
file, do this (on Macbook):
htpasswd -nb username password
You'll get a string like this to put into the .htpasswd
file.
admin:$apr1$dE6EM7ob$w9RWqDEkPpYM9ydVzqY/O1
Everything should work and that page will be password-protected.
You'll need to update the following files to alter database config, year, dates, localities supported
psl-config.php
global-config.php
localities.txt
header.html
navigation.php
Run the following php file in the project
php -f backup_db.php
To see any errors in page (much easier than tailing the logs), follow these instructions:
Go to Applications/Mamp/bin/php/phpVERSION/conf/php.ini
Set
error_reporting=E_ALL
display_errors=On
To see warnings, you'll need to comment out the line error_reporting(E_ERROR | E_PARSE);
in psl-config.php
.
Fork with:
git co -B <new_branch_name>
git push origin <new_branch_name>
Now, you can check out the new branch anywhere with git fetch --all
+ git co <new_branch_name>