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]   Go Down

Author Topic: Version Check  (Read 9464 times)

0 Members and 1 Guest are viewing this topic.

tanfwc

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
    • tanfwc.com
Version Check
« on: August 18, 2004, 12:43:23 pm »

It seem that version check file has some problem. It can't defined the ocrrect file after i make sure that the file on the server is up to date and cpg server is online too. Please check and feedback ;)
« Last Edit: August 15, 2006, 12:30:35 am by GauGau »
Logged
tanfwc
[ + ] My HomePage
[ + ] GuestBook
[ + ] Photo Gallery
[ + ] Free Image Hosting

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #1 on: August 19, 2004, 08:50:40 am »

post a screenshot.

GauGau
Logged

tanfwc

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
    • tanfwc.com
Re: Version Check
« Reply #2 on: August 19, 2004, 03:49:54 pm »

(http://img46.exs.cx/img46/8884/versioncheck.png)
Logged
tanfwc
[ + ] My HomePage
[ + ] GuestBook
[ + ] Photo Gallery
[ + ] Free Image Hosting

Nibbler

  • Guest
Re: Version Check
« Reply #3 on: August 19, 2004, 10:30:03 pm »

Ouch, version check does not like coppermine installs to the root of the site. I only tested it in a subfolder.  :-[

Code: [Select]
$dir = ''; // this is the place to start browsing
got it working for me though.
« Last Edit: August 19, 2004, 10:46:45 pm by Nibbler »
Logged

tanfwc

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
    • tanfwc.com
Re: Version Check
« Reply #4 on: August 20, 2004, 07:09:14 am »

Ok. I will play around with those coding when i get home. Thank you for the advice.
Logged
tanfwc
[ + ] My HomePage
[ + ] GuestBook
[ + ] Photo Gallery
[ + ] Free Image Hosting

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #5 on: August 20, 2004, 09:03:34 am »

@Nibbler: will look into this as well. Do you have a good idea how to efficiently check if coppermine is installed in the webroot? The only thing that comes to mind is checking the url, but this might cause problems, since urls are not directly related to file structure (e.g. when having subdomains that are actually sub-folders). Checking if php can access files one level up the current dir won't work as well, since the webroot doesn't necesarily have to be the top level folder (in fact, good webhosts will let you have one level up to be able to hide files from being accessible over the web).

GauGau
Logged

Nibbler

  • Guest
Re: Version Check
« Reply #6 on: August 25, 2004, 07:34:22 pm »

Having it set to
Code: [Select]
$dir = ''; // this is the place to start browsingworks for me in a webroot, subdomain, and subfolder. I'd suggest simply setting it to that unless that causes other issues.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #7 on: August 25, 2004, 09:12:39 pm »

I added this as an option, please check out the devel version.

Joachim
Logged

Nibbler

  • Guest
Re: Version Check
« Reply #8 on: August 25, 2004, 09:22:30 pm »

I already tried the dev version (v1.11), it doesn't work.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #9 on: August 25, 2004, 11:09:36 pm »

hm, as I'm webhosted with the webroot not being my doc root I can not test this easily. Could you look into this a bit more, or PM me FTP and coppermine admin access data to some webspace with a coppermine install in the webroot? Thanks.

GauGau
Logged

Nibbler

  • Guest
Re: Version Check
« Reply #10 on: August 26, 2004, 01:50:41 am »

OK, if you don't like my suggested fix, here is the reason why the current dev version fails :

We tick the special webroot box, sending us to this bit

Code: [Select]
$dir = cpg_get_coppermine_path().'/'; // this is the place to start browsing
cpg_get_coppermine_path returns an empty string

so we have $dir = '/';

versioncheck looks for file at the absolute path '/file.php' - not there, (it is really at /home/nibbler2/public_html/file.php)

if we ignore the $dir by making it an empty string,

versioncheck looks for: 'file.php'  - *in the current directory*, and finds it.

Everything is fine.

so the fix is to set the $dir to '' or phase it out completely.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #11 on: August 26, 2004, 06:47:17 am »

k, I got you wrong then. I changed
Code: [Select]
// step three: go through all files that exist in the repository and check if they're on the webserver as well
if ($webroot == 1) {
$dir = cpg_get_coppermine_path().'/'; // this is the place to start browsing
} else {
$dir = '../'.cpg_get_coppermine_path().'/'; // this is the place to start browsing
}
to
Code: [Select]
// step three: go through all files that exist in the repository and check if they're on the webserver as well
if ($webroot == 1) {
$dir = ''; // this is the place to start browsing for root folders
} else {
$dir = '../'.cpg_get_coppermine_path().'/'; // this is the place to start browsing
}
(this is what I committed to devel. Please confirm.

GauGau
Logged

Nibbler

  • Guest
Re: Version Check
« Reply #12 on: August 26, 2004, 05:21:33 pm »

Confirmed.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #13 on: August 26, 2004, 09:48:35 pm »

Does this fix all issues?

Joachim
Logged

groentebroer

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Version Check
« Reply #14 on: August 14, 2006, 08:44:38 pm »

I have the same problem, after I updated from 1.4.3 to 1.4.8 .

The issue is that:

Code: [Select]
// step three: go through all files that exist in the repository and check if they're on the webserver as well
if ($webroot == 1) {
$dir = ''; // this is the place to start browsing for root folders
} else {
$dir = '../'.cpg_get_coppermine_path().'/'; // this is the place to start browsing
}

Does not work for my installation.
I installed coppermine directly in the webroot. When running versioncheck.php the "$dir" variable looks in "..//" as a result of $webroot not being "1".

$webroot is 0 as a result of:

Code: [Select]
if (!$_REQUEST['changes']) { // set default settings for options
.....
$webroot = 0;
.....

When it looks for files in "..//" it will not find anything correctly and everything turns red.
Setting the $dir hard to './' works and everything turns green. There is probably something wrong with the path detection, or is this a configuration issue?

Gijs
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Version Check
« Reply #15 on: August 15, 2006, 12:30:16 am »

I have the same problem, after I updated from 1.4.3 to 1.4.8 .
Then you shouldn't have posted on the cpg1.3.x board. Locking.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.