Lightbox Plugin Error Lightbox Plugin Error
 

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

Lightbox Plugin Error

Started by kettwicht, February 02, 2010, 09:55:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kettwicht

Hi all,

I am a new "customer" using the COPPERMINE GALLERY .....
I installed version CPG 1.4.25 ( stable )  and installed the LIGHT_BOX( 1.3 ) Plugin from this DOWNLOAD page via Plugin Manager.
I do tho MOD in the PLUGIN ( modify the lightbox_s.js  ) as described in your forum and everything works fine..... but the PICTURE COUNTER does not work ... !!!!!

When I look in the folder /plugins/light_box I can see a file called : error_log.

[02-Feb-2010 03:08:58] PHP Warning:  require(include/init.inc.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/freierco/public_html/xxxgalerie/plugins/light_box/addhit.php on line 7
[02-Feb-2010 03:08:58] PHP Warning:  require(include/init.inc.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/freierco/public_html/xxxgalerie/plugins/light_box/addhit.php on line 7
[02-Feb-2010 03:08:58] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'include/init.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/freierco/public_html/xxxgalerie/plugins/light_box/addhit.php on line 7
[02-Feb-2010 03:09:10] PHP Warning:  require(include/init.inc.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/freierco/public_html/xxxgalerie/plugins/light_box/addhit.php on line 7


For your information :
Coppermine is installed in a subdiroctory of my HP directory /xxxgalerie and this is my addhit.php in /xxxgalerie/plugins/light_box :

<?php
define
('IN_COPPERMINE'true);

require(
'include/init.inc.php');

if (isset(
$_GET['pid'])) {
  
// Add 1 to hit counter
  
$pid = (int)$_GET['pid'];
  if (!
in_array($pid$USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {
      
add_hit($pid);
      if (
count($USER['liv']) > 4array_shift($USER['liv']);
      
array_push($USER['liv'], $pid);
      
user_save_profile();
  }  
}
?>


Pls HELP a newbie ......  ???

Thx

Kettwicht

Nibbler

Edit lightbox_s.js, find


xmlHttp.open("GET", "plugins/light_box/addhit.php", false);


Change to


xmlHttp.open("GET", "index.php?file=light_box/addhit", false);

kettwicht

thx for your FAST response.......
I will check it !!!!

kettwicht

....after changing the source of lightbox_s.js as adviced the error.log is not written anymore .... but the counter does not WORK !!!!   ???
Can there be another problem ??? ( permission , etc ..... )

I set all the required subdirectories to 755 and when I look into the database the table xxxx_pictures says hits = 0 and lasthit_ip = 'NULL' for every picture.
How can I trace this ? Any suggestions ???

Nibbler

Admin views are not counted. If it doesn't work with a normal account post a link to your gallery.

kettwicht

... I understand That's good,  but I run the Gallery as a CLOSED User GoupG ... No registration allowed... only guest visitors.

Will guest views also not be counted ??? If so how can i change this ??

phill104

Guest views should be counted. Try it, log on as a guest and see what happens. If they do not count then do as suggested and post a link to your gallery.
It is a mistake to think you can solve any major problems just with potatoes.

kettwicht

Hi Supporter,

thx for yout "FAST"  help.   IT works !!!!

Because of the FLAT rate ( static IP ) --- it seemed to me like it doesn't work.

After getting a new IP address  I tried again and ..... everything works fine up to my current mods ....  ;)

Thx again

Kettwicht



Joachim Müller

In the future (instead of waiting to be assigned a new IP address by your provider), you could test using different browsers. Alternatively, you could have used an anonymization proxy. Anyway, the issue was on your end (as you didn't understand that guests are being tracked by their IP address), so I suggest to review your attitude (the word fast in double quotes negates it in this aspect). This is not a hotline anyway. You haven't done as suggested and posted a link to your gallery although that is mandatory per board rules. Board rules explain as well how to resolve your threads properly. If you want support in the future you better respect them.