CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 24 CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 24
 

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

CpmFetch 1.4 On... Displaying data and images from CPG on your website

Started by vuud, July 08, 2005, 06:43:10 AM

Previous topic - Next topic

0 Members and 9 Guests are viewing this topic.

kehbop

QuoteGet the owner_id of the photos from the pictures table and make sure that Id exists in the users table.

If not, create another cpg user... that will be the real owner for the photos and all will work well

those were the two suggestions you told me to do. The first one sounds complicated, but I think the second one might work. But I don't know exactly what you mean. Can you explain it again?

Thanks!

vuud

Quote from: kehbop on December 06, 2005, 03:12:45 AM
those were the two suggestions you told me to do. The first one sounds complicated, but I think the second one might work. But I don't know exactly what you mean. Can you explain it again?

Thanks!

I can try.  Bear in mind I may forget a step, but you should be able to figure it out from there.

1. Log into coppermine gallery as an admin
2. Click on "users" from the admin menu
3. Click "new user"
4. Give the new user a funny name... this is important.

Important note:  There is a difference between funny and offensive.  I would strongly suggest the former over the latter.  Examples of funny names would be like:

Balzack Blisterfrog
Tuggmabellz Fugnutter
Licquema Svettynutz
I.P. Daily
Etc.

Offensive user names are like offensive passwords.  They have a habit of being revealed at the worst times.

5. Assign the user whatever for a password since you will never use it again.

Now repeat the above steps 3-5 once for each PHPBB user you have adding photos.  Step 4 will be the most challenging as coming up with funny names is not as easy as it seems.  Alternatively you could go with the names of the seven dwarfs if you could remember them and if you have less than 8 users to add.

Good luck

Baron Von Flatulator

( I appologize if anyone reading this actually has one of those names.  I mean, I am really really sorry if you have one of those names)





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

n3n

Hi Vuud, good to see you continued developing CPMFetch (tested the first version for you long time ago :))

I started using CPG again, and therefore also want to use the new cpmfetch version. Im having problems with the cftest.php i get alot
of errors.


Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 213

Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 214

Notice: Undefined index: SCRIPT_FILENAME in c:\domains\grafflix.nl\wwwroot\cftest.php on line 214

Notice: Undefined index: DOCUMENT_ROOT in c:\domains\grafflix.nl\wwwroot\cftest.php on line 221
5 You set your partial URL to /flix PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Windows NT SOHOSTED12 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: Not found BAD
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is a good match PASS
80 CPG Config file not found: /flix/include/config.inc.php FAIL


The path to the CPG config file is correct, so i really dont understand how to fix it.



You have some time to help me ?

My hosting rund IIS, heard CPMFetch has alot of errors with it..

Peace !

vuud

Quote from: n3n on December 06, 2005, 11:52:42 PM

My hosting rund IIS, heard CPMFetch has alot of errors with it..

Peace !


Hey!  Good to see you live.  Welcome back.

Owwwwch.  Cpmfetch has no errors with IIS.  They just don't seem to set the correct variables for the server info at least use a standard.

The best way is to find a host that runs a server OS and not a desktop OS.  :D

Second best, is to set something like this before your call to start cpmfetch (You'll have to edit the cftest.php file)

$_SERVER['DOCUMENT_ROOT'] = "/use/the/filesystem/path/to/your/document/root/here";

This will set what cpmfetch is looking for.

The next release is my self titled "Godfather release" - as in the line "Today is the day I settle all cpmfetch business"...  So IIS problems will go away along with a lot of other revealled weakness over time.  Some stuff I just did not think of when I wrote the first round.

Sigh.

Ah well, let me know how this works out.

Vuud

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

n3n

Tnx for the quick reply Vuud, it kinda worked. The path error is gone, only errors left  are:

70   SCRIPT_FILENAME: Not found   BAD
75   DOCUMENT_ROOT is not a good match

Not getting a thumbnal with the tester though.
Gonna Try some stuff and let you know if i succeed.

Greets

n3n

Also gives me this:  Unknown column 'u.user_website' in 'field list'

Note that CPG is bridged with SMF, and SMF is bridged with Joomla.

n3n

Hmm it didnt work out  8)

Any more ideas ? tried the latest dev version, also no luck.

fanime7

Quote from: n3n on December 07, 2005, 11:05:20 AM
Also gives me this:  Unknown column 'u.user_website' in 'field list'

Note that CPG is bridged with SMF, and SMF is bridged with Joomla.

hmm I don't know whats wrong but it works if I replace it with a 1.41 cpmfetch_dao.php - I still get the error DOCUMENT_ROOT is not a good match but it seems to load the pictures correctly.

if I use the latest pmfetch_dao.php I get the same error/problem as you.  I try to fix it with the document_root variable but no luck.

vuud

Quote from: fanime7 on December 08, 2005, 01:08:23 AM
hmm I don't know whats wrong but it works if I replace it with a 1.41 cpmfetch_dao.php - I still get the error DOCUMENT_ROOT is not a good match but it seems to load the pictures correctly.

if I use the latest pmfetch_dao.php I get the same error/problem as you.  I try to fix it with the document_root variable but no luck.


The user table not found is probably due to using the new version of cpg and not following the release notes in the readme.  You need to comment and uncomment some lines in cpmfetch_dao so it knows what files to look for.

Not sure why the document_root thing would not do it.

Strange
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

n3n

removed some lines from the dao. the mysql error message is gone,  but still not thumbnails to see. :-X
guess ill have to wait for the "Godfather" release.

Colegota

Hi!

I've tried to find this error on forum first, but I can't have the same problem first.

I run the cftest.php program and also an small one from doc. It looks to work but images are not shown. No errors reported, so I see that the html generated for images is like

img  src="//albums/...

That's starting with a double slash (//).
I suppose that I made some mistake in configuration variables, but I can't find it.
I have both coppermine and cpmfetch at root directory, so I usually put an "/" in variables.

This is my start of cftest.php
$ChangeThisToYourPartialUrlToCPG = "/";

All results are "PASS" or "INFO", but no image displayed.

In cpmfetch.php
class cpm {

//The following 3 entries can be adjusted if you are using non-standard prefixes in CPG
var $thumbnailprefix = "thumb_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';
var $defaultimagesize = "thumb_";

// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////

//  ... really

// //////////////////// NO USER SERVICEABLE PARTS BEYOND THIS POINT ////////////////////////

var $VERSION = "1.6.2";

var $cpm = "";
var $urltocpm = "/";       //from a web client point of view without domain name /photos
var $filepathtocpm = "";  //server path to cpm directory  /home/vuud/cpm

var $optionHash = array(); //Contains the options submitted by the user
var $styleHash = array();

var $returntype = "print"; // print, html, resultset
var $debugMode = false;


And a little test program with same results.
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
include "cpmfetch.php";
$objCpm = new cpm('/');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);
$objCpm->cpm_close();
?>



I also noticed that url to last images are given with a negative value, but it works. Like that:
a href="/displayimage.php?pos=-1458"

Thanks,
Colegota

vuud

Quote from: n3n on December 08, 2005, 11:19:31 AM
removed some lines from the dao. the mysql error message is gone,  but still not thumbnails to see. :-X
guess ill have to wait for the "Godfather" release.

If you are bridged, you need to create some users in coppermine photo gallery.  The problem is that the bridge allows for users to be created elsewhere.

So when we try to figure out who owner #3 is (for example), CPG has no information on it.

So if you have say, 3 PHPBB users, you need to just add three users to cpg.  names or anything do not need to match up or anything.... just something there.

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

Quote from: Colegota on December 08, 2005, 02:43:19 PM

I run the cftest.php program and also an small one from doc. It looks to work but images are not shown. No errors reported, so I see that the html generated for images is like

img  src="//albums/...

That's starting with a double slash (//).
I suppose that I made some mistake in configuration variables, but I can't find it.
I have both coppermine and cpmfetch at root directory, so I usually put an "/" in variables.


No mistakes.  That is just how it works out when cpg is installed in the root.  The double slash should not affect anything - its an eyesore that is resolved in the next release.



Quote
This is my start of cftest.php
$ChangeThisToYourPartialUrlToCPG = "/";

All results are "PASS" or "INFO", but no image displayed.


Are you bridged with SMF, PHPBB, Joomba, Mambo, or any other one, etc...?  If so you have the regular user display problem.  See my post above to n3m on this, and for more information see the "embedding in SMF, PHPBB..."  etc thread.  Its also been discussed here a few times.

Again, will be resolved in the next release.

Quote
I also noticed that url to last images are given with a negative value, but it works. Like that:
a href="/displayimage.php?pos=-1458"

This is normal. 


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

Colegota

Quote from: vuud on December 08, 2005, 05:07:27 PM
Are you bridged with SMF, PHPBB, Joomba, Mambo, or any other one, etc...?  If so you have the regular user display problem.  See my post above to n3m on this, and for more information see the "embedding in SMF, PHPBB..."  etc thread.  Its also been discussed here a few times.

No. I just have Coppermine (and cpmfetch) installed on this server.
I use SMF and Wordpress in other servers (accesing images on cpg server), but for the moment I'm just testing on coppermine server.

This is the code generated for one of images
<img  src="//albums/mapamundi/china2005/thumb_IMG_0777.JPG"
class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   />


But as you can see, image
http://www.mapamundi.org//albums/mapamundi/china2005/thumb_IMG_0777.JPG
is correct and works.

BTW I'm using cfimageget from other servers and it works fine.

Regards,
Colegota

Colegota


vuud

Quote from: Colegota on December 08, 2005, 05:40:29 PM
BTW If you need to see it I'll keep this online for some time:

http://www.mapamundi.org/cftest.php

Thanks,
Colegota


Thanks.  While it did not help. 

If cfimageget is working from another server, maybe it is the extra slashes.   But I'd be surprised since you'd be the first to report that problem I think.

Okay, version 1.7 fixes that - will be out probably by the end of the weekend.  I have the installer that is almost done and then everyones problems will go away, things will be wonderful, children will dance in the streets and the wine will flow like... well... I'm gonna drink a lot.   Yeah.  Thats the plan.

I need a nap

EDIT:  You could always just move to using it in the site somewhere.  Maybe the cftest program is screwy.


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

Colegota

Hi!

Yes. It's the double slash. I did take the html code generated for a test sample and removed one slash just in the first image.
Here you can see the result
http://www.mapamundi.org/prueba-cpmfetch.html

After that I look into your examples page code and noticed that in that case the double slash is in the middle of url due to you have a "/photos" directory, so your code is
img  src="/photos//albums/..."
While mine is just
img  src="//albums/..."

Maybe this is the difference, cause I can see your samples without problem.

I have two computers and I tested in both, one is Mandriva Linux 10.2 with Mozilla 1.7 and Konqueror 3.2.3, and other is a Mandriva Linux 2005 LE with Mozilla Firefox 1.0.2.

So I wait for new version. I hope you enjoy your drink as we enjoy your code. ;)

Thank you again,
Colegota

vuud

Quote from: Colegota on December 08, 2005, 08:57:58 PM
Hi!

Yes. It's the double slash. I did take the html code generated for a test sample and removed one slash just in the first image.
Here you can see the result
http://www.mapamundi.org/prueba-cpmfetch.html

After that I look into your examples page code and noticed that in that case the double slash is in the middle of url due to you have a "/photos" directory, so your code is
img  src="/photos//albums/..."
While mine is just
img  src="//albums/..."

Maybe this is the difference, cause I can see your samples without problem.

I have two computers and I tested in both, one is Mandriva Linux 10.2 with Mozilla 1.7 and Konqueror 3.2.3, and other is a Mandriva Linux 2005 LE with Mozilla Firefox 1.0.2.

So I wait for new version. I hope you enjoy your drink as we enjoy your code. ;)

Thank you again,
Colegota



The extra slash is due to the awful way in which I handle CPG being in the home directory.  It was bad evil code, and was removed for the new version.



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

farhan

Hello

I installed 1.4.2 and applied the fix you had couple of pages back, but now i am getting another error

Quote
Notice: Undefined property: sqlPictureAlbumSelect in /home/isbunder/public_html/cpmfetch/cpmfetch_dao.php on line 457You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM gAllEry_pictures as p, gAllEry_albums as a, gAllEry_usersWarning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/isbunder/public_html/cpmfetch/cpmfetch_dao.php on line 710

http://www.isbunderground.com/cpmfetch/cftest.php


vuud

Quote from: farhan on December 09, 2005, 01:00:41 PM
Hello

I installed 1.4.2 and applied the fix you had couple of pages back, but now i am getting another error

http://www.isbunderground.com/cpmfetch/cftest.php



Wierd.  The sqlPictureAlbumSelect is where it all starts going downhill... why that is undefined is a new one on me.

I'll poke it a bit

Thanks for providing the link - it helps.



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