| Author |
Message |
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
Posted: Fri Aug 01, 2003 2:28 pm Post subject: Most view and Newalbums error |
|
|
When activating block-newAlbums.php and block-mostViewed.php together the following error occurs:
Fatal error: Cannot redeclare fs_copy() (previously declared in /home/www/public_html/modules/gallery/platform/fs_unix.php:22) in /home/www/public_html/modules/gallery/platform/fs_unix.php on line 22
Just so you know the blocks work fine independantly of each other.
Can this be fixed so both will run without an error?
Thanks
----
Gallery version: 1.3.4pl1
Apache version: Apache/1.3.28
PHP version 4.3.2
Graphics Toolkit: imageMagick
Operating system: XP Pro
Web browser/version (if applicable): IE6 and NS7.1 |
|
| Back to top |
|
|
AdBot
|
| Post subject: Most view and Newalbums error |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Aug 01, 2003 2:31 pm Post subject: Re: Most view and Newalbums error |
|
|
| check that both files use: Code: ›
require_once($GALLERY_BASEDIR."init.php");
near the top of the files. this is the only thing that can be causing the error. |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
Posted: Fri Aug 01, 2003 4:03 pm Post subject: |
|
|
| Yes, the line is in both. |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Aug 01, 2003 5:03 pm Post subject: |
|
|
| what's the URL? |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Aug 06, 2003 7:28 am Post subject: |
|
|
| do you have the most recent versions of both blocks? if so, there shouldn't be any problem... http://phpnuke.nukedgallery.net has all the blocks running with no issues. |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
Posted: Wed Aug 06, 2003 11:54 am Post subject: |
|
|
I know, I know. phpnuked.....looks great!!!
I got the blocks from here, but will check that I got the latest ones.
Thanks. |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Aug 07, 2003 7:22 am Post subject: |
|
|
open the random_support.php file.
find the function get_random_photo_id()
find the following line of code:
Code: ›
// Check the cache file to see if it's up to date
$rebuild = 1;
make sure that $rebuild is set to 1. |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
Posted: Thu Aug 07, 2003 11:22 am Post subject: |
|
|
Great! That appears to have fixed that one!
This is how it looked:
Quote: ›
// Check the cache file to see if it's up to date
$rebuild = 0;
if (fs_file_exists(CACHE_FILE)) {
$stat = fs_stat(CACHE_FILE);
$mtime = $stat[9];
if (time() - $mtime < CACHE_EXPIRED) {
$rebuild = 1;
This is the only way it would stop the error
Quote: ›
// Check the cache file to see if it's up to date
$rebuild = 1;
if (fs_file_exists(CACHE_FILE)) {
$stat = fs_stat(CACHE_FILE);
$mtime = $stat[9];
if (time() - $mtime < CACHE_EXPIRED) {
$rebuild = 1;
Doesn't having both $rebuild = 1; pretty much void out the if statement?
Don't care! It works now. (At least I didn't get the error when loading the page) It usually happens on the first load.
U da man!  |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
Posted: Sat Aug 23, 2003 1:02 am Post subject: |
|
|
| No more answers? |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Sat Aug 23, 2003 6:42 am Post subject: |
|
|
this issue was discussed some time ago on the gallery forums, and i can't recall off the top of my head what the best solution was. i'm not too sure why having it set to 0 will give you the error...  |
|
| Back to top |
|
|
yourtoby
Novice


Joined: Aug 01, 2003 Posts: 21
|
Posted: Sat Aug 23, 2003 10:26 am Post subject: |
|
|
 |
|
| Back to top |
|
|
|
|
|
|
|