| Author |
Message |
xgate32
Beginner


Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 6:57 am Post subject: gallery 1.4.1-cvs-b139 with Random Block Error |
|
|
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 |
|
|
AdBot
|
| Post subject: gallery 1.4.1-cvs-b139 with Random Block Error |
|
|
|
|
|
| Back to top |
|
 |
xgate32
Beginner


Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 7:02 am Post subject: |
|
|
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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 7:02 am Post subject: |
|
|
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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 7:03 am Post subject: |
|
|
Quote: › My block-NG-random.php is
<?php
$gallery;
it should be Code: › <?php
global $gallery; |
|
| Back to top |
|
|
xgate32
Beginner


Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 7:29 am Post subject: |
|
|
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 |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 7:30 am Post subject: |
|
|
| that error i have not come across at all. make sure all the "require" statements are "require_once"... |
|
| Back to top |
|
|
xgate32
Beginner


Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Fri Oct 10, 2003 7:50 am Post subject: |
|
|
Quote: ›
make sure all the "require" statements are "require_once"...
is modify random_support.php or block-NG-random.php? |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Fri Oct 10, 2003 8:36 am Post subject: |
|
|
| both |
|
| Back to top |
|
|
xgate32
Beginner


Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Sun Oct 12, 2003 12:37 am Post subject: |
|
|
still error remain...  |
|
| Back to top |
|
|
xgate32
Beginner


Joined: May 26, 2003 Posts: 16 Location: Korea, South
|
Posted: Sun Oct 12, 2003 3:27 am Post subject: |
|
|
with b146, it work fine!!  |
|
| Back to top |
|
|
boubele
Beginner


Joined: Nov 29, 2003 Posts: 12
|
Posted: Sat Nov 29, 2003 8:54 am Post subject: Re: gallery 1.4.1-cvs-b139 with Random Block Error |
|
|
| What about the final version of 1.4.1, did that work for you ? |
|
| Back to top |
|
|
|
|
|
|
|