xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
416 stars 43 forks source link

Content Encoding Error #74

Closed meskarune closed 6 years ago

meskarune commented 6 years ago

I installed chyrp-lite on my freebsd server and the install was successful, however when I try to load the page I get an error, "Content encoding error, the page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression". I am using lighttpd + php-fpm and do not have compression enabled on them currently. My other php sites/scripts work, and the web server has no errors so I think it is the chyrp app that is the issue as it returns some html and then gzipped data mixed in, but either not sending the right headers or not doing something that is required for the server to serve pagers propertly.

07:18:57.047644 IP callisto.doloresportalatin.info.http > dsl-hkibng31-54fab7-93.dhcp.inet.fi.37258: Flags [.], seq 1:1449, ack 662, win 1026, options [nop,nop,TS val 3258394370 ecr 497618094], length 1448: HTTP: HTTP/1.1 403 Forbidden
    0x0000:  4520 05dc 0000 4000 3306 4ecb 68e9 7df0  E.....@.3.N.h.}.
    0x0010:  54fa b75d 0050 918a 3141 03cb 879d 7d89  T..].P..1A....}.
    0x0020:  8010 0402 7a11 0000 0101 080a c237 2702  ....z........7'.
    0x0030:  1da9 0cae 4854 5450 2f31 2e31 2034 3033  ....HTTP/1.1.403
    0x0040:  2046 6f72 6269 6464 656e 0d0a 582d 506f  .Forbidden..X-Po
    0x0050:  7765 7265 642d 4279 3a20 5048 502f 372e  wered-By:.PHP/7.
    0x0060:  302e 3331 0d0a 4578 7069 7265 733a 2054  0.31..Expires:.T
    0x0070:  6875 2c20 3139 204e 6f76 2031 3938 3120  hu,.19.Nov.1981.
    0x0080:  3038 3a35 323a 3030 2047 4d54 0d0a 4361  08:52:00.GMT..Ca
    0x0090:  6368 652d 436f 6e74 726f 6c3a 206e 6f2d  che-Control:.no-
    0x00a0:  7374 6f72 652c 206e 6f2d 6361 6368 652c  store,.no-cache,
    0x00b0:  206d 7573 742d 7265 7661 6c69 6461 7465  .must-revalidate
    0x00c0:  0d0a 5072 6167 6d61 3a20 6e6f 2d63 6163  ..Pragma:.no-cac
    0x00d0:  6865 0d0a 436f 6e74 656e 742d 5479 7065  he..Content-Type
    0x00e0:  3a20 7465 7874 2f68 746d 6c3b 2063 6861  :.text/html;.cha
    0x00f0:  7273 6574 3d55 5446 2d38 0d0a 5265 6665  rset=UTF-8..Refe
    0x0100:  7272 6572 2d50 6f6c 6963 793a 2073 7472  rrer-Policy:.str
    0x0110:  6963 742d 6f72 6967 696e 2d77 6865 6e2d  ict-origin-when-
    0x0120:  6372 6f73 732d 6f72 6967 696e 0d0a 5661  cross-origin..Va
    0x0130:  7279 3a20 4163 6365 7074 2d45 6e63 6f64  ry:.Accept-Encod
    0x0140:  696e 672c 2043 6f6f 6b69 650d 0a56 6172  ing,.Cookie..Var
    0x0150:  793a 2041 6363 6570 742d 456e 636f 6469  y:.Accept-Encodi
    0x0160:  6e67 0d0a 582d 5069 6e67 6261 636b 3a20  ng..X-Pingback:.
    0x0170:  6874 7470 3a2f 2f64 6f6c 6f72 6573 706f  http://dolorespo
    0x0180:  7274 616c 6174 696e 2e69 6e66 6f2f 696e  rtalatin.info/in
    0x0190:  636c 7564 6573 2f72 7063 2e70 6870 0d0a  cludes/rpc.php..
    0x01a0:  436f 6e74 656e 742d 456e 636f 6469 6e67  Content-Encoding
    0x01b0:  3a20 677a 6970 0d0a 436f 6e74 656e 742d  :.gzip..Content-
    0x01c0:  4c65 6e67 7468 3a20 3239 3535 0d0a 4461  Length:.2955..Da
    0x01d0:  7465 3a20 5361 742c 2031 3820 4175 6720  te:.Sat,.18.Aug.
    0x01e0:  3230 3138 2030 343a 3138 3a33 3120 474d  2018.04:18:31.GM
    0x01f0:  540d 0a53 6572 7665 723a 206c 6967 6874  T..Server:.light
    0x0200:  7470 642f 312e 342e 3439 0d0a 0d0a 3c21  tpd/1.4.49....<!
    0x0210:  444f 4354 5950 4520 6874 6d6c 2050 5542  DOCTYPE.html.PUB
    0x0220:  4c49 4320 222d 2f2f 5733 432f 2f44 5444  LIC."-//W3C//DTD
    0x0230:  2048 544d 4c20 332e 322f 2f45 4e22 3e0a  .HTML.3.2//EN">.
    0x0240:  3c68 746d 6c3e 0a3c 6865 6164 3e0a 3c74  <html>.<head>.<t
    0x0250:  6974 6c65 3e3c 2f74 6974 6c65 3e0a 3c2f  itle></title>.</
    0x0260:  6865 6164 3e0a 3c62 6f64 793e 0a26 2338  head>.<body>.&#8
    0x0270:  3234 393b 2669 6163 7574 653b 585b 6f26  249;&iacute;X[o&
    0x0280:  5563 6972 633b 367e 2669 756d 6c3b 266d  Ucirc;6~&iuml;&m
    0x0290:  6163 723b 6059 266e 6273 703b 2f26 2334  acr;`Y&nbsp;/&#4
    0x02a0:  3032 3b2d 2643 6365 6469 6c3b 4e26 6961  02;-&Ccedil;N&ia
    0x02b0:  6375 7465 3b36 266d 6963 726f 3b26 5448  cute;6&micro;&TH
    0x02c0:  4f52 4e3b 5b26 7375 7033 3b70 2623 3832  ORN;[&sup3;p&#82
    0x02d0:  3530 3b26 2337 3332 3b2d 2673 6563 743b  50;&#732;-&sect;
    0x02e0:  2661 6375 7465 3b69 2b6a 2663 6365 6469  &acute;i+j&ccedi
    0x02f0:  6c3b 2623 3832 3236 3b49 2126 4174 696c  l;&#8226;I!&Atil
    0x0300:  6465 3b0a 2623 3137 3b0a 2679 656e 3b26  de;.&#17;.&yen;&
    0x0310:  6d69 6372 6f3b 2645 6369 7263 3b26 2338  micro;&Ecirc;&#8
    0x0320:  3231 383b 2623 3832 3236 3b26 6f72 646d  218;&#8226;&ordm
    0x0330:  3b26 2337 3332 3b26 5961 6375 7465 3b58  ;&#732;&Yacute;X
    0x0340:  6b26 6975 6d6c 3b26 6c61 7175 6f3b 2623  k&iuml;&laquo;&#
    0x0350:  3832 3330 3b0a 266f 7264 663b 2664 6976  8230;.&ordf;&div
    0x0360:  6964 653b 2649 6369 7263 3b6c 2675 756d  ide;&Icirc;l&uum
    0x0370:  6c3b 2641 6369 7263 3b3b 266f 6369 7263  l;&Acirc;;&ocirc
    0x0380:  3b26 2338 3235 303b 2673 7570 333b 2655  ;&#8250;&sup3;&U
    0x0390:  6369 7263 3b26 6563 6972 633b 264f 756d  circ;&ecirc;&Oum
    0x03a0:  6c3b 2673 7570 313b 2349 7426 6d69 6464  l;&sup1;#It&midd
    0x03b0:  6f74 3b26 5448 4f52 4e3b 2623 3832 3230  ot;&THORN;&#8220
    0x03c0:  3b26 706c 7573 6d6e 3b26 4563 6972 633b  ;&plusmn;&Ecirc;
    0x03d0:  3226 6e6f 743b 2641 6369 7263 3b26 7365  2&not;&Acirc;&se
    0x03e0:  6374 3b26 616d 703b 2661 6772 6176 653b  ct;&amp;&agrave;
    0x03f0:  2726 6163 7574 653b 2669 6772 6176 653b  '&acute;&igrave;
    0x0400:  2623 3333 383b 264e 7469 6c64 653b 2d26  &#338;&Ntilde;-&
    0x0410:  6163 6972 633b 4e72 2654 484f 524e 3b26  acirc;Nr&THORN;&
    0x0420:  4563 6972 633b 2673 7570 323b 3d0a 2666  Ecirc;&sup2;=.&f
    0x0430:  7261 6333 343b 3a5c 2661 6d70 3b26 6465  rac34;:\&amp;&de
    0x0440:  673b 266f 736c 6173 683b 6b3d 264f 736c  g;&oslash;k=&Osl
    0x0450:  6173 683b 4826 7567 7261 7665 3b26 4563  ash;H&ugrave;&Ec
    0x0460:  6972 633b 2666 7261 6333 343b 7622 4c41  irc;&frac34;v"LA
    0x0470:  7538 7726 6163 6972 633b 2655 6772 6176  u8w&acirc;&Ugrav
    0x0480:  653b 3826 756d 6c3b 2623 3832 3430 3b36  e;8&uml;&#8240;6
    0x0490:  5226 4561 6375 7465 3b26 7375 7032 3b26  R&Eacute;&sup2;&
    0x04a0:  7265 673b 2649 6163 7574 653b 4c26 2332  reg;&Iacute;L&#2
    0x04b0:  373b 5726 2338 3232 313b 2623 3832 3232  7;W&#8221;&#8222
    0x04c0:  3b26 4975 6d6c 3b49 2c26 2337 3332 3b26  ;&Iuml;I,&#732;&
    0x04d0:  4145 6c69 673b 2623 3832 3230 3b26 7365  AElig;&#8220;&se
    0x04e0:  6374 3b53 2623 3338 323b 2655 6772 6176  ct;S&#382;&Ugrav
    0x04f0:  653b 2661 6369 7263 3b38 574b 7852 2826  e;&acirc;8WKxR(&
    0x0500:  2338 3232 313b 2659 6163 7574 653b 7e26  #8221;&Yacute;~&
    0x0510:  2338 3232 303b 4826 2338 3231 363b 7926  #8220;H&#8216;y&
    0x0520:  2333 3736 3b78 353f 3766 2673 6879 3b36  #376;x5?7f&shy;6
    0x0530:  2659 6163 7574 653b 2641 6163 7574 653b  &Yacute;&Aacute;
    0x0540:  2665 6163 7574 653b 2661 7469 6c64 653b  &eacute;&atilde;
    0x0550:  2623 3833 3634 3b26 6965 7863 6c3b 2643  &#8364;&iexcl;&C
    0x0560:  6365 6469 6c3b 2665 6163 7574 653b 2645  cedil;&eacute;&E
    0x0570:  6163 7574 653b 2623 3832 3234 3b3f 2641  acute;&#8224;?&A
    0x0580:  6772 6176 653b 2623 3335 323b 3826 7961  grave;&#352;8&ya
    0x0590:  6375 7465 3b26 636f 7079 3b26 2338 3233  cute;&copy;&#823
    0x05a0:  303b 2623 3333 393b 266f 7264 663b 2223  0;&#339;&ordf;"#
    0x05b0:  7541 5a26 2333 3832 3b2a 6726 4167 7261  uAZ&#382;*g&Agra
    0x05c0:  7665 3b26 6963 6972 633b 4d26 2338 3232  ve;&icirc;M&#822
    0x05d0:  303b 2a26 2333 3338 3b24 5736            0;*&#338;$W6
07:18:57.047659 IP dsl-hkibng31-54fab7-93.dhcp.inet.fi.37258 > callisto.doloresportalatin.info.http: Flags [.], ack 1449, win 251, options [nop,nop,TS val 497618335 ecr 3258394370], length 0
    0x0000:  4500 0034 76d3 4000 4006 d0bf 54fa b75d  E..4v.@.@...T..]
    0x0010:  68e9 7df0 918a 0050 879d 7d89 3141 0973  h.}....P..}.1A.s
    0x0020:  8010 00fb f357 0000 0101 080a 1da9 0d9f  .....W..........
    0x0030:  c237 2702                                .7'.
07:18:57.047915 IP callisto.doloresportalatin.info.http > dsl-hkibng31-54fab7-93.dhcp.inet.fi.37258: Flags [.], seq 1449:2897, ack 662, win 1026, options [nop,nop,TS val 3258394370 ecr 497618094], length 1448: HTTP
    0x0000:  4500 05dc 0000 4000 3306 4eeb 68e9 7df0  E.....@.3.N.h.}.
    0x0010:  54fa b75d 0050 918a 3141 0973 879d 7d89  T..].P..1A.s..}.
    0x0020:  8010 0402 2231 0000 0101 080a c237 2702  ...."1.......7'.
    0x0030:  1da9 0cae 2623 3832 3234 3b26 5961 6375  ....&#8224;&Yacu
    0x0040:  7465 3b23 3726 2333 3338 3b26 4f74 696c  te;#7&#338;&Otil
    0x0050:  6465 3b26 4f75 6d6c 3b2a 2623 3731 303b  de;&Ouml;*&#710;
    0x0060:  2643 6365 6469 6c3b 655e 2623 3335 333b  &Ccedil;e^&#353;
    0x0070:  266d 6963 726f 3b74 264f 6163 7574 653b  &micro;t&Oacute;
    0x0080:  2a26 6d69 6372 6f3b 4f53 266e 6f74 3b26  *&micro;OS&not;&
    0x0090:  6575 6d6c 3b26 6971 7565 7374 3b26 2338  euml;&iquest;&#8
    0x00a0:  3232 363b 500a 6726 4961 6375 7465 3b26  226;P.g&Iacute;&
    0x00b0:  2338 3438 323b 2826 6e74 696c 6465 3b26  #8482;(&ntilde;&
    0x00c0:  2338 3231 373b 5c26 6465 673b 5225 4026  #8217;\&deg;R%@&
    0x00d0:  4f67 7261 7665 3b26 6365 6469 6c3b 2673  Ograve;&cedil;&s
    0x00e0:  6879 3b5e 2662 7276 6261 723b 0a26 4975  hy;^&brvbar;.&Iu
    0x00f0:  6d6c 3b26 737a 6c69 673b 2667 743b 2623  ml;&szlig;&gt;&#
    0x0100:  3333 393b 6337 4d4c 2645 6369 7263 3b35  339;c7ML&Ecirc;5
    0x0110:  2641 6163 7574 653b 2663 656e 743b 5764  &Aacute;&cent;Wd
    0x0120:  2623 3832 3236 3b26 4145 6c69 673b 2859  &#8226;&AElig;(Y
    0x0130:  4326 6563 6972 633b 3226 4563 6972 633b  C&ecirc;2&Ecirc;
    0x0140:  7826 6163 7574 653b 2623 3338 323b 2623  x&acute;&#382;&#
    0x0150:  3335 333b 3826 5961 6375 7465 3b71 2661  353;8&Yacute;q&a
    0x0160:  6772 6176 653b 264f 756d 6c3b 2655 6369  grave;&Ouml;&Uci
    0x0170:  7263 3b26 2338 3231 383b 2655 6772 6176  rc;&#8218;&Ugrav
    0x0180:  653b 2655 756d 6c3b 266e 6f74 3b0a 573f  e;&Uuml;&not;.W?
    0x0190:  2a52 2661 6772 6176 653b 0a44 266e 6f74  *R&agrave;.D&not
    0x01a0:  3b58 2623 3832 3236 3b26 6f72 646d 3b32  ;X&#8226;&ordm;2
    0x01b0:  2663 6365 6469 6c3b 2661 6d70 3b7d 2645  &ccedil;&amp;}&E
    0x01c0:  6772 6176 653b 2663 6f70 793b 6e56 264e  grave;&copy;nV&N
    0x01d0:  7469 6c64 653b 2649 6163 7574 653b 2679  tilde;&Iacute;&y
    0x01e0:  756d 6c3b 2673 7570 313b 2672 6567 3b2e  uml;&sup1;&reg;.
    0x01f0:  2726 7975 6d6c 3b26 2338 3438 323b 2675  '&yuml;&#8482;&u
    0x0200:  6163 7574 653b 3626 4161 6375 7465 3b26  acute;6&Aacute;&
    0x0210:  5563 6972 633b 264f 756d 6c3b 2673 7570  Ucirc;&Ouml;&sup
    0x0220:  313b 7570 2645 6772 6176 653b 2623 3832  1;up&Egrave;&#82
    0x0230:  3137 3b26 7561 6375 7465 3b26 6967 7261  17;&uacute;&igra
    0x0240:  7665 3b26 7265 673b 2645 6369 7263 3b49  ve;&reg;&Ecirc;I
    0x0250:  2666 7261 6331 343b 5d26 2333 3339 3b26  &frac14;]&#339;&
    0x0260:  4163 6972 633b 266f 6369 7263 3b26 2333  Acirc;&ocirc;&#3
    0x0270:  3339 3b75 2623 3832 3439 3b6c 4326 6365  39;u&#8249;lC&ce
    0x0280:  6469 6c3b 2641 6163 7574 653b 264f 756d  dil;&Aacute;&Oum
    0x0290:  6c3b 266e 6273 703b 5d26 2331 3237 3b26  l;&nbsp;]&#127;&
    0x02a0:  6e6f 743b 4d26 6175 6d6c 3b26 2337 3332  not;M&auml;&#732
    0x02b0:  3b6e 2666 7261 6331 343b 2641 7469 6c64  ;n&frac14;&Atild
    0x02c0:  653b 2655 6772 6176 653b 6126 6961 6375  e;&Ugrave;a&iacu
    0x02d0:  7465 3b26 4967 7261 7665 3b26 6165 6c69  te;&Igrave;&aeli
    0x02e0:  673b 2661 756d 6c3b 3b26 5575 6d6c 3b6e  g;&auml;;&Uuml;n
    0x02f0:  266f 6369 7263 3b58 2665 7468 3b63 2645  &ocirc;X&eth;c&E
    0x0300:  5448 3b5e 2666 7261 6333 343b 5826 6f63  TH;^&frac34;X&oc
    0x0310:  6972 633b 7a26 6672 6163 3132 3b26 6161  irc;z&frac12;&aa
    0x0320:  6375 7465 3b26 6172 696e 673b 2655 6369  cute;&aring;&Uci
    0x0330:  7263 3b7a 7026 6163 6972 633b 6f26 7575  rc;zp&acirc;o&uu
    0x0340:  6d6c 3b26 6167 7261 7665 3b26 6365 6e74  ml;&agrave;&cent
    0x0350:  3b26 2333 3338 3b4e 2679 6163 7574 653b  ;&#338;N&yacute;
    0x0360:  2649 6772 6176 653b 753d 2623 3333 393b  &Igrave;u=&#339;
    0x0370:  2674 696d 6573 3b26 2334 3032 3b26 7468  &times;&#402;&th
    0x0380:  6f72 6e3b 2b3f 3326 6f63 6972 633b 2623  orn;+?3&ocirc;&#
    0x0390:  3430 323b 2623 3832 3230 3b26 7961 6375  402;&#8220;&yacu
    0x03a0:  7465 3b26 6365 6e74 3b26 4f61 6375 7465  te;&cent;&Oacute
    0x03b0:  3b26 6672 6163 3132 3b26 6365 6e74 3b26  ;&frac12;&cent;&
    0x03c0:  4f61 6375 7465 3b26 7961 6375 7465 3b26  Oacute;&yacute;&
    0x03d0:  6365 6e74 3b26 4161 6375 7465 3b26 2338  cent;&Aacute;&#8
    0x03e0:  3235 303b 2679 6163 7574 653b 5a26 6d61  250;&yacute;Z&ma
    0x03f0:  6372 3b26 7061 7261 3b44 2654 484f 524e  cr;&para;D&THORN
    0x0400:  3b26 4963 6972 633b 266e 6273 703b 7726  ;&Icirc;&nbsp;w&
    0x0410:  2338 3232 313b 2623 3237 3b26 4174 696c  #8221;&#27;&Atil
    0x0420:  6465 3b26 7961 6375 7465 3b26 6365 6e74  de;&yacute;&cent
    0x0430:  3b26 4161 6375 7465 3b21 5a23 3f26 6567  ;&Aacute;!Z#?&eg
    0x0440:  7261 7665 3b26 6975 6d6c 3b77 6326 5563  rave;&iuml;wc&Uc
    0x0450:  6972 633b 2675 6772 6176 653b 2673 6879  irc;&ugrave;&shy
    0x0460:  3b6d 266e 6f74 3b26 4e74 696c 6465 3b26  ;m&not;&Ntilde;&
    0x0470:  7469 6d65 733b 2661 7469 6c64 653b 3a26  times;&atilde;:&
    0x0480:  4967 7261 7665 3b26 4e74 696c 6465 3b26  Igrave;&Ntilde;&
    0x0490:  7469 6d65 733b 2673 7570 333b 266e 7469  times;&sup3;&nti
    0x04a0:  6c64 653b 4829 2645 6163 7574 653b 2641  lde;H)&Eacute;&A
    0x04b0:  456c 6967 3b26 7368 793b 3658 5526 7375  Elig;&shy;6XU&su
    0x04c0:  7031 3b26 6971 7565 7374 3b5f 7426 2333  p1;&iquest;_t&#3
    0x04d0:  3339 3b26 4161 6375 7465 3b26 6161 6375  39;&Aacute;&aacu
    0x04e0:  7465 3b26 6165 6c69 673b 6067 7a26 6561  te;&aelig;`gz&ea
    0x04f0:  6375 7465 3b26 6175 6d6c 3b2a 635c 2675  cute;&auml;*c\&u
    0x0500:  756d 6c3b 2663 6f70 793b 6377 2645 6772  uml;&copy;cw&Egr
    0x0510:  6176 653b 7526 6174 696c 6465 3b26 4f75  ave;u&atilde;&Ou
    0x0520:  6d6c 3b3b 2670 6c75 736d 6e3b 266d 6964  ml;;&plusmn;&mid
    0x0530:  646f 743b 2661 6369 7263 3b26 6971 7565  dot;&acirc;&ique
    0x0540:  7374 3b26 2338 3438 323b 2641 7269 6e67  st;&#8482;&Aring
    0x0550:  3b5e 7d6f 264f 6369 7263 3b26 2333 3338  ;^}o&Ocirc;&#338
    0x0560:  3b26 6365 6469 6c3b 3626 6174 696c 6465  ;&cedil;6&atilde
    0x0570:  3b26 6e74 696c 6465 3b26 2338 3231 383b  ;&ntilde;&#8218;
    0x0580:  5234 5b26 6167 7261 7665 3b26 2338 3233  R4[&agrave;&#823
    0x0590:  303b 2675 6369 7263 3b3a 6b26 7061 7261  0;&ucirc;:k&para
    0x05a0:  3b40 4c26 2338 3231 363b 266f 6369 7263  ;@L&#8216;&ocirc
    0x05b0:  3b26 7368 793b 2669 6578 636c 3b37 3b54  ;&shy;&iexcl;7;T
    0x05c0:  2641 6163 7574 653b 2670 6f75 6e64 3b26  &Aacute;&pound;&
    0x05d0:  7567 7261 7665 3b73 2623 3335            ugrave;s&#35
07:18:57.047933 IP dsl-hkibng31-54fab7-93.dhcp.inet.fi.37258 > callisto.doloresportalatin.info.http: Flags [.], ack 2897, win 274, options [nop,nop,TS val 497618335 ecr 3258394370], length 0
    0x0000:  4500 0034 76d4 4000 4006 d0be 54fa b75d  E..4v.@.@...T..]
    0x0010:  68e9 7df0 918a 0050 879d 7d89 3141 0f1b  h.}....P..}.1A..
    0x0020:  8010 0112 f357 0000 0101 080a 1da9 0d9f  .....W..........
    0x0030:  c237 2702                                .7'.
07:18:57.047973 IP callisto.doloresportalatin.info.http > dsl-hkibng31-54fab7-93.dhcp.inet.fi.37258: Flags [P.], seq 2897:3430, ack 662, win 1026, options [nop,nop,TS val 3258394370 ecr 497618094], length 533: HTTP
    0x0000:  4500 0249 0000 4000 3306 527e 68e9 7df0  E..I..@.3.R~h.}.
    0x0010:  54fa b75d 0050 918a 3141 0f1b 879d 7d89  T..].P..1A....}.
    0x0020:  8018 0402 bcc7 0000 0101 080a c237 2702  .............7'.
    0x0030:  1da9 0cae 323b 6f55 2649 756d 6c3b 4826  ....2;oU&Iuml;H&
    0x0040:  6672 6163 3334 3b26 6e62 7370 3b26 7975  frac34;&nbsp;&yu
    0x0050:  6d6c 3b26 7965 6e3b 2662 7276 6261 723b  ml;&yen;&brvbar;
    0x0060:  2649 6163 7574 653b 7574 266f 6772 6176  &Iacute;ut&ograv
    0x0070:  653b 4126 2338 3232 363b 2645 6772 6176  e;A&#8226;&Egrav
    0x0080:  653b 266d 6163 723b 4026 6375 7272 656e  e;&macr;@&curren
    0x0090:  3b32 6f26 4167 7261 7665 3b26 6563 6972  ;2o&Agrave;&ecir
    0x00a0:  633b 3324 2641 756d 6c3b 2862 3f5d 2664  c;3$&Auml;(b?]&d
    0x00b0:  6567 3b26 2338 3235 303b 5d26 6967 7261  eg;&#8250;]&igra
    0x00c0:  7665 3b26 2338 3232 323b 2623 3430 323b  ve;&#8222;&#402;
    0x00d0:  5d26 7561 6375 7465 3b5a 2926 4967 7261  ]&uacute;Z)&Igra
    0x00e0:  7665 3b5f 264f 6163 7574 653b 4326 2334  ve;_&Oacute;C&#4
    0x00f0:  3032 3b45 2663 7572 7265 6e3b 6d48 2654  02;E&curren;mH&T
    0x0100:  484f 524e 3b2e 266e 6f74 3b26 7468 6f72  HORN;.&not;&thor
    0x0110:  6e3b 2623 3832 3430 3b26 4963 6972 633b  n;&#8240;&Icirc;
    0x0120:  2623 3337 363b 2665 6772 6176 653b 2675  &#376;&egrave;&u
    0x0130:  756d 6c3b 2623 3832 3430 3b26 4963 6972  uml;&#8240;&Icir
    0x0140:  633b 2623 3337 363b 2665 6772 6176 653b  c;&#376;&egrave;
    0x0150:  2675 756d 6c3b 2669 7175 6573 743b 4826  &uuml;&iquest;H&
    0x0160:  6363 6564 696c 3b26 6f75 6d6c 3b26 6365  ccedil;&ouml;&ce
    0x0170:  6e74 3b26 4575 6d6c 3b26 6363 6564 696c  nt;&Euml;&ccedil
    0x0180:  3b26 6167 7261 7665 3b26 6e74 696c 6465  ;&agrave;&ntilde
    0x0190:  3b26 5961 6375 7465 3b26 2332 373b 2654  ;&Yacute;&#27;&T
    0x01a0:  484f 524e 3b50 2649 756d 6c3b 2659 6163  HORN;P&Iuml;&Yac
    0x01b0:  7574 653b 2665 6772 6176 653b 2673 7a6c  ute;&egrave;&szl
    0x01c0:  6967 3b26 4f67 7261 7665 3b50 2665 7468  ig;&Ograve;P&eth
    0x01d0:  3b26 7375 7031 3b26 6f75 6d6c 3b26 7961  ;&sup1;&ouml;&ya
    0x01e0:  6375 7465 3b33 7e70 2645 5448 3b67 2663  cute;3~p&ETH;g&c
    0x01f0:  7572 7265 6e3b 3f24 5f26 4567 7261 7665  urren;?$_&Egrave
    0x0200:  3b62 0a26 7375 7031 3b26 6174 696c 6465  ;b.&sup1;&atilde
    0x0210:  3b26 2333 3339 3b26 2338 3231 363b 5e26  ;&#339;&#8216;^&
    0x0220:  6d69 6464 6f74 3b37 7a26 6961 6375 7465  middot;7z&iacute
    0x0230:  3b26 6567 7261 7665 3b0a 3c2f 626f 6479  ;&egrave;.</body
    0x0240:  3e0a 3c2f 6874 6d6c 3e                   >.</html>

I have the chyrp install at http://doloresportalatin.info and a test php page at http://doloresportalatin.info/test.php so you can see that php is working.

If you could let me know how to further debug this I would be happy to help.

xenocrat commented 6 years ago

Hello there. Chyrp Lite will use gzip or deflate compression where it detects this is available and not already enabled. You can see the logic here. If the content is compressed, an appropriate header will be outputted here.

I was able to fetch your page using a little PHP script, and all looks well if I supply no Accept-Encoding header. If I supply the request header Accept-Encoding: gzip the content returned from your site is gzip encoded but the Content-Encoding: gzip response header is not sent by your server. Chyrp Lite sets this header if it is responsible for the encoding so it seems the header is being stripped before the response is sent, presumably by lighttpd.

A simple way to test this would be to add the following at the top of the file includes/common.php:

define('USE_ZLIB', false);

This definition will prevent Chyrp Lite from trying to do content compression. Once this is set, if your site looks ok then the problem is with lighttpd. You can either try to fix it or leave it as is – Chyrp Lite will work just fine without it.

xenocrat commented 6 years ago

Correction: I am seeing the correct headers from your server, but something is wrong with the encoding. Please try the test described above and let me know what happens.

xenocrat commented 6 years ago

After poking around a bit more, it seems your server is assuming that all PHP scripts will serve HTML content, and something is injecting top level HTML tags into the content if those tags are not already present. This causes pages served with gzip compression to be fubar, but it also screws up dynamically generated JavaScript.

I have no idea how this server behaviour has been configured, but that's the source of your problem.

The tag injection is done regardless of what Content-Type header is set. At the application level, Chyrp Lite appears to be working correctly. Preventing Chyrp Lite from compressing pages should get you up and running, but other things will remain broken unless you track down the source of this behaviour.

meskarune commented 6 years ago

Thanks for getting back to me. I added the define('USE_ZLIB', false); as a test and indeed the site loaded, but with a messages "You are not allowed to view this site." even after logging in that is the only content I can see.

For lighttpd I have the following modules enabled: mod_access, mod_auth, mod_fastcgi

Access and auth are for server side handling of password protected directories, and fastcgi is support for php-fpm.

Other than configuring fastcgi/php-fpm the server is basically running default settings. I will investigate further and reach out to the lighttpd folks to try and figure this out.

edit: I ran the following command:

file -b --mime-type /usr/local/www/vhosts/doloresportalatin.info/public/test.php

And got this result: text/html

I am on freebsd version 11.2 (the latest release)

I tried adding ".php" => "text/x-php; charset=utf-8", to the server's mimetype list, but still no change in chyrp. In the server's mimetype list it also has ".gz" => "application/gzip", in the mimetype list as well as a large number of other compression formats.

meskarune commented 6 years ago

Just to give you an update. I talked with the lighttpd folks and they seemed to think it might be my server's php configuration. So I uninstalled php, deleted all config files and reinstalled with everything completely default. I had recently upgraded the system to the latest version of freebsd and it automatically merged php configs, so I am guessing something with that could have been the problem.

Anyways, I reinstalled php and then uncommented the needed modules for chryp, and now the content encoding is just fine.

I have a totally different (unrelated) error message which I think is due to php version 7.2 changes - https://wiki.php.net/rfc/counting_non_countables

Error count(): Parameter must be an array or an object that implements Countable

Current headers:

HTTP/1.0 500 Internal Server Error =>
X-Powered-By => PHP/7.2.8
Set-Cookie => ChyrpSession=dh1951rvduar9gh2l1dg4h9d14; expires=Tue, 18-Sep-2018 20:53:08 GMT; Max-Age=2592000; path=/; domain=doloresportalatin.info; HttpOnly
Pragma => no-cache
Referrer-Policy => strict-origin-when-cross-origin
Vary => Accept-Encoding, Cookie
X-Pingback => http://doloresportalatin.info/includes/rpc.php
Content-Type => text/html; charset=UTF-8
Cache-Control => no-cache, must-revalidate
Expires => Mon, 03 Jun 1991 05:30:00 GMT
Content-Length => 6280
Connection => close
Date => Sun, 19 Aug 2018 20:53:08 GMT
Server => lighttpd/1.4.49

I have compression enabled right now and things are looking good. (the line define('USE_ZLIB', false); is not in common.php)

Should I close this issue and open a new issue for the php 7.2 bug?

xenocrat commented 6 years ago

I'm glad to have one problem solved. =)

My own Chyrp Lite blog is running on PHP 7.2.8 without issues so I think this error is being triggered by something out of the ordinary. You mentioned also that login is not behaving as expected – perhaps the previous PHP weirdness has caused the database to be improperly configured during the installation process.

Could you try a fresh install of Chyrp Lite? If the error persists please do open a new issue for it and I will investigate. Enabling DEBUG mode will provide a more helpful error message if you need to open an issue.

meskarune commented 6 years ago

I did a full reinstall of the app as well as deleting the old database and making a new database/user. I was able to install and also login and create a post: http://doloresportalatin.info/?action=index

But when I click on the post I get the count() error, for example: http://doloresportalatin.info/?action=view&url=test-page (I have debug turned on)

Error
count(): Parameter must be an array or an object that implements Countable
Backtrace

    includes/controller/Main.php on line 331
    includes/class/Route.php on line 130
    includes/class/Route.php on line 130
xenocrat commented 6 years ago

Thanks for the backtrace. I see the problem and I should be able to get a simple fix committed today.

The problem will only occur when running on 7.2 with Chyrp Lite’s clean URLs setting not enabled, which is why I haven’t run into it until now.

xenocrat commented 6 years ago

I've just committed a fix for the count problem. It requires a couple of small changes to two files, which you can reproduce yourself or patch from the develop branch.

meskarune commented 6 years ago

Sweet, thanks for fixing that so fast. I patched the files and the site is working as you'd expect: http://doloresportalatin.info/?action=view&url=test-page

I'll go ahead and close this issue :smile: