https://issues.apache.org/bugzilla/show_bug.cgi?id=47152
Summary: Apache is only serving the first character in the
requested file.
Product: Apache httpd-2
Version: 2.2.11
Platform: Other
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: All
AssignedTo: [email protected]
ReportedBy: [email protected]
In short: Apache is only serving the first character in the requested file
(that is not a PHP file)
This has got to be one of the strangest bugs I've ever seen.
Here is an example of the problem.
DirectoryIndex index.txt index.html
---
root[ /sources/httpd-2.2.11 ] # telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
Host: eboyjr.ath.cx:8080
HTTP/1.1 200 OK
Date: Sun, 03 May 2009 20:07:19 GMT
Server: Apache/2.2.11 (Unix) DAV/2
Last-Modified: Sun, 03 May 2009 19:57:27 GMT
ETag: "9db14-1-46907747ed7c0"
Content-Length: 1
Content-Type: text/plain
HConnection closed by foreign host.
root[ /sources/httpd-2.2.11 ] # cat /srv/www/htdocs/index.txt
Hello world.
---
Instead of displaying 'Hello world.' it says 'H'
For HTML docs it usually says '<' because of the DOCTYPE
---
Apache was compiled from scratch using the exact same procedure as stated in
the BLFS (Beyond Linux From Scratch) developmental version (6.4). However, it
seems that it is only affecting my own computer.
Here are the steps:
1) Download: http://archive.apache.org/dist/httpd/httpd-2.2.11.tar.bz2
3) Patch (just for the layout):
http://www.linuxfromscratch.org/patches/blfs/svn/httpd-2.2.11-config-1.patch
Submitted By: BLFS Book <[email protected]>
Date: 2005-12-14
Initial Package Version: 2.2.0 (patch rediffed from a 2.0.54 version)
Upstream Status: Not submitted (LFS specific)
Origin: BLFS Book
Description: Modify the FHS layout for installing Apache
diff -Naur httpd-2.2.0-orig/config.layout httpd-2.2.0/config.layout
--- httpd-2.2.0-orig/config.layout 2004-11-21 18:50:36.000000000 +0000
+++ httpd-2.2.0/config.layout 2005-12-14 21:07:24.000000000 +0000
@@ -322,3 +322,28 @@
installbuilddir: ${prefix}/etc/apache2/build
errordir: ${datadir}/error
</Layout>
+
+# BLFS FHS layout
+<Layout FHS>
+ prefix: /usr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/lib/apache
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc/apache
+ datadir: /srv/www
+ installbuilddir: ${libexecdir}/build
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+ htdocsdir: ${datadir}/htdocs
+ manualdir: ${datadir}/manual
+ cgidir: ${datadir}/cgi-bin
+ includedir: ${prefix}/include/apache
+ localstatedir: ${datadir}
+ runtimedir: /var/run
+ logfiledir: /var/log/apache
+ proxycachedir: /var/cache/apache/proxy
+</Layout>
+
diff -Naur httpd-2.2.0-orig/srclib/apr/config.layout
httpd-2.2.0/srclib/apr/config.layout
--- httpd-2.2.0-orig/srclib/apr/config.layout 2004-11-24 22:51:51.000000000
+0000
+++ httpd-2.2.0/srclib/apr/config.layout 2005-12-14 21:06:37.000000000 +0000
@@ -11,18 +11,18 @@
# Classical APR path layout designed for parallel installs.
<Layout apr>
- prefix: /usr/local/apr
+ prefix: /usr
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
- sbindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
- libexecdir: ${exec_prefix}/modules
- mandir: ${prefix}/man
- sysconfdir: ${prefix}/conf
- datadir: ${prefix}
- installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
- includedir: ${prefix}/include/apr-${APR_MAJOR_VERSION}
- localstatedir: ${prefix}
+ libexecdir: ${exec_prefix}/lib/apache
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc/apache
+ datadir: /srv/www
+ installbuilddir: ${libexecdir}/build
+ includedir: ${prefix}/include/apache
+ localstatedir: ${datadir}
libsuffix: -${APR_MAJOR_VERSION}
</Layout>
diff -Naur httpd-2.2.0-orig/srclib/apr-util/config.layout
httpd-2.2.0/srclib/apr-util/config.layout
--- httpd-2.2.0-orig/srclib/apr-util/config.layout 2005-02-09
12:18:43.000000000 +0000
+++ httpd-2.2.0/srclib/apr-util/config.layout 2005-12-14 21:06:37.000000000
+0000
@@ -11,18 +11,18 @@
# Classical APR-util path layout designed for parallel installs.
<Layout apr-util>
- prefix: /usr/local/apr
+ prefix: /usr
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
- sbindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
- libexecdir: ${exec_prefix}/modules
- mandir: ${prefix}/man
- sysconfdir: ${prefix}/conf
- datadir: ${prefix}
- installbuilddir: ${datadir}/build
- includedir: ${prefix}/include/apr-${APRUTIL_MAJOR_VERSION}
- localstatedir: ${prefix}
+ libexecdir: ${exec_prefix}/lib/apache
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc/apache
+ datadir: /srv/www
+ installbuilddir: ${libexecdir}/build
+ includedir: ${prefix}/include/apache
+ localstatedir: ${datadir}
libsuffix: -${APRUTIL_MAJOR_VERSION}
</Layout>
4) Commands
groupadd -g 25 apache &&
useradd -c "Apache Server" -d /dev/null -g apache \
-s /bin/false -u 25 apache
patch -Np1 -i ../httpd-2.2.11-config-1.patch
./configure --enable-layout=FHS --enable-mods-shared=all &&
make
make install &&
chown -v root:root /usr/lib/apache/httpd.exp \
/usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
/usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
/usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
/usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &&
chown -v -R apache:apache /srv/www
sed -i -e "s/User daemon/User apache/" \
-e "s/Group daemon/Group apache/" \
/etc/apache/httpd.conf
-----
Okay configuration... (the problem still exists with the default)
Compiler: GCC-4.3.2
http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/gcc.html
There were no CFLAGS or anything... :P
---
When the requested page is parsed by PHP, it works fine. e.g. phpinfo() or
anything else
---
I've included anything I could think of that distinguishes it from anything
else, but I know it's probably not helpful enough.
I can give you any more details if you ask...
Please help.. I've been at this for a week!
I have also compiled with 2.2.8 from BLFS 6.3
If I am making a complete fool of myself please tell me :), but this bug is
very very very very unusual!
http://www.linuxfromscratch.org/blfs/view/6.3/server/apache.html
I even tried commenting out some the modules, but with no success
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]