Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot access Admin, Parse error in database.php


Guest

Recommended Posts

Newbie need help please?

 

I have managed to install os2.2 & import database as per the readme file with os2.2, I can access the catalog. But when I try to access the Admin section I get this exact error;

 

Parse error: parse error, unexpected '.', expecting ')' in

/homepages/16/d82522428/htdocs/mediastoreuk/catalog/admin/includes/functions/database.php on line 13

 

I am very new to all this & know nothing about php yet! Could anyone point me in the right direction for a solution or some tips of where to start.

 

I have looked in the os knowledge base & searched here for the last 5 hours but am getting knowhere.

 

Thanks Ron

Link to comment
Share on other sites

how did you do the installation, via acceessing the install from the browser or manually? it sounds like manually, did you properly put together the configure.php in catalog/includes/configure.php?

Link to comment
Share on other sites

how did you do the installation, via acceessing the install from the browser or manually?  it sounds like manually, did you properly put together the configure.php in catalog/includes/configure.php?

 

I installed it through the browser using the oscommerce wizard steps, I did not change any configure.php file.

Link to comment
Share on other sites

You probably accidentally deleted a single-quote or bracket

 

I have downloaded the database.php file from the site & added the 1st few lines of code below,

 

<?php

/*

$Id: database.php,v 1.23 2003/06/20 00:18:30 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

}

 

if ($$link) mysql_select_db($database);

 

return $$link;

}

 

function tep_db_close($link = 'db_link') {

global $$link;

 

return mysql_close($$link);

}

 

function tep_db_error($query, $errno, $error) {

die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>');

}

 

function tep_db_query($query, $link = 'db_link') {

global $$link, $logger;

 

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {

if (!is_object($logger)) $logger = new logger;

$logger->write($query, 'QUERY');

}

 

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...