Tag: addhandler
Running CGI script from any directory or via /~username/cgi-bin
by admin on Dec.23, 2011, under DirectAdmin
In order to force apache to allow cgi script to run, simply create a file called .htaccess inside the directory in which you wish to run the scripts. Insert this text into the file:
Options +ExecCGI
AddHandler cgi-script .cgi .pl
Incoming search terms:
menggunakan AddHandler cgi-script cgi plSwapping between php versions when using suPHP and CLI with custombuild
by admin on Oct.03, 2011, under DirectAdmin
If you have both suPHP and CLI installed on your system, but don’t feel like renaming all of your file.php to file.php4 (for example), there is another means to chose between php versions, without requiring to touch your php files.
To force php files to use CLI (on the assumption your default php version uses suPHP) create an .htaccess file in your public_html directory, with the following:
<FilesMatch "\.php$">
AddHandler application/x-httpd-php .php
</FilesMatch>
To force php files to use suPHP (on the assumption your default php version uses CLI) use the following:
<FilesMatch "\.php$">
AddHandler x-httpd-php5 .php
</FilesMatch>
This last one is on the assumption that php 5 is suPHP and CLI is php4. If php4 was suPHP, then you’d use x-httpd-php4 to force .php files to use suPHP with php 4.
