New install: Cannot redeclare zp_getcookie() error

I am trying to instal Zenphoto 1.1.7 on a local Windows XP test machine which is running the WAMP Server, consisting of:

apache 2.2.8
php 5.2.6
mysql 5.0.51b

The server is tested and working with other PHP/MySQL applications.

I created a new database and user for Zenphoto.

I tried to open setup.php, but I got the following error:

Fatal error: Call to undefined function getUserLocale() in D:\wamp\www\zenphoto\zp-core\setup.php on line 87

So, I commented out the if (!$connection) {} conditional to force the following (a solution I found in another post):

define('SERVERPATH', dirname(dirname(__FILE__)));
require_once('setup-primitive.php');
require_once('functions-i18n.php');

I loaded the /zenphoto/zp-core/setup.php page again and at the top of the page, I see these notices:

Notice: Use of undefined constant WEBPATH - assumed 'WEBPATH' in D:\wamp\www\zenphoto\zp-core\functions-i18n.php on line 168

Notice: Use of undefined constant WEBPATH - assumed 'WEBPATH' in D:\wamp\www\zenphoto\zp-core\functions-i18n.php on line 169

I went ahead and entered the database details, then pressed Save.

Then I got the following error:

Fatal error: Cannot redeclare zp_getcookie() (previously declared in D:\wamp\www\zenphoto\zp-core\functions.php:1653) in D:\wamp\www\zenphoto\zp-core\setup-primitive.php on line 10

At first, I thought it might be a browser Cookie issue, so I tried clearing my cache and cookies, then reloading the page, but I still got the same error. I also tried loading the setup.php page in a different browser. That didn't work either.

I looked for that line in setup-primitive.php and the opening comment says "These are the functions that setup needs before the database can be accessed (so it can't include functions.php because that will cause a database connect error.)" Apparently, setup.php seems to be including functions.php, even though it sounds like it's not supposed to.

I tried commenting out the function zp_getcookie() from setup-primitive.php and that gets past the error, but then I get the same error for zp_setCookie. I can continue commenting out redeclared functions, but I figured it would be best to come here and ask for advice before continuing on down through all the functions and files.

Any advice on how to get past this error?

Comments

Sign In or Register to comment.