htaccess php_flag not allowed here

By | June 13, 2011

If using this code <IfModule mod_php5.c> #Turn off php register globals php_flag register_globals off </IfModule> gives the error : .htaccess: php_flag not allowed here in /var/log/apache/error.log Then Options should be added to AllowOverride in : /etc/apache2/sites-available/default AllowOverride FileInfo Options like this <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride FileInfo Options Order allow,deny allow from all… Read More »

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 file [email protected]:/$ find / -name '' 2> /dev/null /usr/lib/php5/20060613/ An alternative command to find the 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 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 »