Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

gallery 1.4.1-cvs-b139 with Random Block Error

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Fri Oct 10, 2003 6:57 am    Post subject: gallery 1.4.1-cvs-b139 with Random Block Error Reply with quote

Random Block working with gallery 1.4.1-cvs-b128
But, when i install gallery b139, random block not working.
Error is util.php
readdir(), closedir() error.

Warning: readdir(): supplied argument is not a valid Directory resource in d:\apache\htdocs\modules\gallery\util.php on line 3020

Warning: closedir(): supplied argument is not a valid Directory resource in d:\apache\htdocs\modules\gallery\util.php on line 3036

How can fix this?


Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):http://21tos.codns.com/modules/gallery
http://21tos.codns.com/modules.php?name=gallery
Gallery version: 1.4.1-cvs-b139
Apache version: 1.3.28
PHP version (don't just say PHP 4, please): 4.3.3
Graphics Toolkit:
Operating system:Windows XP Professional
Web browser/version (if applicable):
The CONFIG lines from the top of your block file(s):
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: gallery 1.4.1-cvs-b139 with Random Block Error  

Back to top
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Fri Oct 10, 2003 7:02 am    Post subject: Reply with quote

My block-NG-random.php is

<?php
global $gallery;

if (!empty($HTTP_GET_VARS["GALLERY_BASEDIR"]) ||
!empty($HTTP_POST_VARS["GALLERY_BASEDIR"]) ||
!empty($HTTP_COOKIE_VARS["GALLERY_BASEDIR"])) {
print "Security violation\n";
exit;
}

$GALLERY_BASEDIR = "d:/apache/htdocs/modules/gallery/";
define(ALBUM_BASEADDR, "http://21tos.codns.com/albums/");
define(SERVER_ADDR, "http://21tos.codns.com/");
require_once($GALLERY_BASEDIR . "init.php");
require_once($GALLERY_BASEDIR . "random_support.php");

define(CACHE_FILE, $gallery->app->albumDir . "/block-random.cache");
define(CACHE_EXPIRED, 86400);

/* VALID VALUES FOR $selector:
* "DAILY"
* "HOURLY"
* "RANDOM"
*/

$selector = "RANDOM";

if($selector=="DAILY"){
$content = daily_photo();
}
else if ($selector=="HOURLY"){
$content = hourly_photo();
}
else if ($selector=="RANDOM"){
list($album, $index) = get_random_photo_id();
$content = random_photo($album, $index, 0);
}
?>


Last edited by xgate32 on Fri Oct 10, 2003 7:27 am; edited 2 times in total
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 10, 2003 7:02 am    Post subject: Reply with quote

yeah i got these too...at the top of the file, add:
Code: › global $gallery;

directly below the
Code: › <?php

if that doesn't clear it up, add:
Code: › global $gallery, $GALLERY_BASEDIR;


i noticed these issues cropping up with the latest CVS versions as well. I think it has to do with the register_globals changes that are being made in Gallery.
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 10, 2003 7:03 am    Post subject: Reply with quote

Quote: › My block-NG-random.php is

<?php
$gallery;


it should be
Code: › <?php
global $gallery;
Back to top
Offline View user's profile Send private message Visit poster's website
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Fri Oct 10, 2003 7:29 am    Post subject: Reply with quote

Next Error is

Fatal error: Cannot redeclare editfield() (previously declared in d:\apache\htdocs\modules\gallery\util.php:33) in D:\apache\htdocs\modules\gallery\util.php on line 33

I'll wait next version that this problem solved. Hmm...
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 10, 2003 7:30 am    Post subject: Reply with quote

that error i have not come across at all. make sure all the "require" statements are "require_once"...
Back to top
Offline View user's profile Send private message Visit poster's website
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Fri Oct 10, 2003 7:50 am    Post subject: Reply with quote

Quote: ›
make sure all the "require" statements are "require_once"...

is modify random_support.php or block-NG-random.php?
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Fri Oct 10, 2003 8:36 am    Post subject: Reply with quote

both
Back to top
Offline View user's profile Send private message Visit poster's website
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Sun Oct 12, 2003 12:37 am    Post subject: Reply with quote

still error remain... Crying or Very sad
Back to top
Offline View user's profile Send private message Visit poster's website
xgate32

Beginner
Beginner


Joined: May 26, 2003
Posts: 16
Location: Korea, South

PostPosted: Sun Oct 12, 2003 3:27 am    Post subject: Reply with quote

with b146, it work fine!! Very Happy
Back to top
Offline View user's profile Send private message Visit poster's website
boubele

Beginner
Beginner


Joined: Nov 29, 2003
Posts: 12

PostPosted: Sat Nov 29, 2003 8:54 am    Post subject: Re: gallery 1.4.1-cvs-b139 with Random Block Error Reply with quote

What about the final version of 1.4.1, did that work for you ?
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannOnline internetSEORestaurant Locator • Get great HP coupons from CouponSnapshot • Search for great dell coupons at CouponSnapshot.com.au • Graduation DressesAndroid TabletSEO IndiaBuy Phen375fuel filter

8th year online! 2003-2011
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia