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: [Solved]: CPM Fetch problem  (Read 6516 times)

0 Members and 1 Guest are viewing this topic.

liberiangirl90

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
[Solved]: CPM Fetch problem
« on: October 06, 2009, 01:51:32 pm »

Hi,
I'm working on a new layout for my website but I have problems with cpm fetch...
I cannot see the images, just a code...
Here's the page:
http://www.madonnaitaly.net/index2.html

I used the second code provided by cpm fetch during the installation because it describes exactly my case:

Code: [Select]
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>
« Last Edit: October 07, 2009, 09:38:10 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPM Fetch problem
« Reply #1 on: October 06, 2009, 05:07:38 pm »

That's not very surprising: PHP code is not parsed on an HTML page. That's why the code doesn't get executed on the server and is just being sent to the client's browser, where it is being treated as text and therefor shows through. Not related to cpmFetch in itself, but a general issue for you (or rather "expected behaviour"): since cpmFetch is PHP-driven, you can only use it on PHP pages.
Rename http://www.madonnaitaly.net/index2.html to http://www.madonnaitaly.net/index2.php using your FTP app, then try again, accessing http://www.madonnaitaly.net/index2.php in your browser should then do the trick.
Logged

liberiangirl90

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: CPM Fetch problem
« Reply #2 on: October 06, 2009, 05:47:54 pm »

Thank you so much, now it works!   :)
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.