Validate phone number and email in php

Phone number validation using regular expression Phone number validation using is_numeric function is_int or is_integer is_numeric regular expressions ctype_digit filter_var is_integer() for this function these values are are not valid: “0010”, “123” is_numeric() for this function these values are valid: 1.3, +1234e44 and 0x539 filter_var() for this function a value as “00123” is not valid […]

Read More

Invalid or missing Livepatch token

Disable Livepatch either through the GUI or by running canonical-livepatch disable as root Uninstall Livepatch with snap remove canonical-livepatch as root (optional. Try it first without doing this) Run the command rm /etc/machine-id as root to remove your current machine ID (if it says the file or directory doesn’t exist, you can safely ignore it) Run the command systemd-machine-id-setup as root to regenerate […]

Read More

Step by step overview guide for setup business WhatsApp API

Step by step overview guide for setup business WhatsApp API with Facebook business account What is the criteria to check my business Facebook is active for WhatsApp api after that your WhatsApp api is fully activated. Must have Facebook business account settinga. WhatsApp account added into Facebook business settingb. Add system userc. Assign an App […]

Read More

#1101 error in mysql / phpmyadmin

1101 – BLOB, TEXT, GEOMETRY or JSON column ‘answer’ can’t have a default value Probably your development environment allows the defaults and the production environment doesn’t. You can either upgrade your production system or not use that feature. How to disable strict mode in MySQL 5 (Windows): Edit /my.ini and look for linesql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” Replace it […]

Read More

#2006 – MySQL server has gone away

MySQL/MariaDB related: wait_timeout – Time in seconds that the server waits for a connection to become active before closing it. interactive_timeout – Time in seconds that the server waits for an interactive connection. max_allowed_packet – Maximum size in bytes of a packet or a generated/intermediate string. Set as large as the largest BLOB, in multiples of 1024. Example […]

Read More