Install worked - errors after Install worked - errors after
 

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]

Main Menu

Install worked - errors after

Started by whats_up_skip, July 20, 2007, 07:48:52 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

whats_up_skip

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.

Nibbler

Change the question marks to quotes.

whats_up_skip

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.

Joachim Müller

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.

whats_up_skip