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: Trailing slash after CPG directory in SRC URL  (Read 10586 times)

0 Members and 1 Guest are viewing this topic.

thecoalman

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Trailing slash after CPG directory in SRC URL
« on: August 28, 2006, 07:24:35 pm »

CPG version 1.4.9  CPM version 1.6.4

As stated i'm getting a trailing slash... if your going to ask no I didn't add it.  ;D Here's the output from  cftest.php

Quote
5 You set your partial URL to /headfiles PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = FreeBSD pro23.abac.com 5.5-RELEASE-p2 FreeBSD 5.5-RELEASE-p2 #0: Fri Jun 16 11:29:40 PDT 2006 root@ftp1.abac.com:/usr/obj/usr/src/sys/PRO i386 INFO
40 WebServer = Apache/1.3.34 (Unix) INFO
45 PHP Version = 4.4.4 INFO
55 DOCUMENT_ROOT: /home/com/40lbhead/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/com/40lbhead/html/headfiles/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS

But the thumbnails have src URL's like this, the path is accurate except the extra slash:
http://www.40lbhead.com/headfiles//albums/archives/fans/thumb_1228crdright.JPG

...Just noticed an oddity, one thiumbnail did work. It's the default one for a WMA. Last thing to add is I tried running it in outside of the CPG directory which gave me the same result as above.

--------------

Don't know if the following makes a difference but, I tried the next step and that gives me a blank page. added the error code as suggested and that gives me the followwing warnings.

Quote
Warning: main(./cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home/u4/head/html/headfiles/cpmfetch/test.php on line 7

Warning: main() [function.include]: Failed opening './cpmfetch/cpmfetch.php' for inclusion (include_path='.:') in /home/u4/head/html/headfiles/cpmfetch/test.php on line 7

Fatal error: Cannot instantiate non-existent class: cpm in /home/u4/head/html/headfiles/cpmfetch/test.php on line 8

Changing ./cmpfetch/cpmfetch.php to just cpmfetch.php works but the src URL's for the images are still wrong.
« Last Edit: August 29, 2006, 05:55:39 pm by vuud »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Trailing slash after CPG directory in SRC URL
« Reply #1 on: August 28, 2006, 08:14:54 pm »

check
config -> General settings -> URL of your coppermine gallery folder

thecoalman

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Trailing slash after CPG directory in SRC URL
« Reply #2 on: August 28, 2006, 08:42:36 pm »

Yes there is trailing slash, but it doesn't update if I delete it. I tried updating "display faq" just to test something else and that was sucessful.

I probably should have mentioned that it's a fresh reinstall from today bridged to phpbb, only modification I've made is to template .html. Everything appears to be working but I haven't tested every possible thing.  ;)
Logged

Nibbler

  • Guest
Re: Trailing slash after CPG directory in SRC URL
« Reply #3 on: August 28, 2006, 08:45:13 pm »

Coppermine enforces the trailing slash in config.
Logged

thecoalman

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Trailing slash after CPG directory in SRC URL
« Reply #4 on: August 28, 2006, 08:59:31 pm »

I switched it manually in phpmyadmin, didn't seem to have any affect on anything going through the a few pages in the gallery but it didn't have any affect on my problem either.  :D
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Trailing slash after CPG directory in SRC URL
« Reply #5 on: August 28, 2006, 09:06:26 pm »

Coppermine enforces the trailing slash in config.

the version of CpmFetch you are using draws its own url up - the beta version 1.9.x will get it from cpg, and also eliminates the double slash problem.

this is a bug in the existing stable cpmfetch.

If you are not bridging with anything, I'd recommend trying the beta out... its much better

Vuud
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

thecoalman

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Trailing slash after CPG directory in SRC URL
« Reply #6 on: August 28, 2006, 09:31:45 pm »

I'm bridged to Phpbb, and if it weren't for having ot run a install file I would have tried it...anyhow I think I got it fixed

In cpmfetch_dao.php, I removed the slashes before album in both instances:
Code: [Select]
$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");
Works on the test page, I'll see how it works out elsewhere.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Trailing slash after CPG directory in SRC URL
« Reply #7 on: August 28, 2006, 10:16:21 pm »

I'm bridged to Phpbb, and if it weren't for having ot run a install file I would have tried it...anyhow I think I got it fixed

In cpmfetch_dao.php, I removed the slashes before album in both instances:
Code: [Select]
$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");
Works on the test page, I'll see how it works out elsewhere.

Well, the beta does not really support bridged at this time...  Perhaps later tonight it will.

Your fix should work, but others (reading this in the future) should not have this problem
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

thecoalman

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Trailing slash after CPG directory in SRC URL
« Reply #8 on: August 28, 2006, 10:26:14 pm »

Well let's get a move on!  ;D J/K  The old version looks like it will fit my needs. I only need it to display a few random images. Thanks for your help and the mod.
Logged

thecoalman

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Trailing slash after CPG directory in SRC URL
« Reply #9 on: August 29, 2006, 09:46:30 am »

Well that seems to have fixed it testing it on other pages, Again thanks for the mod. I can't seem to find the solved option, Guess that's a mod only option? Thanks again.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.