From c7753ba353f4ed49cf15f4cfb5e295d31a5a1fff Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 23 Dec 2023 13:09:00 -0500 Subject: [PATCH] echo pwds... --- protected/README.MD | 15 ++++++++------- protected/src/config.php | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/protected/README.MD b/protected/README.MD index 048dcbb..cf0e2e2 100644 --- a/protected/README.MD +++ b/protected/README.MD @@ -50,17 +50,19 @@ $ sudo systemctl start mysql $ sudo systemctl enable mysql # Lets make a secure password for use with MySQL root account. -$ openssl rand -base64 18 +$ MROOT=$(openssl rand -base64 18) +$ echo "MySQL Root password is now: $MROOT" # The following script will prompt you to perform various security-related actions. Follow the prompts to set a root password, remove anonymous users, disallow root login remotely, remove the test database, and reload the privilege tables. $ sudo mysql_secure_installation # Change this password SJ6G*WyaV7PvvEts@vxjm used below in a couple of places throughout this tutorial! -# Lets make a secure password for use with MySQL zoombox user account. -$ openssl rand -base64 18 +# Lets make a secure password for use with MySQL user account EX zoombox. +$ CMSPWD=$(openssl rand -base64 18) +$ echo "MySQL cms database user account password is now: $CMSPWD" -# Enter your password assigned during setup, create a new user for the app to use. -$ mysql -u root -p +# Lets create a new user account for mysql +$ mysql -u root -p$MROOT > CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'SJ6G*WyaV7PvvEts@vxjm'; > GRANT ALL ON cms.* TO 'zoombox'@'localhost'; > create database cms; @@ -73,8 +75,7 @@ $ pwd # You should be in /var/www/cms/protected/src # Run as normal user account for mysql program to run safely. # Do not use the root MySQL user for cms app! -$ mysql -u cms -p cms < tables.sql - enter this password when prompted: SJ6G*WyaV7PvvEts@vxjm +$ mysql -u zoombox -p$CMSPWD cms < tables.sql $ popd ``` diff --git a/protected/src/config.php b/protected/src/config.php index 07d82ca..a3e28d0 100644 --- a/protected/src/config.php +++ b/protected/src/config.php @@ -51,8 +51,8 @@ define( "IMG_TYPE_FULLSIZE", "fullsize" ); define( "IMG_TYPE_THUMB", "thumb" ); define( "ARTICLE_THUMB_WIDTH", 120 ); define( "JPEG_QUALITY", 85 ); -require( CLASS_PATH . "/Article.php" ); -require( CLASS_PATH . "/Category.php" ); +require CLASS_PATH . "/Article.php"; +require CLASS_PATH . "/Category.php"; function handleException( $exception ) { echo "Sorry, a problem occurred. Please try later.";