Advanced search  

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]

Pages: [1] 2   Go Down

Author Topic: I cannot get my images displayed!  (Read 14384 times)

0 Members and 1 Guest are viewing this topic.

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
I cannot get my images displayed!
« on: October 12, 2006, 06:46:54 pm »

Hey,
I tried all the combinations, but did not want to be displayed.
The test is good:

http://surfingcarpet.com/photogal/cpmfetch/cftest.php

I added the following to the html source of my page:

<?php
include "./photogal/cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>

And all I have is this:
http://surfingcarpet.com/lepetitprince.html

I am not an expert in php programming, but I think I am missing a code or something. I DID read again and again the instructions and the forum, but I cannot find my solution.
Any suggestions, I would very appreciate! ;D ;D ;D ;D
Thanks.


« Last Edit: October 30, 2006, 05:56:32 am by vuud »
Logged

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: I cannot get my images displayed!
« Reply #1 on: October 12, 2006, 08:25:09 pm »

Oh, I forgot, I am using the latest Coppermine and the 1.4.9 cpmfetch.
Logged

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: I cannot get my images displayed!
« Reply #2 on: October 12, 2006, 08:28:25 pm »

Soory I meant 1.6.4! Any ideas?????????  ::) :o ::) ??? ???
Logged

my evil twin

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: I cannot get my images displayed!
« Reply #3 on: October 13, 2006, 01:06:38 am »

yeah - you can't run php code from a html-file.

you have to name the file .php instead of .html, and of course your server has to support running php-scripts.
Logged

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: I cannot get my images displayed!
« Reply #4 on: October 13, 2006, 01:40:54 am »

Hey thanks bud!!  :D

I was sure something was wrong. I changed to .php, now I have a fatal error instead

http://surfingcarpet.com/lepetitprince.php

The line 11 is where the </div> is below.
If any php expert can take a look at my code. I am sure there is just one thing missing ??? ??? ??? ??? :-[ :o... THANKS!!!

Here is my code from line 9 to line 31:

<title>Le Petit Prince: Voici mon secret</title><body background="images/back.gif">
<div align="center"><img src="images/heart/French.gif" width="613" height="96" />
</div>
<p align="center">&nbsp;
<html>
<title></title>
</head>
<body>
<?php
include "./photogal/cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>
</p>

<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<div align="center">
  <p><img src="images/heart/Afrikaans.gif" width="613" height="121" /></p>
  <p>&nbsp;</p>
  <p><img src="images/heart/Arabic.gif" width="614" height="153" /></p>
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: I cannot get my images displayed!
« Reply #5 on: October 13, 2006, 03:00:15 am »

Soory I meant 1.6.4! Any ideas?????????  ::) :o ::) ??? ???

You need to run it on a PHP page, or run a server side include to include a php page

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: I cannot get my images displayed!
« Reply #6 on: October 17, 2006, 10:40:26 pm »

Not quiet solved! :'(

I tried the ssi as indicated here : http://www.tactis.net/cpgimage/cpmfetch/docs/ch11.html
Followed up all the steps.
I still have an error: http://surfingcarpet.com/lepetitprince.shtml
and when I execute the php directly, I have also errors. http://www.surfingcarpet.com/photogal/cpmfetch/randomimages.php
I don't know what am I doing wrong.  ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
It must be a directory mix up somewhere..?? :-\

This is the code in my randomimages.php file

<html>

<head>
  <title></title>
</head>

<body>

<?php
include "./photogal/cpmfetch.php";
$objCpm = new cpm('/photogal');
$objCpm->cpm_viewLastAddedMedia(4,2);
$objCpm->cpm_close();
?>

</body>

</html>
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: I cannot get my images displayed!
« Reply #7 on: October 24, 2006, 04:00:12 pm »

Hi surfingcarpet,

This is marked solved.  But you indicated it was not.  What is the story? 

I get almost similar error messages as yours.  Just like yours,  my "cftest.php"  worked.  [I changed the cpmfetch.php also to indicate the non-standard use of prefixes.]

CGC
Logged

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: I cannot get my images displayed!
« Reply #8 on: October 24, 2006, 08:14:06 pm »

Hi Karma,

YES, I don't know why they marked it solved! I am still trying to figure out, but almost gave up now. I will may be do a simple html rotating 10 pictures or so and give up cpmFetch...  :-\ :'(

Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
cpmfetch directory and albums compatibility can cause the error messages.
« Reply #9 on: October 24, 2006, 09:36:35 pm »

Hi Karma,

YES, I don't know why they marked it solved! I am still trying to figure out, but almost gave up now. I will may be do a simple html rotating 10 pictures or so and give up cpmFetch...  :-\ :'(


Actually CPMFetch is very good.  I figured out what caused the error in mine -- it took me several hours of trial and error.  The error was very simple really. 

As it turned out I have several CPMfetch, they were named "cpmfetch", "cpmfetch-001", ..., "cpmfetch-007", ...etc.

In the opening statement, I was using:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gal007');

?>

instead of:

<?php
include "./cpmfetch-007/cpmfetch.php";
$objCpm = new cpm('/gal007');

?>

so, it cannot find the correct album in the  gallery (as specified in the "cpmfetch" directory).  As a result, it spewed out almost the same error messages as you got.  Yours may also be a compatibility in the name of the cpmfetch "directory" and the "albums" you are trying to fetch.

Of course, it could be something else.

CGC
Logged

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
RE: I cannot get my images displayed! <----- not solved yet!
« Reply #10 on: October 26, 2006, 12:24:02 am »

Anyone have an idea about my problem? I am posting here, because someone has put my topic as "solved", but it is not!  :P
Logged

surfingcarpet

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: RE: I cannot get my images displayed! <----- not solved yet!
« Reply #12 on: October 26, 2006, 02:49:00 am »

You had this:

<?php
include "./photogal/cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>


Is it now in a php page?

If it is, try this:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>

Difference:  the "/photogal" was not part of the "partial url".  I think that should work.  If not, I am curious what "photogal" is.  Is it where your photos are kept? Or, a directory where you placed the "cpmfetch" script folder?

CGC
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: RE: I cannot get my images displayed! <----- not solved yet!
« Reply #13 on: October 26, 2006, 03:16:14 am »

I forgot to add in my comments above (posted it prematurely).  If you read the:

CPMFetch Manual

and followed it, your "photogal" should refer to the name of your "Coppermine PhotoGallery (CPG)" directory.  Vuud can correct me on this, but as far as I know, before the version 1.9.3***, in general, the "Coppermine Fetch (cpmfetch) " directory (i.e., the v1.6.4) and the "php files" that will display the photos using "Coppermine Fetch"   script aregenerally installed outside (separate, indpendent) of the "CPG" directory -- that is the whole point. I usually place mine in a different folder, together with the php files where the images outside of the CPG are displayed.  Try that, you can name that separate directory any name you want, let us call it DirA, so that:

DirA
-> cpmfetch (the Coppermine Fetch directory)
-> "php files" (php files that will display your images using the "Coppermine Fetch")

if you do this, your script should still be:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>

Do not include the name of the CPG directory nor the name of the DirA, in the include statement.  Just:

include "./cpmfetch/cpmfetch.php";

It works for me. If it does not work for you, then something else is not correct.

CGC
_________
***The procedure is different with the CPMFetch 1.9.3, it uses some features of CPG, so it is installed within the CPG, as one procedure.  [It is possible to store outside, but I have not gotten that to work, yet.]

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: RE: I cannot get my images displayed! <----- not solved yet!
« Reply #14 on: October 26, 2006, 04:08:58 am »

Anyone have an idea about my problem? I am posting here, because someone has put my topic as "solved", but it is not!  :P

yeah, my bad.  For some reason when I posted that one you had php in html so I marked it off. 

Apologies all around
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: RE: I cannot get my images displayed! <----- not solved yet!
« Reply #15 on: October 26, 2006, 04:15:32 am »

I forgot to add in my comments above (posted it prematurely).  If you read the:

CPMFetch Manual

and followed it, your "photogal" should refer to the name of your "Coppermine PhotoGallery (CPG)" directory.  Vuud can correct me on this, but as far as I know, before the version 1.9.3***, in general, the "Coppermine Fetch (cpmfetch) " directory (i.e., the v1.6.4) and the "php files" that will display the photos using "Coppermine Fetch"   script aregenerally installed outside (separate, indpendent) of the "CPG" directory -- that is the whole point. I usually place mine in a different folder, together with the php files where the images outside of the CPG are displayed.  Try that, you can name that separate directory any name you want, let us call it DirA, so that:

DirA
-> cpmfetch (the Coppermine Fetch directory)
-> "php files" (php files that will display your images using the "Coppermine Fetch")

if you do this, your script should still be:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>

Do not include the name of the CPG directory nor the name of the DirA, in the include statement.  Just:

include "./cpmfetch/cpmfetch.php";

It works for me. If it does not work for you, then something else is not correct.

CGC
_________
***The procedure is different with the CPMFetch 1.9.3, it uses some features of CPG, so it is installed within the CPG, as one procedure.  [It is possible to store outside, but I have not gotten that to work, yet.]



Prior to the latest dev versions you could put it anywhere you wanted.  If you wanted to put it inside the cpg directory you could.  Due to 10000 user problems from figuring out relational directory stuff ( .. means up one ) I gave up and just started recommending you put it inside CPG so I could make a guess as to where it was without troubling anyone to know anything.

If the posts here from cgc0202 do not help, post here again.  Sorry for closing the other topic... no idea what I was thinking.

This is your page you say is not working...
http://www.surfingcarpet.com/photogal/cpmfetch/randomimages.php

This is your error...
Failed opening './photogal/cpmfetch.php'

You are already in the cpmfetch directory... do you have a subdirectory named photogal inside that directory with another copy of cpmfetch.php inside it.

Change your include to have
./cpmfetch.php

. = same directory, .. = go up one, ../.. = means go up two directories...














Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: RE: I cannot get my images displayed! <----- not solved yet!
« Reply #16 on: October 26, 2006, 04:24:48 am »

Anyone have an idea about my problem? I am posting here, because someone has put my topic as "solved", but it is not!  :P
You should have kept replying to that thread instead of starting another one. After all, the "solved" label is just a tag. Your initial thread hasn't been locked to keep you from replying.
Merging your new thread with the original one, removing the "solved" label if this bothers you so much. Even though the thread has been labelled as "solved", supporters kept on answering your replies, so what's the actual issue?
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
CPMFetch, open statements
« Reply #17 on: October 26, 2006, 06:39:06 am »


Change your include to have
./cpmfetch.php

. = same directory, .. = go up one, ../.. = means go up two directories...


Vuud,

The aforemention clarification has finally made me understand.  Let me use the example, where the cpmfetch is in DirA while the  "static1.php files" are  found in the following cases:

Case 1:"cpmfetch" and  "static1.php files" in the same directory

DirA:
->"cpmfetch" (the "coppermine fetch" script directory)
-> "static1.php files" in group A1 including the common files, "top1.php" and "bottom.php"  (files)


Case 2: "static2.php files" are one sub-directory below "cpmfetch".  This is similar to the statement: "cpmfetch" is one directory up the "static2.php files"

->DirA1: (sub-directory of DirA)
->-> "static2.php files" in group A1 including the common files, "top2.php" and "bottom.php"  (files)

Case 3: same as Case 2:

->DirA2: (sub-directory of DirA)
->-> "static3.php files" in group A2  including the common files, "top3.php" and "bottom.php" (files)

Case 4: "static2.php files" are two  sub-directory levels below "cpmfetch".  This is similar to the statement: "cpmfetch"are two  sub-directory levels  up the "static2.php files"

->->DirA2b: (sub-directory of DirA2)
->->-> "static4.php files" in group A2b  including the common files, "top4.php" and "bottom.php" (files)
etc.

So, here is the correct format, that works for most folks with just a single gallery:

Case 1
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>

Cases 2 & 3
<?php
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>


Case 4
<?php
include "../../cpmfetch/cpmfetch.php";
$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>


Thanks.

CGC













Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CPMFetch, open statements
« Reply #18 on: October 26, 2006, 05:45:29 pm »


... see post above...


No, but at least I see consistency in your madness.

Think of it this  way.  Whatever file you are using to display pictures in needs to know how to get from where it is, to where cpmfetch.php is... not the cpmfetch directory, that is just there because most of the time you are coming from outside.

So if you are in the same directory as cpmfetch.php then all of the following would work:

Code: [Select]
include "cpmfetch.php";You are already in the same directory, so you just need to point at the file

Code: [Select]
include "./cpmfetch.php";The single dot means "this directory" so this would work as well

Code: [Select]
include "../cpmfetch/cpmfetch.php";The two dots means go up one directory (aka parent directory).  So in this case this works, but is stupid.  You are effectively going up one directory, then back into the cpmfetch directory and there is the file cpmfetch.php

So lets say your testpage.php is located like so:

/mystuff/subdirectory/testpage.php

and cpmfetch.php is installed like so:

/photos/cpmfetch/cpmfetch.php

How do you tell testpage.php where cpmfetch.php is in your include?

Code: [Select]
include "../../photos/cpmfetch/cpmfetch.php";
The first two dots bring you up into the mystuff directory
The second two dots bring you up into the root of your web site
The photos takes you down into the photo directory
The cpmfetch brings you into the cpmFetch directory
The cpmfetch.php names the file you want to include

I can't be much more help beyond this...  So hopefully this cleared a few things up to you.

Vuud












Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: I cannot get my images displayed!
« Reply #19 on: October 27, 2006, 07:15:12 am »

@Vuud: I admire your patience ;)
Logged
Pages: [1] 2   Go Up
 

Page created in 0.048 seconds with 16 queries.