Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: cfimageget.php delivers broken image  (Read 4057 times)

0 Members and 1 Guest are viewing this topic.

Jared5755

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
cfimageget.php delivers broken image
« on: May 04, 2009, 06:23:42 pm »

My main goal is to display an image on my phpBB index page.  I've tried displaying it the normal way (with the php function calls described in docs), but can't seem to get it displayed on my forums.  My test page works...where all I do is display a few random images from my gallery.  So, cpmFetch is working it appears.

So, now I'm trying to go the route of using cfimageget.php to display the image.  I am first trying just a test page that should only display 1 random image from my gallery.  But, all it's displaying is a broken image.

Test page:
Quote
<img src="../gal/cpmfetch/cfimageget.php" />

Link to gallery:
Quote
http://freeridelounge.net/gal/

First part of cfimageget.php:
Quote
require_once "cpmfetch_dao.php";

// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = true;

if ($ALLOW_DIRECT_ACCESS && substr($_SERVER['SCRIPT_FILENAME'],-14) == "cfimageget.php") {
   
// This one you need to adjust unless your galler is at http://www.youname.com/photos
// If you installed right to the root of your web site, just use a /
// TODO This should be path to config file
$urltocpm = "../gal/";
$pathToConfigFile = "../gal/cpmfetch/";

// If no cmd= is submitted, it will do this:   
   $default_command = "random";

Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: cfimageget.php delivers broken image
« Reply #1 on: May 10, 2009, 11:50:29 am »

I have the same problem a long time ago and i used this as a fix for my problem.

I extracted cfimageget.php from the copperminefetch-2.1.1-dev and overwrite the cfimageget.php from v. 2.0 and it works like a charm.
No need to edit any code from file.

Download the attached file cfimageget.txt (change the extension to .php) and upload it to your galleryroot/cpmfetch/ directory.
Then visit that page  http://freeridelounge.net/gal/cpmfetch/cfimageget.php
If the image appears, you will now start embedding random pictures in html tag.

Hope that it will work for you too.

Enjoy
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

Jared5755

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: cfimageget.php delivers broken image
« Reply #2 on: May 10, 2009, 01:23:00 pm »

Thanks a lot!  Will try it out when I get back in town.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 21 queries.