| Author | Message |
| Post Title: gallery 1.4.1-cvs-b139 with Random Block Error | |
xgate32
Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 6:57 am
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): |
| Author | Message |
| Post Title: | |
xgate32
Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 7:02 am
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); } ?> |
| Author | Message |
| Post Title: | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 7:02 am
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. |
| Author | Message |
| Post Title: | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 7:03 am
Quote: › My block-NG-random.php is
<?php $gallery; it should be Code: › <?php
global $gallery; |
| Author | Message |
| Post Title: | |
xgate32
Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 7:29 am
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... |
| Author | Message |
| Post Title: | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 7:30 am
that error i have not come across at all. make sure all the "require" statements are "require_once"...
|
| Author | Message |
| Post Title: | |
xgate32
Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 7:50 am
Quote: ›
make sure all the "require" statements are "require_once"... is modify random_support.php or block-NG-random.php? |
| Author | Message |
| Post Title: | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 8:36 am
both
|
| Author | Message |
| Post Title: | |
xgate32
Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Sun Oct 12, 2003 12:37 am
still error remain...
|
| Author | Message |
| Post Title: | |
xgate32
Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Sun Oct 12, 2003 3:27 am
with b146, it work fine!!
|
| Author | Message |
| Post Title: Re: gallery 1.4.1-cvs-b139 with Random Block Error | |
boubele
Joined: Nov 29, 2003 Posts: 12
|
Posted: Sat Nov 29, 2003 8:54 am
What about the final version of 1.4.1, did that work for you ?
|