Thanks. I had already tried that but still have the same error. TML
On Jan 26, 8:24 pm, Oblygre <[email protected]> wrote: > It could be that the server configuration require php opening tags > Try replace <? with <?php > > Br > Olav B. Lygre > > On Jan 26, 7:39 pm, TML <[email protected]> wrote: > > > Hello, > > > I am trying to get the gearpad application working. I have created the > > database and changed the config file as directed in the readme. > > However, when I load index.php (in Firefox and IE) I get a page of > > code: > > > \n"; } db_connect(); if (!($result = mysql_query($query,$DBI_HANDLE))) > > { db_set_error(mysql_error()); return; } return $result; }; function > > db_escape($string) { global $DBI_HANDLE; db_connect(); return > > mysql_real_escape_string($string, $DBI_HANDLE); } function firstRow > > ($res) { if(count($res) == 0) { return false; } else { return $res > > [0]; } } function db_query_get($query='') { global $DBI_HANDLE, > > $DBI_DEBUG; if ($DBI_DEBUG) { echo "\n"; } $i = 0; db_connect(); if (! > > ($result = mysql_query($query,$DBI_HANDLE))) { db_set_error(mysql_error > > ()); //die(db_get_error()); return false; } while ($row = > > mysql_fetch_array($result, MYSQL_ASSOC)) { while (list($key, $value) = > > each($row)) { //echo "$query - Set $key = $value > > \n"; $rows[$i][$key] = $value; } $i++; } if(isset($rows)) { return > > $rows; } }; function db_query_set($qry='') { if(!db_query($qry)) { // > > die(db_get_error()); return false; } else { return mysql_insert_id > > (); } } function db_close() { global $DBI_HANDLE; mysql_close > > ($DBI_HANDLE); $DBI_HANDLE=null; }; ?> \r\n'); return true; } function > > resetPassword($email, $token, $newpass) { global $SITE_SECRET; $token > > = str_replace(array('-','_'), array('.','/'), $token); $check = crypt > > ($email . $SITE_SECRET, $token); if ($check != $token) { return > > false; } $newpass = db_escape($newpass); $newpass = crypt($newpass); > > db_query_set("update user set password = '$newpass' where email = > > '$email'"); $rslt = firstRow(db_query_get("select id from user where > > email = '$email'")); setUserCookie($rslt['id'], $email); return > > true; } ?> > > Gearpad $subtitle"; ?> > > > The setting in _dbconfig.php are: > > > $DBI_DATABASE="gearpad"; > > $DBI_USERNAME="root"; > > $DBI_PASSWORD="password"; > > $DBI_HOST="localhost"; > > > Where have I made a mistake? > > Thanks
