How to upgrade ZenCart from 1.3.x to ZenCart 1.5.x

First of all backup your current website’s version (files/folders/database)

Supposed you have ZenCart on yourdomain.com pointed to /home/USERNAME/public_html

So, we will upgrade your ZenCart to /home/USERNAME/public_html/shop to prevent any issue with your current installation.

Create sub domain shop.yourdomain.com and point it to /home/USERNAME/public_html/shop

Create if needed shop folder under /home/USERNAME/public_html/

mkdir -p shop
cd shop/

Download the latest version

wget https://sourceforge.net/projects/zencart/files/CURRENT%20-%20Zen%20Cart%201.5.x%20Series/zen-cart-v1.5.5f-12312017b.zip
Read the rest

Useful nmap command

Traceroute to IP address

nmap -sn --traceroute remoteipaddress

Traceroute to port

nmap -Pn --traceroute -p 443 remoteipaddress

Output:

PORT STATE SERVICE
443/tcp open https

Open means its ok

PORT STATE SERVICE
443/tcp filtered https

Filtered means that a firewall or some filtering or other network issue is covering the port and preventing nmap from determining if the port is open.… Read the rest

How to enable/disable SSL for Prestashop via MySQL command line

Enter your database

mysql your_database;

Check the value

select * from ps_configuration where name like '%SSL_ENABLED%';

To enable

update ps_configuration set value = '1' where name = 'PS_SSL_ENABLED';
update ps_configuration set value = '1' where name = 'PS_SSL_ENABLED_EVERYWHERE';

To disable

update ps_configuration set value = '0' where name = 'PS_SSL_ENABLED';
update ps_configuration set value = '0' where name = 'PS_SSL_ENABLED_EVERYWHERE';

 … Read the rest

How to run shell commands from the inside MySQL command line

You need to use \! before shell command

Examples:

MariaDB [(none)]> \! date;
Sun Sep  9 03:18:38 CEST 2018
MariaDB [(none)]> \! ls -d public_html;
public_html
MariaDB [(none)]> \! touch 1.txt
MariaDB [(none)]> \! ls 1.txt
1.txt
MariaDB [(none)]> \! uptime;
 03:19:40 up 8 days, 11:45,  8 users,  load average: 4.92, 5.07, 4.89
MariaDB [(none)]> 
Read the rest

Tune user’s crontab files

Сrontab adding MAILTO into user's files to prevent mail sending

cd /var/spool/cron && for i in `ls *[a-z]*`; do if ! grep "MAILTO" $i; then sed -i -e '1 s/^/MAILTO=""\n/;' $i; else echo "MAILTO is exist for $i"; fi; done

Remove not existent email address from user crontab to prevent bounces

sed -i -e 's/MAILTO\=.*/MAILTO\=""/g'
Read the rest