Fatal error: Cannot redeclare editfield() (previously declar

Beridox

Joined: 2004-11-01
Posts: 6
Posted: Wed, 2004-11-03 17:01

I have php-nuke 7.4 and Gallery v1.4.4-pl2 and try the
block-NG-NewestPhoto.php for 1.4.3 pl2

I am logged in and I acces the gallerymodule i get this error message in the block:
Fatal error: Cannot redeclare editfield() (previously declared in h:\appserv\www\site\modules\gallery\util.php:27) in H:\appserv\www\site\modules\gallery\util.php on line 27

line 27:
function editField($album, $field, $link=null) {

(This is what I got:
Module gallery with permission that only logged in members has access to the gallery module.

Then I have Album1 with 2 sub albums. Album1 has no photos in it at all. )

Someone has any solution?

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Wed, 2004-11-03 17:04

You can't simply include the random block. You MUST include it via http, or you will see this issue.

See the sticky post for instructions.

 
Beridox

Joined: 2004-11-01
Posts: 6
Posted: Thu, 2004-11-04 02:22

I have made a new block and write this

include("http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php");

But I only see this text in the block and no photo.

When I open this in Internet explorer, It shows me the right photo and albumname/link.
http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php

What should I do to get it work in the block?

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Thu, 2004-11-04 02:56

Beridox, did you create a text block, or a php block?

It needs to be a PHP block.

 
Beridox

Joined: 2004-11-01
Posts: 6
Posted: Thu, 2004-11-04 07:16

Were do I choose that?

This is what I do (it’s in Swedish but I hope you will see anyway)

And I create the block. Were do I see what kind of block it is?

Thanks for helping me.

[img]http://www.algonet.se/~anneli_h/if/block1.jpg[/img]

 
Beridox

Joined: 2004-11-01
Posts: 6
Posted: Thu, 2004-11-04 08:53

Now I made a block-test.php file and put it in the block folder:
and i create a new block and choose this one, but the block take foreverer to make and then i cant acces the page at all.
Is it this way to do it?

And it look like this:

<?php

if (eregi("block-test.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}

include("http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-
random.php");

?>

and i get this error code in the block:

Fatal error: Maximum execution time of 30 seconds exceeded in http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php on line 10

 
Beridox

Joined: 2004-11-01
Posts: 6
Posted: Thu, 2004-11-04 17:08

Ok one more try.
I created a block-test.php file and put it in blocks folder.
Created a block called Galleri and choose the block-test.php

It look like this:
<?php
include("http://127.0.0.1/site/modules.php?op=modload&name=gallery&file=index&include=block-random.php");
?>

And this is what it shows me:

[img]http://www.algonet.se/~anneli_h/if/block2.jpg[/img]

In the right block (Galleri) it says "No content in this block"
and over that in the forums block the block-test.php is showing.

I need more help :/