Trying to fugure out a problem with jQuery JSON. What I found.

Generate json in server side scripting —

$myObj->status = “success”; $myObj->message = “Doctor added..”;

Call from client side -\

var result = jQuery.parseJSON(data); alert (result.status);

Installing Wordpress on existing LAMP server.

  1. Create a DB
  2. Create user
  3. Download latest Wordpress.
$ sudo curl -O

4. Update the PHP

$ sudo apt update
$ sudo apt install php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
$ sudo tar -xvf latest.tar.gz
$ cd wordpress
$ sudo mv wp-config-sample.php wp-config.php

5. Edit again wp-config.php. Copy and paste from the response.

5. Edit wp-config.php. Copy and paste from the response.

$ sudo curl -s

6. Copy the index.php from the installed folder to <HTDOCS> folder.

/* Loads the WordPress Environment and Template */require ‘./wordpress/wp-blog-header.php’;

Bitnami server

Obtain the status of a service:

sudo /opt/bitnami/ status

Call it without any service name arguments to start all services:

sudo /opt/bitnami/ start

Or use it to restart a single service, such as Apache only, by passing the service name as argument:

sudo /opt/bitnami/ restart apache

Use this script to stop all services:

sudo /opt/bitnami/ stop

Restart the services by running the script without any arguments:

sudo /opt/bitnami/ restartmysqldump -u [username] -p [database name] > [database name].sqlCREATE DATABASE newdatabase;

Then log out of the MySQL shell and type the following on the command line:

mysql -u [username] -p newdatabase < [database name].sql


sudo mkdir /var/backup/db

# (1) set up all the mysqldump variablesDATE=`date +"%d_%b_%Y_%H%M"`SQLFILE=/var/backup/db/db_backup_${DATE}.sqlDATABASE=<database_name>USER=<db_user>PASSWORD=<db_user_password># (2) in case you run this more than once a day,# remove the previous version of the fileunalias rm     2> /dev/nullrm ${SQLFILE}     2> /dev/nullrm ${SQLFILE}.gz  2> /dev/null# (3) do the mysql database backup (dump)sudo mysqldump -u ${USER} -p${PASSWORD} ${DATABASE}|gzip > ${SQLFILE}.gz

sudo crontab -e

0 1 * * * /var/backup/

To delete the old files -

sudo find /var/backup/db/. -mtime +7 -exec rm {} \;

To get the application credential in AWS Lightsail

sudo cat /home/bitnami/bitnami_credentials

CREATE USER ‘<USER_NAME>’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘<PASSWORD>’;
GRANT ALL PRIVILEGES ON `sroy`.* TO ‘<USER_NAME>’@’localhost’;

Now unzip the .gz file gzip -d file.gz

Adding security Certificate. Step-1 — openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out myserver.csr. Now copy the text from the generated .csr file to create the certificate request. Once the certificates are created, see the e-mail and download the <domain>.crt file.

Enable the line in httpd.conf file. LoadModule ssl_module modules/ unblock or add this line Include conf/extra/httpd-ssl.conf (This settings are already present in the server setting). Add the lines in httpd-ssl.conf SSLCertificateFile “/opt/bitnami/apache/conf/bitnami/certs/myeprescription_in.crt” and SSLCertificateKeyFile “/opt/bitnami/apache/conf/bitnami/certs/myserver.key”

Senior MDM Architect | Cloud Compute Enthusiasts