SUPPORT FOR VERSION 1.9.x IN HERE ONLY (Really) - this is the 2.0 beta test run - Page 3 SUPPORT FOR VERSION 1.9.x IN HERE ONLY (Really) - this is the 2.0 beta test run - Page 3
 

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

SUPPORT FOR VERSION 1.9.x IN HERE ONLY (Really) - this is the 2.0 beta test run

Started by vuud, August 26, 2006, 03:54:26 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

jam1

Hold the press - I see the error of my ways!

Of course it can't find the file cpmfetch.inc.php - it's not in the 1.9.4 version
So I changed it from cpmfetch.inc.php to cpmfetch_config.php and it works!!!!  :D

Thanks again!

vuud

Quote from: jam1 on December 26, 2006, 05:13:51 AM
Hi,
   Thank you for replying so promptly. I tried the code that you suggested (I actually had tried this code at an earlier time). When I do, I get the following error:

Error: config file ./cpg140/cpmfetch/cpmfetch.inc.php specified but was not found

cpg140 directory is definitely there. It is the directory with all of the coppermine files and gallery and it is at the root level.
index.php is at the root level
cpmfetch is a directory within the cpg140 directory



Is the cpmfetch.inc.php file there?  It gets generated when you run the install.php program


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

Figanomics

Quote from: vuud on December 27, 2006, 12:27:17 AM
Is the cpmfetch.inc.php file there?  It gets generated when you run the install.php program




I'm having the exact same problem. cpmfetch.inc.php hasn't been generated.

However I get the following error:

Fatal error: Call to undefined method cpm::viewLastAddedMedia() in /figureimages.co.uk/latestimage.php on line 6

http://www.figureimages.co.uk/latestimage.php

Figanomics

Hmm I can't edit y post. Ah well. I forgot to add the following information:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
$source "cat=4,5,6,7,8,9,10,11,13,34";
$options = array( 'imagelink' => 'album' 'imagewidth' => '200' );
$objCpm->viewLastAddedMedia(1,1,"",$options);
$objCpm->cpm_close();
?>



I'm not the best at coding so I gather it may be an error on my part.

vuud

Quote from: Figanomics on December 27, 2006, 04:52:00 PM
Hmm I can't edit y post. Ah well. I forgot to add the following information:

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
$source "cat=4,5,6,7,8,9,10,11,13,34";
$options = array( 'imagelink' => 'album' 'imagewidth' => '200' );
$objCpm->viewLastAddedMedia(1,1,"",$options);
$objCpm->cpm_close();
?>




I'm not the best at coding so I gather it may be an error on my part.


It's just like the error says... it can't be found.  the actual call you want is below:

$objCpm->cpm_viewLastAddedMedia(1,1,"",$options);
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

Figanomics


cgc0202

Hi Vuud,

I do not know what version the others are talking about, I am trying to make the cpmfetch v1.9.5.

Here are what I have tried:

Method 1:
The following are in the main directory:
*/gal001  -> this is the CPG folder
*/cpmfetch2  -> this is the cpmfetch folder
*/pics  -> this is the directory where the photos are kept (outside of the CPG) folder

Intallation:
http:/mysite.org/cpmfetch2/install.php

Result:
ERROR: Did not find config file at ../include/config.inc.php
Fatal error: Call to undefined function: getdefaults() in /home/public/public_html/cpmfetch2/cpmfetch_dao.php on line 69

__________
The error was localized here:
__________
   // TODO: Add config file versus dao version check here
   
   // Load config settings
   $this->cfg =
         array_merge(getDefaults(),
         getCpgConfiguration(),
         getUserDefined(),
         getUserOverrides()
         );

__________

Notes:
Correction1&2 applied:
../cpmfetch2/cpmfetch.inc.php
or
../../cpmfetch2/cpmfetch.inc.php
did not rectify the error, nor trigger population of the "cpmfetch_config.php"



Method 2:
The following are in the main directory:
*/gal001  -> this is the CPG folder
*/pics  -> this is the directory where the photos are kept (outside of the CPG) folder

*/gal001/cpmfetch2  -> this is the cpmfetch folder

Result:
Test images:
If all went well, you will see some random images from your gallery displayed here. If not, you may in fact have a problem and will need to seek help by clicking here.
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000d_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000a_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_32.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_31.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000d_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000a_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_32.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_31.jpg
%f

%h views    %f1

%h views    %f2

%h views    %f3

%h views        %f4

These images were generated by using the following PHP code:

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

For Method 2, while the images did not show up, the links: %f1 ~ %f2 ~ %f3 & %f4 were clickable and provide the correct images.

Also, the  "cpmfetch_config.php" file was populated with the values relevant to gal001:

// Full URL to your CPG gallerys album directory
//  $cfg['cpg_album_url'] = 'http://mysite.org/gal001/../pics/';

The Method 1 over Method 2 configuration would be preferred.

I think the "override function" would still be needed because of the unique location of the photos.  There are related questions, but I will raise those later.  Thanks.

Cornelio



vuud


If you are not putting cpmfetch under your CPG directory, the installation will not work.  But it will then give you a box that you can enter a relative path into.

If you enter:

../gal001/

into that box, the installation should work. 





Quote from: cgc0202 on December 31, 2006, 02:00:48 PM
Hi Vuud,

I do not know what version the others are talking about, I am trying to make the cpmfetch v1.9.5.

Here are what I have tried:

Method 1:
The following are in the main directory:
*/gal001  -> this is the CPG folder
*/cpmfetch2  -> this is the cpmfetch folder
*/pics  -> this is the directory where the photos are kept (outside of the CPG) folder

Intallation:
http:/mysite.org/cpmfetch2/install.php

Result:
ERROR: Did not find config file at ../include/config.inc.php
Fatal error: Call to undefined function: getdefaults() in /home/public/public_html/cpmfetch2/cpmfetch_dao.php on line 69

__________
The error was localized here:


getdefaults comes from the config file the installation generates.  No config file = no workee




Quote

__________
   // TODO: Add config file versus dao version check here
   
   // Load config settings
   $this->cfg =
         array_merge(getDefaults(),
         getCpgConfiguration(),
         getUserDefined(),
         getUserOverrides()
         );

__________

Notes:
Correction1&2 applied:
../cpmfetch2/cpmfetch.inc.php
or
../../cpmfetch2/cpmfetch.inc.php
did not rectify the error, nor trigger population of the "cpmfetch_config.php"



Method 2:
The following are in the main directory:
*/gal001  -> this is the CPG folder
*/pics  -> this is the directory where the photos are kept (outside of the CPG) folder

*/gal001/cpmfetch2  -> this is the cpmfetch folder

Result:
Test images:
If all went well, you will see some random images from your gallery displayed here. If not, you may in fact have a problem and will need to seek help by clicking here.
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000d_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000a_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_32.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_31.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000d_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_281162401_1000a_b.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_32.jpg
Error in getImageTouse: Extension (strtolower): .jpg File:/../pics/c/cgc/kew/t_10kkew_31.jpg
%f

%h views    %f1

%h views    %f2

%h views    %f3

%h views        %f4

These images were generated by using the following PHP code:

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

For Method 2, while the images did not show up, the links: %f1 ~ %f2 ~ %f3 & %f4 were clickable and provide the correct images.

Also, the  "cpmfetch_config.php" file was populated with the values relevant to gal001:

// Full URL to your CPG gallerys album directory
//  $cfg['cpg_album_url'] = 'http://mysite.org/gal001/../pics/';

The Method 1 over Method 2 configuration would be preferred.

I think the "override function" would still be needed because of the unique location of the photos.  There are related questions, but I will raise those later.  Thanks.

Cornelio

I don't know about that... the new way does a lot of things better... including getting the location of the albums and stuff directly from coppermine.


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

jam1

Quote from: vuud on December 27, 2006, 12:27:17 AM
Is the cpmfetch.inc.php file there?  It gets generated when you run the install.php program




I did in fact run the install.php program and it is not generating the cpmfetch.inc.php file. I keep getting the same error. On a separate note, once you're in the coppermine gallery viewing pictures how do you return to the website. When I click on the back button, I'm only backing within coppermine.

vuud

Quote from: jam1 on January 04, 2007, 08:41:59 PM
I did in fact run the install.php program and it is not generating the cpmfetch.inc.php file. I keep getting the same error. On a separate note, once you're in the coppermine gallery viewing pictures how do you return to the website. When I click on the back button, I'm only backing within coppermine.

Mostly cause I am an idiot, and / or stay up to late.

I should generate an cpmfetch_config.php file NOT a cpmfetch.inc.php file.

Sigh.
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

Zarzal

Little bugs on copperminefetch-1.9.6-dev.zip

I take a closer look on my php error file (php5.2.0) and see while using this version one old problem and one new problem.
The new one: in cfimageget.php there are 2 undefined variables.

I put in line 137 $config_file="";
and in line 231 $filenametoshow="";

to fix this.

The other one. I use this little script to display random pictures:


<?php 
require_once "cfimageget.php";
$cpmfetch = new cfimageget();
$cpmfetch->setSourceString("cat=13");
$cpmfetch->getRandom();
?>


In the php errorlog I get the following while using this script:
PHP Notice: Undefined offset: 1 in /var/www/.../gallerie/cpmfetch/cfimageget.php on line 235

this line contains:
switch (strtolower(substr($row[1],strrpos($row[1],'.')))) {

I notice this problem in the older v1.6 too.

vuud

Quote from: Zarzal on January 08, 2007, 12:49:36 AM
Little bugs on copperminefetch-1.9.6-dev.zip

I take a closer look on my php error file (php5.2.0) and see while using this version one old problem and one new problem.
The new one: in cfimageget.php there are 2 undefined variables.

I put in line 137 $config_file="";
and in line 231 $filenametoshow="";

to fix this.

The other one. I use this little script to display random pictures:


<?php 
require_once "cfimageget.php";
$cpmfetch = new cfimageget();
$cpmfetch->setSourceString("cat=13");
$cpmfetch->getRandom();
?>


In the php errorlog I get the following while using this script:
PHP Notice: Undefined offset: 1 in /var/www/.../gallerie/cpmfetch/cfimageget.php on line 235

this line contains:
switch (strtolower(substr($row[1],strrpos($row[1],'.')))) {

I notice this problem in the older v1.6 too.

Okay, I really need to go through the whole cfimageget file...  I did the RSS one for the last dev release, but will overhaul that one for the next dev release.

Thanks for reporting the bugs!  I definately appreciate it.  :D







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

jerx

I am using 1.9.7 and it works fine. The only problem I have is that cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="") has some hard coded language.

I like to adjust the words to the selected/default language of my phpbb forum. If that is not possible, it would be nice to use the cpg language setting. I tried the ladder, but the language definition had not been recognized.

Can you please help me on this?

vuud

Quote from: jerx on January 24, 2007, 05:46:59 PM
I am using 1.9.7 and it works fine. The only problem I have is that cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="") has some hard coded language.

I like to adjust the words to the selected/default language of my phpbb forum. If that is not possible, it would be nice to use the cpg language setting. I tried the ladder, but the language definition had not been recognized.

Can you please help me on this?

I will do what I can..  Can you post it to it's own thread?  Sounds like this is gonna be one to remember :)
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

jerx

I have a problem with performance. My gallery is pretty big (20,000+ photos). When I use cpmfetch my site loads at least 1 second longer than normal. I use the random album and the latest updated albums functions. All other functions are not needed. Is there anything I can do to decrease page generation time?

DZGB

Hi... I would need some help, I'm trying to install cpmfetch for 3 days already - and I don't know what is the problem - is it so complicated, am I stupid or it's something weird going on...

I tried many versions, and I couldn't get it right. I'm using wordpress 2.0.2. and currently installing copperminefetch-1.9.8-dev.
With this last one I did everything as I should, I changed attributes to 777, but I can't seem to run install.
When I enter RIGHT url, the browser opens homepage of the site.

If I try entering code to the sidebar

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

I get a message it will be available after installing, and also i used to get this message

Warning: main(./galerija/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home2/sevenac/public_html/wp-content/themes/seve/sidebar.php on line 66

Warning: main() [function.include]: Failed opening './galerija/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php') in /home2/sevenac/public_html/wp-content/themes/seve/sidebar.php on line 66

Fatal error: Cannot instantiate non-existent class: cpm in /home2/sevenac/public_html/wp-content/themes/seve/sidebar.php on line 67


I really don't know what else to try.. I'm far from being an expert but anyway...
Also the sidebar spreads widely and destroys total layout of the site.
Should I try something or forget about this forever?

vuud

Quote from: DZGB on February 15, 2007, 12:32:07 AM
Hi... I would need some help, I'm trying to install cpmfetch for 3 days already - and I don't know what is the problem - is it so complicated, am I stupid or it's something weird going on...

I tried many versions, and I couldn't get it right. I'm using wordpress 2.0.2. and currently installing copperminefetch-1.9.8-dev.
With this last one I did everything as I should, I changed attributes to 777, but I can't seem to run install.
When I enter RIGHT url, the browser opens homepage of the site.

If I try entering code to the sidebar

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

I get a message it will be available after installing, and also i used to get this message

Warning: main(./galerija/cpmfetch/cpmfetch.php) [function.main]: failed to open stream: No such file or directory in /home2/sevenac/public_html/wp-content/themes/seve/sidebar.php on line 66

Warning: main() [function.include]: Failed opening './galerija/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php') in /home2/sevenac/public_html/wp-content/themes/seve/sidebar.php on line 66

Fatal error: Cannot instantiate non-existent class: cpm in /home2/sevenac/public_html/wp-content/themes/seve/sidebar.php on line 67


I really don't know what else to try.. I'm far from being an expert but anyway...
Also the sidebar spreads widely and destroys total layout of the site.
Should I try something or forget about this forever?


What version exactly of cpmfetch, and did you get the install.php to run?  If the install does not run, then nothing else will work.



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: jerx on February 14, 2007, 03:34:05 AM
I have a problem with performance. My gallery is pretty big (20,000+ photos). When I use cpmfetch my site loads at least 1 second longer than normal. I use the random album and the latest updated albums functions. All other functions are not needed. Is there anything I can do to decrease page generation time?

Which functions exactly?  The extra functions if not used will not do anything to help performance by removing (anything noticable anyway)

Can you include your page code here also?  That could help.

Thx


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

jerx

The additional time for cpmfetch is less than I thought. On some page loads it was only 0.7 seconds more, about the same time as my gallery needs to parse. So this might be normal - bigger gallery -> longer page generation time. Anyways ...

I only use these two functions:
$objCpm->cpm_viewRandomMedia(1,2, array('alttag' => '%a, %f')),
$objCpm->cpm_showAlbumsUpdatedOverLastDays(10, array('alttag' => '%a %w', 'subtitle' => '%a, %f', 'imagelink' => 'album')),

I am using phpbb and the code is spread over several files. I have zipped all files and attached the zip to this post. The main file is portal.php. I have also added my modified cpmfetch files. I doubt that these are causing longer page loads, because the original files have the same impact.

vuud

Quote from: jerx on February 15, 2007, 06:22:36 AM
The additional time for cpmfetch is less than I thought. On some page loads it was only 0.7 seconds more, about the same time as my gallery needs to parse. So this might be normal - bigger gallery -> longer page generation time. Anyways ...

I only use these two functions:
$objCpm->cpm_viewRandomMedia(1,2, array('alttag' => '%a, %f')),
$objCpm->cpm_showAlbumsUpdatedOverLastDays(10, array('alttag' => '%a %w', 'subtitle' => '%a, %f', 'imagelink' => 'album')),

I am using phpbb and the code is spread over several files. I have zipped all files and attached the zip to this post. The main file is portal.php. I have also added my modified cpmfetch files. I doubt that these are causing longer page loads, because the original files have the same impact.

I will have a look at your code...  One thing you can do - if you are on the dev versions is to set

$cfg['cfUseExistingDBConnection'] = 'true';

In the configuration file.  The important thing here is that you do NOT use the cpm->close() statement.  Or maybe you can, I forget if the code / php handles that correctly.  Try it with it, if you get lots of errors from PHPBB, then take it out.

This will tell cpmfetch to use an existing database connection, which will help alot if your PHPBB and CPG data are in the same database.

I will get back to you on the code later
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