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: Install worked - errors after  (Read 4789 times)

0 Members and 1 Guest are viewing this topic.

whats_up_skip

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Install worked - errors after
« on: July 20, 2007, 07:48:52 am »

The installation of CpmFetch appeared to work fine with the pictures showing up in the results page.

I then was able to copy the standard code to a php file in the root directory and that worked.
<?php
  include "japan_picture/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("japan_picture/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

Then I tried the next sample code
<?php
  include_once "japan_picture/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("japan_picture/cpmfetch/cpmfetch_config.php");
  $options = array(?subtitle? => ?File name : {{pFilename}}?);
  $objCpm->cpm_viewLastAddedMedia(1, 4, $options);
  $objCpm->cpm_viewRandomMediaFrom(?cat=1?,1, 4, $options);
  $objCpm->cpm_close();
?>

This did not work and returned the following error message:
Parse error: syntax error, unexpected '?', expecting ')' in /home/japanes/public_html/test.php on line 4

I cannot see anything obvious here, but I could be going blind now looking for it.

I have also tried the <img  src="cfimageget.php">, in an HTML file. It shows a blank page with a image place holder.

Any ideas on these? I have done some searching for similar errors, but I cannot find anything that helped.
« Last Edit: July 20, 2007, 07:00:27 pm by GauGau »
Logged

Nibbler

  • Guest
Re: Install worked - errors after
« Reply #1 on: July 20, 2007, 12:22:46 pm »

Change the question marks to quotes.
Logged

whats_up_skip

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Install worked - errors after
« Reply #2 on: July 20, 2007, 12:55:51 pm »

Great thanks that solved that problem. It looks like the core of cpmFetch is working.

Any ideas why when I have <img  src="cfimageget.php">, in an HTML file. It shows a blank page with a image place holder.

I have done some searching for similar errors, but I cannot find anything that helped.

I suspect it is a problem with the path setting:

//   $urltocpm = "http://www.japaneselifestyle.com.au/japan_picture";
$pathToConfigFile = "/cpmfetch";

but I think I have tried all the combinations and I could not get it to work.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Install worked - errors after
« Reply #3 on: July 20, 2007, 06:59:44 pm »

Great thanks that solved that problem. It looks like the core of cpmFetch is working.
Fine, then, marking this thread as solved. Keep in mind that we have a strict "One question per thread" policy that you agreed to respect when signing up.

Any ideas why when I have <img  src="cfimageget.php">, in an HTML file. It shows a blank page with a image place holder.
Yes: it's simply not the proper syntax. You need to add parameters to it. Read the cpmFetch docs to find out more.
Logged

whats_up_skip

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Install worked - errors after
« Reply #4 on: July 21, 2007, 12:11:33 am »

Thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.