coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: whats_up_skip on July 20, 2007, 07:48:52 AM

Title: Install worked - errors after
Post by: whats_up_skip 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.
Title: Re: Install worked - errors after
Post by: Nibbler on July 20, 2007, 12:22:46 PM
Change the question marks to quotes.
Title: Re: Install worked - errors after
Post by: whats_up_skip 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.
Title: Re: Install worked - errors after
Post by: Joachim Müller on July 20, 2007, 06:59:44 PM
Quote from: whats_up_skip on July 20, 2007, 12:55:51 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.

Quote from: whats_up_skip on July 20, 2007, 12:55:51 PMAny 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.
Title: Re: Install worked - errors after
Post by: whats_up_skip on July 21, 2007, 12:11:33 AM
Thanks.