UPWORK/ODESK guru: Tips and Tricks for clients

skype: upwork.link , email: [email protected]

Archive for March, 2014

Squid proxy only – without caching anything.

without comments

You can use the cache access list to make Squid never cache any response:

cache deny all

Read the rest of this entry »

Written by spectre

March 23rd, 2014 at 2:20 pm

Posted in Tips and Tricks

IPTABLES: dangerous vulnerability (CVE-2014-2523) DCCP

without comments

Vulnerable section of code existed in Linux since version 2.6.26 (July 2008) to 3.13 inclusive. Despite the fact that the correction was made in early January 2014 (and included in Linux 3.14-RC1), the problem has been reported as a vulnerability only on Monday. The release of patches for popular distributions can be traced to the following pages: Fedora / RHEL, SuSE, Debian, Ubuntu.

Read the rest of this entry »

Written by spectre

March 19th, 2014 at 8:48 pm

Posted in Tips and Tricks

Getting type of engine of Mysql’s tables.

without comments

[[email protected] ~]# mysql -u root -pXXXXX -e 'select table_schema,table_name,engine from tables' information_schema
+--------------------+---------------------------------------+--------+
| table_schema       | table_name                            | engine |
+--------------------+---------------------------------------+--------+
| information_schema | CHARACTER_SETS                        | MEMORY |
| information_schema | COLLATIONS                            | MEMORY |
| information_schema | COLLATION_CHARACTER_SET_APPLICABILITY | MEMORY |
| information_schema | COLUMNS                               | MyISAM |
....

Written by spectre

March 17th, 2014 at 11:26 am

Posted in Mysql

Changing PHP Memory Limit : 3 ways

without comments

If you have seen an error like ”Fatal Error: __PHP Allowed Memory Size Exhausted” in apache logs or in your browser, this means that PHP has exhausted the maximum memory limit. This post will show 3 different ways on how you can increase the php memory limit and also explain when you should use them.

Read the rest of this entry »

Written by spectre

March 16th, 2014 at 5:11 pm

Posted in Php,Tips and Tricks

How to setup anonymous proxy server with Squid – Linux

without comments

cat /etc/squid/squid.conf:

Read the rest of this entry »

Written by spectre

March 14th, 2014 at 12:50 pm

Posted in Tips and Tricks

PHP: How to log errors and warnings into a file?

without comments

Use the following code:

ini_set("log_errors", 1);
ini_set("error_log", "/tmp/php-error.log");
error_log( "Hello, errors!" );

Read the rest of this entry »

Written by spectre

March 11th, 2014 at 7:09 pm

Posted in Php,Tips and Tricks

How to Clear Memory Cache on Linux

without comments

By default, every Linux OS has an efficient memory management system used to clear the buffer cache periodically. You can manually free up the memory cache with the following simple command:

# echo 3 > /proc/sys/vm/drop_caches"

However, if you want to force the Linux OS to do clearing memory cache on a particular interval, just add the command to cron job. Here, I show you how.

Written by spectre

March 11th, 2014 at 4:18 pm

Posted in Tips and Tricks

Tips: How to disable mod_security2 rules on CPANEL/WHM for any domain.

without comments

Just create a directory:

# mkdir -p /usr/local/apache/conf/userdata/(std|ssl)/2/yourusername/yourmaindomain.com

Read the rest of this entry »

Written by spectre

March 4th, 2014 at 4:26 pm

Posted in Cpanel & WHM

Tips: Custom Configurations of httpd.conf on WHM/CPANEL server

without comments

Here are the two common situations of adding custom changes:

Changes added inside a

1
<VirtualHost>

This is very simple as we only need to create a single file that will contain our changes. But we need to understand the correct location on where to place this file so that our changes will be read properly.

Read the rest of this entry »

Written by spectre

March 4th, 2014 at 4:20 pm

Posted in Cpanel & WHM

TIPS: “stdin is not a tty” when using SCP

without comments

SCP / SSH may not need a (pseudo-)terminal but something may expect it regardless on the remote end.

Does any global or personal shell resource files contain “stty” or “mesg” (‘egrep -r “stty|mesg” /etc/bashrc /etc/profile /etc/profile.d ~/.bashrc ~/.bash_profile;’)? For example:

[email protected] [/]# egrep -r "stty|mesg" /etc/bashrc /etc/profile /etc/profile.d ~/.bashrc ~/.bash_profile
/etc/bashrc:mesg y
[email protected] [/]#

If exactly as above, then you need just to comment this row in /etc/bashrc file.

Written by spectre

March 1st, 2014 at 5:09 pm

Posted in Tips and Tricks