You may encounter this “warning” message when using PHP 5.4 or above
E_WARNING: Creating default object from empty value
Here is how to fix this 🙂
(more…)
You may encounter this “warning” message when using PHP 5.4 or above
E_WARNING: Creating default object from empty value
Here is how to fix this 🙂
(more…)
If you are using WHM & CSF, under CentOS, you may follow this steps to change SSH port from 22 (default) to something else 🙂
(more…)
To install ConfigServer Security & Firewall (CSF) in WHM, please run this commands in your SSH terminal one by one.
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
After it completes, there is a new menu in WHM which is under “Plugins” category, named “ConfigServer Security & Firewall”. 🙂
Here i will explain how to install Litespeed webserver in WHM.
According to the Litespeed wiki :
wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_autoinstaller.sh
chmod a+x lsws_whm_autoinstaller.sh
./lsws_whm_autoinstaller.sh TRIAL 2 1000 admin a1234567 root@localhost 1 0
If you have litespeed license, replace “TRIAL” with your serial number.
You can replace “admin” with another litespeed admin username.
You can replace “a1234567 ” with another litespeed admin password.
You can replace “root@localhost” with another litespeed admin e-mail.
To export a mysql database by linux command line,
for example your database name is my_database, your mysql username is my_username, and your mysql password is my_password, you can use this command :
mysqldump --opt --single-transaction -umy_username -pmy_password my_database > /your/path/here/export.sql
Note: after “-u” and “-p”, there is NO space. 🙂
Here is a simple example of CSS media query 🙂
http://pastebin.com/dkdfAvGF
To change displayed WooCommerce Items Per Page, add this code to any PHP file (end of “woocommerce.php” / your theme functions.php, etc)
// Woo commerce 9 items per page add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 9;' ), 20 );
I bought a new notebook few weeks ago. Now i have just remembered that i have to use scrapebox on my new notebook. So i went to google for a while and i found this link http://www.scrapebox.com/scrapebox-license-transfer.
That page describes everything clearly. And it is free.
All i have to do is redownload the scrapebox, i opened the scrapebox application, clicked “Activate”, i entered my license details there, and i waited for 10-15 minutes, and finally i got e-mail notification that my new license is ready. Thanks Scrapebox for making license transfer simple 🙂
I will give review of best free iPad games. All are installed on my iPad.
If you just use simple PHP htmlentities function with one argument, you will notice that when you pass string that contains UTF-8 characters, the result is incorrect leaving you with some incorrect characters on the result.
To use it correctly, use this code 🙂
htmlentities($your_string, ENT_COMPAT, 'UTF-8');