Cgi bin directory for each user in Apache

By | May 9, 2020

This page describes how to give each user his own cg-bin directory. The following lines should be added to the Apache configuration file http.conf : <Directory /home/*/public_html/cgi-bin> Options ExecCGI SetHandler cgi-script </Directory> Along with this there are some more points to be kept in mind. If you .htaccess file has a section like this… Read More »


By | June 2, 2013

AcceptPathInfo Directive The AcceptPathInfo directive is a useful feature of apache. It detects any path information in a url following the actual script name and passes it to php as an environment variable in $_SERVER superglobal. Php mvc based frameworks often use such urls that have additional path information after a script name. This is… Read More »

Install apache mod rewrite on windows

By | September 30, 2009

In httpd.conf file the following line should be uncommented : LoadModule rewrite_module modules/ by removing the # sign before it. Then comes a section which looks like this : <Directory "C:/Apache2.2/htdocs"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews #… Read More »

List foreign keys in mysql

By | September 5, 2009

information_schema The following query will list out the foreign keys in mysql. It finds it out from the information_schema database. select concat(table_name, '.', column_name) as 'foreign key', concat(referenced_table_name, '.', referenced_column_name) as 'references' from information_schema.key_column_usage where referenced_table_name is not null; The output is a clean table listing out all foreign keys from all databases +———————–+————-+ |… Read More »

PHP Format numbers to Indian Numerical System

By | July 1, 2009

The numerical system used in India differs from the Western system in terms of the placement of the thousands separator. Example : Number -> 1000000 Indian System -> 10,00,000 (Ten Lakh) Western System -> 1,000,000 (1 Million) While echoing numbers in PHP it is possible to format numbers with such separators using functions like number_format…. Read More »