Disable Apache Logging in httpd.conf – How to Do It

On busy servers you might need to take off everything that is not used. If Apache logs are neither watched nor analyzed, you should simply turn them off. How to do it? Simply, as usual: open httpd.conf and unload #LoadModule log_config_module modules/mod_log_config.so by commenting this line. You should also search for various log strings that should be found… Read More »

Viewing Apache Server Status From Your Browser

Sometimes you need to have a look at Apache status, especially, if your server serves many users and if often busy. You should monitor you server’s CPU load, and view other Apache performance information. There is a simple solution in httpd.conf, that allows you to do this directly from your browser. All you need is just to add… Read More »

Encoding ASCII Characters in URL – PHP Solution

Sometimes you need to encode the whole URL, not just specific characters that are encoded with urlencode(). You might need to represent your query string or anything else as shown at W3C School. There is quite a simple solution in PHP: <? $string=”some-string”; for ($i=0; $i<strlen($url); $i++) { $mass[$i]=”%”.dechex(ord($url{$i})); } $encoded_string=implode(“”, $mass); ?> In the sample provided the… Read More »

How To Enable Register Globals in PHP Without Access to php.ini

Sometimes you need to use the variables passed to script avoiding usage of superglobal arrays. If you are on shared hosting, you won’t have access to your php.ini file and won’t be able to change register_globals setting. A simple function will help you to do this. <? /** * function to emulate the register_globals setting in PHP *… Read More »

Installing PHP On A Clean Server

If you just got a clean server without PHP installed and you are trying to do this, you might receive the following error: configure: error: no acceptable cc found in $PATH. This means you don’t have c compiler installed. Just type in yum install gcc and install all the necessary libs. Then you might receive the following message… Read More »

How To Lower Directadmin Server Load

If you’re using Directadmin, you might have noticed that once a day it slows down the server. There is an easy solution to make this run without affecting too much on the server performance. If you wanted to slow down the dataskq, edit: /etc/cron.d/directadmin_cron (or /etc/crontab, depending on your OS) change: Code: * * * * * root… Read More »