I’m having trouble getting the ForceType to function when trying to use a extensionless file name.
I have a vm development box, os details at bottom of post (centos 6.4, httpd 2.2.15, php 5.5.3)
I have the following in my VirtualServer’s public_html
#ls -al no-extension-test
-rw-r--r-- 1 phptesting phptesting 27 Aug 19 01:55 no-extension-test
Its contents are :
<?php
echo “a simple test”;
?>
Then in my .htaccess I have :
RewriteEngine On
<Files “no-extension-test”>
#1
#ForceType application/x-httpd-php
#2
#ForceType fcgid-script
#3
#SetHandler fcgid-script
#4
#ForceType application/x-httpd-php
When I use #1 or #4, I get a blank page but if I view source then I get the source code for the no-extension-test file
When I use #2 or #3, I get a Internal Server Error with the following in the logs
[Mon Aug 19 02:07:23 2013] [warn] [client x.x.x.x] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Mon Aug 19 02:07:23 2013] [error] [client x.x.x.x] Premature end of script headers: no-extension-test
I have another page, phpinfo.php (it works find)
Anyone have any suggestions ?
Any pointers on what to try next?
#-- Info
cat /etc/redhat-release
CentOS release 6.4 (Final)
uname -a
Linux devbox.nunya.lan 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 23:51:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
php -v
PHP 5.3.3 (cli) (built: Jul 12 2013 20:35:47)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
httpd -V
Server version: Apache/2.2.15 (Unix)
Server built: May 17 2013 13:42:07
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"