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 »

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 »