Re: [users@httpd] How to make Apache mod_deflate and Transfer-encoding : Chunked work together?

2012-02-01 Thread Matus UHLAR - fantomas

On 1/27/2012 2:50 PM, sameer shah wrote:
As you can see in above 2 headers chunking is working only if 
the compression is turned off.


On 27.01.12 15:37, William A. Rowe Jr. wrote:

Chunking is not a feature that the client gets to choose.
Your client code is badly written if it is that fragile.



On 1/31/2012 9:37 AM, Matus UHLAR - fantomas wrote:
IIUC, it's not badly written client code, but a want from webserver 
admin, that seems not to be fullfillable with current 
apache/mod_deflate...


On 31.01.12 11:07, William A. Rowe Jr. wrote:

No.  Protocols and specifications exist for a reason.  Even *IF* you
could force chunk behavior at the origin server, you would be incapable
of producing the same results as the request travels through forward,
reverse and transparent proxies outside of that administrators control.


Of course. But the original question was, why is chunking not used, 
even when Content-Length was not sent? I don't know HTTP/1.1 enough to 
answwer this question, do you?


--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
LSD will make your ECS screen display 16.7 million colors

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] mod rewrite question https to http

2012-02-01 Thread Roland RoLaNd

Dear all,
I'm a complete newbie to apache and i've inherited a virtual host setup.i have 
the need to redirect all traffic from https to http (443 to 80, yes that is 
correct)

the relevant rewrite rules in httpd.conf are as such:
# all other traffic is redirected to the SSL siteRewriteEngine On
RewriteRule ^/cgi-bin/u/testing.cgi - [L]RewriteRule ^/cgi-bin/voice - [L]  
  RewriteRule ^/cgi-bin/testing2.cgi - [L]RewriteRule 
^/cgi-bin/u/results.pl - [L]RewriteRule ^/audio - [L]   RewriteRule ^/gram 
- [L]   RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [L,R=301]
Any advice on how to force all https links to be redirected to http ?
Thanks in advance 

[users@httpd] Experiencing odd, possibly JPEG-specific slowdowns

2012-02-01 Thread Angus McIntyre
I'm in the process of moving a domain from a virtual host on a physical box 
(CentOS 5.5, Apache 2.0.6.3) to a virtual host on a VPS (CentOS 6.2, Apache 
2.2.21). The two machines (one physical, one virtual) should have broadly 
similar performance and memory availability; the physical box is more 
heavily-loaded, and hosts vastly more sites. The VPS is essentially idling. 

The old domain is hosted by my ISP, so I don't have information about the 
options used to build the Apache, or the httpd.conf that it uses. The Apache on 
the new box was built with the prefork MPM, and the httpd.conf is almost 
unchanged from the standard default conf. I've turned on name-based virtual 
hosts and added some AddOutputFilterByType rules to direct compressible content 
(HTML, CSS etc, but not images) to mod_deflate, but that's about all.

When I fetch pages from the new server using a web browser, it's noticeably 
slower than fetching the same content from the old server. There are two 
particular problem cases that I have seen.

1. HTML page with thumbnails

When I fetch a simple static HTML page with a number of embedded thumbnails in 
it, there is frequently a noticeable delay before some of the thumbnails load 
from the new server. Looking at the graph in Firebug, I see that the initial 
HTML and CSS loads, we reach the DOMContentLoaded point, and then the browser 
goes into a long - almost one second - wait for the first three thumbnails. 
From the graph it seems that the browser is fetching six content items in 
parallel: 3 GIF images (200 bytes to 2.5K) download almost instantly, while the 
3 JPEG images (1.7-2K) are held up for over a second.

On the older server, this doesn't happen, or happens much less: everything 
seems to be delivered much more quickly, with only the last JPEG forced to wait 
for any length of time.

2. Isolated JPEG

The second oddity occurs when I download a single unembedded JPEG image (84K) 
in my browser. On the new server, the image can take up to 14 seconds to 
download; on the older server, it consistently arrives in less then .5s. 
Firebug shows the bulk of the time being taken up by 'waiting'.

The obvious suspicion would be that the old server is on a faster connection, 
but if I download the same image from the two servers using curl, the image 
actually downloads about 10% faster from the new server than the old one. As 
far as I can tell, the connection to my new server is actually faster.

I'm testing using Firefox on a Mac simply because Firebug gives me pretty 
graphs, but I've been able to reproduce the same problem with other browsers, 
including Chrome, Raven, Internet Explorer on Windows 7, and even Mobile Safari 
on iOS 5. Very occasionally, I can get very slow transfers when testing with 
curl or libwww-Perl.

I tried enabling 'sendfile' and 'mmap' on the new server but didn't notice any 
difference.

Can anyone suggest what's going on here, and if there are any configuration 
settings that I could apply to try to make the new server perform as well as 
the older one?

Thanks in advance for any help,

Angus
-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] Experiencing odd, possibly JPEG-specific slowdowns

2012-02-01 Thread DENIS Laurent
Enable the %D in the logs - it will tell you how long the server takes
to serve the query, in microseconds. It can be very long from client
side but fast from server side - and even if slow from server side, it
can be the client that hangs in the middle of the transaction (for very
large ressources - not really your case).

I had a similar problem - up to 120 seconds to serve some static
resources,  for around 0.5% of the queries. I wrote a script to test
this (making thousands of requests and showing only the ones that are
slow to match in the logs), even in local it took the same time - if
interested let me know I'll send it to you.

I'm still not able to tell why it behave that way, it disappeared
(almost) when we moved from prefork to worker mode. All I saw was 2 or 3
occurences of 2sec for a small gif.



-Original Message-
From: Angus McIntyre [mailto:an...@pobox.com] 
Sent: Wednesday 1 February 2012 15:56
To: users@httpd.apache.org
Subject: [users@httpd] Experiencing odd, possibly JPEG-specific
slowdowns

I'm in the process of moving a domain from a virtual host on a physical
box (CentOS 5.5, Apache 2.0.6.3) to a virtual host on a VPS (CentOS 6.2,
Apache 2.2.21). The two machines (one physical, one virtual) should have
broadly similar performance and memory availability; the physical box is
more heavily-loaded, and hosts vastly more sites. The VPS is essentially
idling. 

The old domain is hosted by my ISP, so I don't have information about
the options used to build the Apache, or the httpd.conf that it uses.
The Apache on the new box was built with the prefork MPM, and the
httpd.conf is almost unchanged from the standard default conf. I've
turned on name-based virtual hosts and added some AddOutputFilterByType
rules to direct compressible content (HTML, CSS etc, but not images) to
mod_deflate, but that's about all.

When I fetch pages from the new server using a web browser, it's
noticeably slower than fetching the same content from the old server.
There are two particular problem cases that I have seen.

1. HTML page with thumbnails

When I fetch a simple static HTML page with a number of embedded
thumbnails in it, there is frequently a noticeable delay before some of
the thumbnails load from the new server. Looking at the graph in
Firebug, I see that the initial HTML and CSS loads, we reach the
DOMContentLoaded point, and then the browser goes into a long - almost
one second - wait for the first three thumbnails. From the graph it
seems that the browser is fetching six content items in parallel: 3 GIF
images (200 bytes to 2.5K) download almost instantly, while the 3 JPEG
images (1.7-2K) are held up for over a second.

On the older server, this doesn't happen, or happens much less:
everything seems to be delivered much more quickly, with only the last
JPEG forced to wait for any length of time.

2. Isolated JPEG

The second oddity occurs when I download a single unembedded JPEG image
(84K) in my browser. On the new server, the image can take up to 14
seconds to download; on the older server, it consistently arrives in
less then .5s. Firebug shows the bulk of the time being taken up by
'waiting'.

The obvious suspicion would be that the old server is on a faster
connection, but if I download the same image from the two servers using
curl, the image actually downloads about 10% faster from the new server
than the old one. As far as I can tell, the connection to my new server
is actually faster.

I'm testing using Firefox on a Mac simply because Firebug gives me
pretty graphs, but I've been able to reproduce the same problem with
other browsers, including Chrome, Raven, Internet Explorer on Windows 7,
and even Mobile Safari on iOS 5. Very occasionally, I can get very slow
transfers when testing with curl or libwww-Perl.

I tried enabling 'sendfile' and 'mmap' on the new server but didn't
notice any difference.

Can anyone suggest what's going on here, and if there are any
configuration settings that I could apply to try to make the new server
perform as well as the older one?

Thanks in advance for any help,

Angus
-
The official User-To-User support forum of the Apache HTTP Server
Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

*DISCLAIMER*

This electronic transmission (and any attached document) is intended 
exclusively for the person or entity to whom it is addressed and may 
contain confidential and/or privileged material. 
Any disclosure, copying, distribution or other action  based upon 
the information by persons or entities other than the intended recipient
is prohibited. If you receive this message in error, please contact the 
sender and delete the material from any and all computers. 
Mobistar does 

[users@httpd] Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_mysql' - ....

2012-02-01 Thread Darryle Steplight
Hello Everyone,
My name is Darryle. I've installed PHP 5.3.9 on my CentOs box and
some numerous modules via yum. Some of those modules are  PDO,
PDO_MYSQL and PDO_SQLITE. However, my PHP configuration is not
recognizing my PDO_MYSQL module.  I can verify that these modules
exists by looking in my /etc/php.d/ folder.  I'm also including the
PDO and PDO_MYSQL extensions in my httpd.conf file after my
extension_dir=/path/to/modules/ declaration.  When I run php -i | grep
pdo this is what I see

]# php -i | grep pdo
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/php_pdo' - /usr/lib64/php/modules/php_pdo:
cannot open shared object file: No such file or directory in Unknown
on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/php_pdo_mysql' -
/usr/lib64/php/modules/php_pdo_mysql: cannot open shared object file:
No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.15: cannot open
shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.15: cannot open
shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.15: cannot
open shared object file: No such file or directory in Unknown on line
0
Configure Command =  './configure'  '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com'
'--mandir=/usr/share/man' '--infodir=/usr/share/info'
'--cache-file=../config.cache' '--with-libdir=lib64'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug'
'--with-pic' '--disable-rpath' '--without-pear' '--with-bz2'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf'
'--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv'
'--with-jpeg-dir=/usr' '--with-openssl' '--with-zlib'
'--with-layout=GNU' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos'
'--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar'
'--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml'
'--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl'
'--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared'
'--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared'
'--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared'
'--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/lib64/mysql/mysql_config'
'--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared'
'--with-snmp=shared,/usr' '--enable-soap=shared'
'--with-xsl=shared,/usr' '--enable-xmlreader=shared'
'--enable-xmlwriter=shared' '--with-curl=shared,/usr'
'--enable-fastcgi' '--enable-pdo=shared'
'--with-pdo-odbc=shared,unixODBC,/usr'
'--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config'
'--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr'
'--with-pdo-dblib=shared,/usr' '--without-sqlite3'
'--enable-json=shared' '--enable-zip=shared' '--with-readline'
'--with-pspell=shared' '--enable-phar=shared'
'--with-mcrypt=shared,/usr' '--with-tidy=shared,/usr'
'--with-mssql=shared,/usr' '--enable-sysvmsg=shared'
'--enable-sysvshm=shared' '--enable-sysvsem=shared'
'--enable-posix=shared' '--with-unixODBC=shared,/usr'
'--enable-fileinfo=shared' '--enable-intl=shared'
'--with-icu-dir=/usr' '--with-recode=shared,/usr'
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
PHP Warning:  Unknown: It is not safe to rely on the system's timezone
settings. You are *required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those
methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no
DST' instead in Unknown on line 0
pdo_sqlite

and if I run php -m, this is  a sample pf what I see  (  I still see
the same warnings that I see from above )
pcre
PDO
pdo_sqlite
Phar


What do I need to do to make my php configuration recognize my
pdp_mysql module? Being that's i'm a LAMP Developer, I have frameworks
that I use that require PDO_MYSQL to exist.


-- 
--
May the Source be with you.

-
The official User-To-User support forum of the Apache HTTP 

Re: [users@httpd] How to make Apache mod_deflate and Transfer-encoding : Chunked work together?

2012-02-01 Thread William A. Rowe Jr.
On 2/1/2012 3:48 AM, Matus UHLAR - fantomas wrote:
 
 Of course. But the original question was, why is chunking not used, even when
 Content-Length was not sent? I don't know HTTP/1.1 enough to answwer this 
 question, do you?

Yes; because the entire C-L is known and the overhead for C-L plus
fragment header/trailer is longer than a simple C-L header.

The original question was, How do I force chunking.  The answer
is, you don't and can't expect to.  Chunking is a hop-by-hop
behavior over which you have no control by either endpoint of the
intermediate servers' elections.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_mysql' - ....

2012-02-01 Thread Yehuda Katz
On Wed, Feb 1, 2012 at 12:55 PM, Darryle Steplight dstepli...@gmail.comwrote:

 PHP Warning:  PHP Startup: Unable to load dynamic
 library '/usr/lib64/php/modules/php_pdo' -
 /usr/lib64/php/modules/php_pdo:cannot open shared object file: No such file
 or directory in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic
 library '/usr/lib64/php/modules/php_pdo_mysql'
 - /usr/lib64/php/modules/php_pdo_mysql: cannot open shared object file: No
 such file or directory in Unknown on line 0

[TRUNCATED SIMILAR ERRORS]


Did you check if the files (in /usr/lib64/php) are actually there?
Are the configuration files in /etc/php.d/ created by you or by YUM?
I have heard of issues with YUM installing the wrong components on 64-bit
systems, but I have never been able to reproduce it.
Unless you know you will need more then 4GB of memory (or a few other
circumstances), I always recommend installing 32-bit versions (OS and
server) because the server will use less memory that way and you will not
have as much trouble with your extensions.

- Y


Re: [users@httpd] Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_mysql' - ....

2012-02-01 Thread Darryle Steplight
They are in /usr/lib64/php/modules/ . I can see pdo_mysql.so  in that
folder. The configurations in /etc/php.d/ are created by YUM . So are
you suggesting that I installed PHP by source instead?

On Wed, Feb 1, 2012 at 2:09 PM, Yehuda Katz yeh...@ymkatz.net wrote:
 On Wed, Feb 1, 2012 at 12:55 PM, Darryle Steplight dstepli...@gmail.com
 wrote:

 PHP Warning:  PHP Startup: Unable to load dynamic
 library '/usr/lib64/php/modules/php_pdo' -
 /usr/lib64/php/modules/php_pdo:cannot open shared object file: No such file
 or directory in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic
 library '/usr/lib64/php/modules/php_pdo_mysql'
 - /usr/lib64/php/modules/php_pdo_mysql: cannot open shared object file: No
 such file or directory in Unknown on line 0

 [TRUNCATED SIMILAR ERRORS]


 Did you check if the files (in /usr/lib64/php) are actually there?
 Are the configuration files in /etc/php.d/ created by you or by YUM?
 I have heard of issues with YUM installing the wrong components on 64-bit
 systems, but I have never been able to reproduce it.
 Unless you know you will need more then 4GB of memory (or a few other
 circumstances), I always recommend installing 32-bit versions (OS and
 server) because the server will use less memory that way and you will not
 have as much trouble with your extensions.

 - Y



-- 
--
May the Source be with you.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] mod rewrite question https to http

2012-02-01 Thread Igor Cicimov
Put the last rewrite rule inside your ssl virtual host and change https to
http.
On Feb 2, 2012 12:29 AM, Roland RoLaNd r_o_l_a_...@hotmail.com wrote:

  Dear all,

 I'm a complete newbie to apache and i've inherited a virtual host setup.
 i have the need to redirect all traffic from https to http (443 to 80, yes
 that is correct)

 the relevant rewrite rules in httpd.conf are as such:

 # all other traffic is redirected to the SSL site
 RewriteEngine On
 RewriteRule ^/cgi-bin/u/testing.cgi - [L]
 RewriteRule ^/cgi-bin/voice - [L]
 RewriteRule ^/cgi-bin/testing2.cgi - [L]
 RewriteRule ^/cgi-bin/u/results.pl - [L]
 RewriteRule ^/audio - [L]
RewriteRule ^/gram - [L]
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [L,R=301]

 Any advice on how to force all https links to be redirected to http ?

 Thanks in advance



Re: [users@httpd] How to make Apache mod_deflate and Transfer-encoding : Chunked work together?

2012-02-01 Thread sameer shah
Hi William,

I have seen web sites forcing the chunked transfer-encoding as well as gzip
content encoding. One of the biggest example is *facebook*. And
*facebook*uses apache on linux.

Please refer this link on progressive rendering using chunked transfer
encoding.

http://www.phpied.com/progressive-rendering-via-multiple-flushes/

If you search big pipe on web you will find plenty of references of using
chunked transfer encoding.

Also apache does allow chunking if I don't enable mod_deflate module. Old
mod_gzip module which was packaged with old apache 1.3 had an directive
specifically for not dechunking.
*
*
*mod_gzip_dechunk  No*

So status right now is if i don't use compression on apache response is
sent chunk by chunk.

Thanks
Sameer

On Wed, Feb 1, 2012 at 10:50 AM, William A. Rowe Jr. wr...@rowe-clan.netwrote:

 On 2/1/2012 3:48 AM, Matus UHLAR - fantomas wrote:
 
  Of course. But the original question was, why is chunking not used, even
 when
  Content-Length was not sent? I don't know HTTP/1.1 enough to answwer
 this question, do you?

 Yes; because the entire C-L is known and the overhead for C-L plus
 fragment header/trailer is longer than a simple C-L header.

 The original question was, How do I force chunking.  The answer
 is, you don't and can't expect to.  Chunking is a hop-by-hop
 behavior over which you have no control by either endpoint of the
 intermediate servers' elections.

 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org