Hello,
I'm developing a website on my test server (WinXP Pro, IIS, MySQL 5, PHP 5.1.2 ISAPI). I dropped the files to /blog/ off the root. First time I linked to it, I got the admin page, I put my settings in, all seemed well. I click the "Complete Installation" button and after a short pause I get this:
Fatal error: Cannot redeclare serendipity_db_update() (previously declared in G:\TestWeb\blog\include\db\db.inc.php:9) in g:\TestWeb\blog\include\db\db.inc.php on line 33
This is lines 9 thru 33:
function serendipity_db_update($table, $keys, $values)
{
global $serendipity;
$set = '';
foreach ($values as $k => $v) {
if (strlen($set))
$set .= ', ';
$set .= $k . '=\'' . serendipity_db_escape_string($v) . '\'';
}
$where = '';
foreach ($keys as $k => $v) {
if (strlen($where))
$where .= ' AND ';
$where .= $k . '=\'' . serendipity_db_escape_string($v) . '\'';
}
if (strlen($where)) {
$where = " WHERE $where";
}
return serendipity_db_query("UPDATE {$serendipity['dbPrefix']}$table SET $set $where");
}
Now I'm no PHP guru (pretty much a straight newbie on web design and functionality), but I know a bit about scripting and I can't see how the function in question is being redeclared... Line 9 is the function declaration and line 33 in the end bracket "}". Is this a permissions thing, a configuration thing, something with my PHP settings? I just don't know enough about this.
This is a brand new install, v0.9.1.
Thanks for your help!
-Jeremy
Fatal error: Cannot redeclare serendipity_db_update()
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Fatal error: Cannot redeclare serendipity_db_update()
Hi!
Somehow your webserver seems to include files twice. The db.inc.php file should only be included once, and I don't know how it comes that it is included twice in your system?
I don't know IIS very well, can it be that it is somehow misconfigured so that PHP files are rendered/executed twice?
Regards,
Garvin
Somehow your webserver seems to include files twice. The db.inc.php file should only be included once, and I don't know how it comes that it is included twice in your system?
I don't know IIS very well, can it be that it is somehow misconfigured so that PHP files are rendered/executed twice?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/