Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2]   Go Down

Author Topic: Binary junk coming out of parsing index.php  (Read 15497 times)

0 Members and 1 Guest are viewing this topic.

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Has there been any further work on the Apache 2.0 binary junk bug?
« Reply #20 on: November 04, 2004, 10:17:02 am »

1) (menalto) gallery 1.x is database driven afaik
You are wrong here :D  1.x uses flatfiles - 2.x which is in alpha since a year uses the db
Logged
SANIsoft PHP applications for E Biz

JMelhuish

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Has there been any further work on the Apache 2.0 binary junk bug?
« Reply #21 on: November 05, 2004, 05:12:16 am »

1) (menalto) gallery 1.x is database driven afaik

Actually it is flatfile, not DB

Quote from: GauGau
2) Coppermine does work on apache 2 webservers when the webserver is properly configured
I honestly don't know if this apache 2 webserver is configured properly, or not.  It is a Virtual Private Server account managed by a web hosting company (who are quite responsive to support questions).  I do successfully run other PHP applications.  Can you tell me what might be the configuration issues that would impact coppermine?

Quote from: GauGau
3) What do you mean by "simplified install page"? What do you expect us to remove from it?

Sorry, my mistake.  I meant simplified "index.php" page.  Since all of coppermine appears to work except the index page, I was thinking there might be some way to simplfy or comment out stuff in the index page to see what or where it is breaking down.

Quote from: GauGau
4) What "other" posting are you refering to?
Joachim

Sorry again, not sure what you mean here. I started a thread earlier on this problem (others have it too) and got no solution. See
http://forum.coppermine-gallery.net/index.php?topic=10275.0  This thread has a lot of info from me on the problem.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Binary junk coming out of parsing index.php
« Reply #22 on: November 05, 2004, 06:00:50 am »

just a blind guess: do you have output compression turned on?

Joachim

P.S. merged your two threads which deal with the same issue.
Logged

JMelhuish

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Output compression
« Reply #23 on: November 05, 2004, 03:04:57 pm »

No, I don't think I have output compression on.  At least I did not explicitly create an ouput filter for Coppermine or any other application.  I will try and work out if there is any compression running in the server.

If you wish to view the problem, simply go to my test website for coppermine but try and visit a page other than index.php, for example  http://melhuish.org/cpg132/thumbnails.php?album=lastup

All other pages are displaying fine, it is only index.php that is causing a problem.

Also I created a user if you want to login:
username: test
password: t1e2m3p4

Thanks!
James
Logged

Nibbler

  • Guest
Re: Binary junk coming out of parsing index.php
« Reply #24 on: November 05, 2004, 04:34:55 pm »

You do have gzip output encoding enabled and this is causing the problem, I was able to retrieve your index page using a manually created http header.

Logged

JMelhuish

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
SOLVED: Binary junk coming out of parsing index.php
« Reply #25 on: November 05, 2004, 08:53:47 pm »

A big thank you to everyone.  The problem was that I had zlib.output_compression = On in php.ini  Turning this off allowed proper parsing and output of index.php

I think this should be mentioned somewhere in the install documentation, or in the FAQ, or both.  I searched the forum and found reference to this problem. These other posts reference pretty much the same problem:
http://forum.coppermine-gallery.net/index.php?topic=4888.0
http://forum.coppermine-gallery.net/index.php?topic=1457.0
http://forum.coppermine-gallery.net/index.php?topic=1642.0
http://forum.coppermine-gallery.net/index.php?topic=9182.0
and a few others more recent that I can't find now.

I am somewhat confused as to whether the apache gzip compression of output (mod_deflate module) is different to the zlib compression.  I think I have the apache compression turned on, but am not sure (??), this is from httpd.conf:

# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
# information on the fly. Note: Not all browsers support this.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

But I have not myself enabled compression, by the method in apache documentation (  SetOutputFilter DEFLATE : will enable compression for documents in the container where it is placed)  [ what is a container? ]

Also, I did some of my own debugging on index.php in the only way I know, cutting code.  I found that the binary junk was produced from code within the $elements = [/i] function on line 682.  If any of the following case functions were present, I got the binaries:

  case 'catlist':
  case 'alblist':
  case 'random':
  case 'lastup':

BUT, every other case allowed proper display of the index.php page [ and these other case functions included the flush() statements ].  I think this might have been caused by the presence of information (and uploaded photos) in categories list, album list, random, last uploaded; and the lack of information in the other cases (toprated, etc.).

If you cannot use zlib compression, please put that in the install documentation.  Also could I get an answer about whether one can use mod_deflate in apache for gzip output?  (Or maybe it is not really necessary?)  Thanks!

Thanks again everyone.  Hopefully I can get Coppermine working with PunBB now!

James





« Last Edit: November 05, 2004, 09:25:46 pm by JMelhuish »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Binary junk coming out of parsing index.php
« Reply #26 on: November 06, 2004, 03:30:07 am »

I have zlib.output_compression set to on and everything works great.  Look at output_handler; do you have it set to anything?  If you do, that's your problem: regarding zlib.output_compression, php.ini states...
Quote
output_handler must be empty if this is set 'On' !!!!

You can't have both set, it's an either/or situation.

My test box runs Apache 2.0.50, php 4.3.9.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

JMelhuish

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Binary junk coming out of parsing index.php
« Reply #27 on: November 06, 2004, 04:53:44 am »

No, in fact in my php.ini, the output_handler is set to empty, i.e.

output_handler =

So that's not it.  Any other ideas?

James
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Binary junk coming out of parsing index.php
« Reply #28 on: November 06, 2004, 05:31:51 am »

In php.ini, what is your implicit_flush setting?

I've also attached my apache.conf and php.ini files (in txt format) for your review.  Maybe you can spot a difference that could be causing your issue.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: 1 [2]   Go Up
 

Page created in 0.017 seconds with 15 queries.