Url encoded forward slash in MVC or codeignitor app urls

By | June 23, 2010

When using PATH_INFO , the urls of codeignitor apps or your custom MVC looks like this index.php/controlller/method/param1/param2 or /controlller/method/param1/param2 Now if the parameters contain a forward slash then you would urlencode it as : index.php/controlller/method/par%2Fam1/param2 But opening that kind of URL would give an error : Page Not Found This happens if AllowEncodedSlashes directive of… Read More »

Install php xdebug profiler on ubuntu

By | April 7, 2010

Install Xdebug Install the packages from synaptic package manager sudo apt-get install php5-dev php5-xdebug Configure php to use xdebug extension Locate the path to xdebug.so file [email protected]:/$ find / -name ‘xdebug.so’ 2> /dev/null /usr/lib/php5/20060613/xdebug.so An alternative command to find the xdebug.so file is using dpkg and grep as follows $ dpkg -L php5-xdebug | grep… Read More »

Cgi bin directory for each user in Apache

By | May 9, 2020

This page http://httpd.apache.org/docs/2.2/howto/cgi.html 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 »

PATH_INFO, ORIG_PATH_INFO, APACHE and PHP

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/mod_rewrite.so 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 »