Categories: Linux Servers

Enable htscanner for .htaccess to work with suPHP/FastCGI

First, install htscanner from WHM > Module Installers > PHP Pecl > htscanner

This will allow php_value and php_flag to work with php.

Next for it to also work with Apache without the need to use ifmodule

# cd /usr/src/
# wget http://pecl.php.net/get/htscanner-1.0.1.tgz
# tar -zxf htscanner-1.0.1.tgz
# cd htscanner-1.0.1

IMPORTANT: Make sure apache has mod_so and then proceed remaining steps

# /usr/local/apache/bin/httpd -l | grep mod_so.c
mod_so.c

Compile the module by

/usr/local/apache/bin/apxs -c -a -i mod_htscanner2.c

Restart apache

# /usr/local/apache/bin/apachectl configtest
# /usr/local/apache/bin/apachectl restart
# /usr/local/cpanel/bin/apache_conf_distiller –update

And a final check

# grep mod_htscanner2.so /usr/local/apache/conf/httpd.conf
LoadModule htscanner_module modules/mod_htscanner2.so

php_value and php_flag should now be working fine in .htaccess

Admin

Share
Published by
Admin

Recent Posts

Enable Outgoing SMTP Server Authentication

All our servers need you to enable outgoing SMTP server authentication to be able to…

4 years ago

Plesk Tutorials – How to configure DNS for a domain in Plesk

Learn how to configure and check your DNS settings in Plesk. After you registered your…

5 years ago

cPanel Tutorials – Force HTTPS Redirect

This video demonstrates how to use the Force HTTPS Redirect feature. This feature allows you…

5 years ago

cPanel Tutorials – MultiPHP Manager

Use cPanel's MultiPHP Manager to manage your domains' PHP version. Being able to manage the…

5 years ago

Email account setup in Outlook 2016

This tutorial will help you to configure Microsoft Outlook 2016 for an email account. Step…

5 years ago

Message Queueing

Generally emails are directly delivered to the destination server. However, if the delivery attempt to…

5 years ago