Sunday, May 2, 2021

How to find the executable path of a php,mysql program? - Try which and whereis

You may want to find out where the executable is installed or is being executed from

which php

/usr/php


which mysql

/usr/local/mysql/bin/mysql

 

Alternative command for the same results as above.

whereis php

whereis mysql

echo "">access_log How to clear a log file without deleting it?

 Do you want to debug a file and realize it has too much of content in it.

Let's say the file name is access_log.

just say echo "">access_log.

This will replace the content with the blank file.

Now your file is ready to starting logging data from now :-).

Note: Please use this at your own discretion. This is just a workaround.

How to define a temporary variable in mac Terminal

How to define a temporary variable in mac Terminal?
 

Example1: Lets say I want to store company Name into a temporary variable in a terminal and display it.

export companyName="GGHL"
echo $companyName
GGHL

 

Example2: Display machine name path

export myhomedir=/Userss/${USER}
echo $myhomedir
/Users/username

Saturday, May 1, 2021

Top 5 tips of using meta tag in html web pages to improve SEO

 Meta tags are meta (additional) information usually describing the page and its contents. This is generally for search engines to read and understand the content of your page.

1. Set the charset -
<meta charset="utf-8">
This will ensure that when you go for international character sets, you will not see gibberish. If you do not understand, safely use the above statement for any html page.

2. Set the author name
<meta name="author" content="<author name>">
It is learnt that this information can be helpful in identifying the original author of the content. Search engines do use this information.

3. Search Engine Optimization (SEO)
<meta name="description" content="The important keywords of your article should go in here, so that when a user searches on a search engine, the page rank and the probability of the search results displaying on top results increases."

4. Keywords
<meta name="keyword" content="HTML,CSS,javascript">
Keywords will help Search engines as part of SEO ( Search Engine Optimization ) filter your page when a user uses keywords to search their results. It is also recommended that these keywords be frequently used- not overused in the content of the page being displayed to allow search engine to consider the page and keywords relevant and move your page up the order.

5.Title tag
<title>Your page title</title>
Even though this is not part meta tag, it is worth mentioning that this tag also adds value when a user searches on a Search engine and is an important parameter for SEO (Search Engine Optimizer), a key placeholder.

Friday, April 30, 2021

Where is php.ini located on macOS

Location of php.ini file

 <prompt>:~<username>$ php -ini

List the php modules installed

$php -m

Sample output:

bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom