Can´t get CPMfetch to work..... Can´t get CPMfetch to work.....
 

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

Main Menu

Can´t get CPMfetch to work.....

Started by Koxer, September 05, 2007, 10:13:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Koxer

Hi

Have installed CPMFetch - but after installation I get:

Notice: Undefined variable: MYCONFIG in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 42

Notice: Undefined index: path in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 109

There is no pictures showing up - only empty fields - but if I click them I get straight to the picture....

I can´t see anything else looks wrong.....Coppermine runs fine, so.....

Any clues?


:-\
Morten

Koxer

Tried to reinstall from scratch - gets this error after install:
Notice: Undefined variable: MYCONFIG in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 42

Notice: Undefined index: do in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 108

Notice: Undefined index: path in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 109

Notice: Undefined index: force in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 110

Notice: Undefined index: do in C:\websider\okologi\cpg1410\cpmfetch\install.php on line 331

Still no images, but links to images works OK.

I tried to setup a test.php to se if things worked after all - despite the errors - but I get this error:

Warning: main(./cpg1410/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in C:\websider\okologi\cpg1410\test2.php on line 2

Warning: main() [function.include]: Failed opening './cpg1410/cpmfetch/cpmfetch.php' for inclusion (include_path='.;C:\php5\pear') in C:\websider\okologi\cpg1410\test2.php on line 2

Fatal error: Class 'cpm' not found in C:\websider\okologi\cpg1410\test2.php on line 3

I´m confused.....

:'(
Morten

therightpic

This happened to me as well and it was exactly what it said it was.

In other words, I would look at this first:

"No such file or directory in C:\websider\okologi\cpg1410\test2.php"

Is this where your files are located for CpmFetch?  Are you doing this on a web server?  Is it really on the C:\ drive?

I would check your paths first.

I will try and dig up the info on how I fixed this exactly and post it for you.

Joachim Müller

Turn notices off if you don't know what they mean.

Koxer

Hi

To therightpic:

I have chcked and the files are at the right places.
I installed CPMFecth inside the cpg1410 directory in a directory called /cpmetch. The test2.php is placed inside the cpg1410 directory.
The test2.php file is containing the following code:

<?php
  include_once "./cpg1410/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./cpg1410/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();
?>

I´ll appreciate if you find out what excactly you did to avoid this issue.

And for Gaugau:

I don´t know what you mean with turning notices of? Is it that I coul turn that of and then this ereror messages will not show up? What should be the big idea about that? Then I can´t see the errors? I don´t understand.... ;)

Thank you both for reading this post and trying to help! I aprreciate that very much!

:)
Morten

Koxer

Ohh.. sorry for my spelling. My keyboard went nuts.

Here is the post with more appropriate spelling (I´m danish - that´s why I´m so bad at spelling :) )
--------------------

Hi

To therightpic:

I have checked and the files are at the right places.
I installed CPMFetch inside the cpg1410 directory in a directory called /cpmfetch. The test2.php is placed inside the cpg1410 directory.
The test2.php file is containing the following code:

<?php
  include_once "./cpg1410/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./cpg1410/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();
?>

I´ll appreciate if you find out what excactly you did to avoid this issue.

And for Gaugau:

I don´t know what you mean with turning notices of? Is it that I could turn that off and then this error messages will not show up? What should be the big idea about that? Then I can´t see the errors? I don´t understand....

Thank you both for reading this post and trying to help! I appreciate that very much!


Morten



Joachim Müller

Quote from: Koxer on September 06, 2007, 11:13:49 AM
I don´t know what you mean with turning notices of? Is it that I could turn that off and then this error messages will not show up? What should be the big idea about that? Then I can´t see the errors? I don´t understand....
http://de.php.net/manual/en/ref.errorfunc.php#ini.error-reporting
Self-hosting is not recommended at all btw.

Koxer

Hey Gaugau

OK - I think I know what you mean now.
Why is self-hosting not recomended?
We have a 10Mbit/10Mbit fiber-connection and a Xeon IBM webserver with 4 GB RAM etc. It runs like a charm and we have had 1000 of visitor without any problems. I guess it could be a problem with slower connections or hardware, but I don´t think the issues with cpmfetch has anything to do with self-hosting? Correct me if I´m wrong?

:)
Morten

therightpic

Koxer,

Is your site live?  Is it possible to take a look at it?

Koxer

Hi

Yes very much alive: http://www.okologi.dk/cpg1410

I have installed cpgfetch here: http://www.okologi.dk/cpg1410/cpmfetch

The test file is here : http://www.okologi.dk/cpg1410/test2.php

For security reasons I have deleted the install.php inside the cpmfetch directory.


therightpic

QuoteWarning: main(./cpg1410/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in C:\websider\okologi\cpg1410\test2.php on line 2

I have checked and the files are at the right places.
I installed CPMFetch inside the cpg1410 directory in a directory called /cpmfetch. The test2.php is placed inside the cpg1410 directory.
The test2.php file is containing the following code:

I am not an expert at this but wouldn't "./cpg1410/cpmfetch/cpmfetch.php" be saying look in this same directory for another folder called /cpg1410 and a folder inside of that called cpmfetch, etc, but because you are already in the cpg1410 directory it would not find that folder, right?

Try adding another dot like this:

<?php
  include_once "../cpg1410/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../cpg1410/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();
?>

or deleting part of the path, like this:

<?php
  include_once "./cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./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();
?>

and see if that works.

Koxer

Hey therightpic

Off course.....Thank you so much. It seems to work. I honestly allready have tried to do something like that, but ../ made the trick.
Only why does it not show the PDF-icon? It shows up all right in Coppermine, but not in cpm....anyway - that´s a minor detail - I think I can get along for now.

:)
Morten

therightpic

Glad to hear it is working. 

Not sure about the PDF icon, sorry. You might be able to find out where that PDF icon image is stored and do a conditional statement that says something like if it is a PDF file show this PDF icon image.  I did that with showing 4 or 5 stars for an image at one point.