PDA

Prikaži potpunu verziju : Problem sa podesavanjem baze,pomoc


TRAJKO41
30.8.2009, 23:09
napravio sam neku probnu e prodavnicu

sve fajlove sam uploadovao preko freehostia c panela,
moja strana je http://trajko41.freehostia.com/

a kad sam uploadovao tamo mi je pisalo path:/www/trajko41.freehostia.com/

sve fajlove sam tu stavio

napravio sam bazu preko php.myadmina i poslali su mi na mail sledece

username: dantra93_*******
password: *******
database name: dantra93_*******
database host: mysql4.freehostia.com (http://mysql4.freehostia.com/)
database port: 3306


baza se poziva u applicaion.php ciji kod izgleda ovako

<?php
/* TERMS OF USAGE:
* This file was written and developed by Ying Zhang (ying@zippydesign.com)
* for educational and demonstration purposes only. You are hereby granted the
* rights to use, modify, and redistribute this file as you like. The only
* requirement is that you must retain this notice, without modifications, at
* the top of your source code. No warranties or guarantees are expressed or
* implied. DO NOT use this code in a production environment without
* understanding the limitations and weaknesses pretaining to or caused by the
* use of these scripts, directly or indirectly. USE AT YOUR OWN RISK!
*/

/************************************************** ****************************
* MAIN
************************************************** ***************************/

/* turn on verbose error reporting (15) to see all warnings and errors */
error_reporting(15);

/* define a generic object */
class object {};

$CFG = new object;

/* database configuration */
$CFG->dbhost = "localhost";
$CFG->dbname = "trajko";
$CFG->dbuser = "root";
$CFG->dbpass = "";

/* directory configuration, if all your mymarket files are in one directory
* you probably only need to set the wwwroot variable. valid examples are:
*
* $CFG->wwwroot = "http://myserver.com/mymarket";
* $CFG->wwwroot = "http://localhost/mymarket";
*
* do not include the trailing slash. dirroot is the physical path on your
* server where mymarket can find it's files. for more security, it is
* recommended that you move the libraries and templates ($CFG->libdir
* and $CFG->templatedir) outside of your web directories.
*/
$CFG->wwwroot = "http://localhost/mymarket";
$CFG->dirroot = "C:/wamp/www/mymarket";
$CFG->templatedir = "$CFG->dirroot/templates";
$CFG->libdir = "$CFG->dirroot/lib";
$CFG->imagedir = "$CFG->wwwroot/images";
$CFG->picture = "$CFG->dirroot/images/picture";
$CFG->slika = "$CFG->wwwroot/images/picture/";
$CFG->icondir = "$CFG->imagedir/icons";
$CFG->bannerdir = "$CFG->imagedir/banners";
$CFG->support = "support@mymarket.org";
$CFG->version = "1.71";
$CFG->sessionname = "mymarket";

/* extended configuration */
$CFG->showsponsor = false; // enabled banner advertising
$CFG->currency = "din";
$CFG->currencyfirst = false; // show the currency symbol before the price tag

/* define database error handling behavior, since we are in development stages
* we will turn on all the debugging messages to help us troubleshoot */
$DB_DEBUG = true;
$DB_DIE_ON_FAIL = true;

/* load up standard libraries */
require("$CFG->libdir/stdlib.php");
require("$CFG->libdir/dblib.php");
require("$CFG->libdir/mymarket.php");
require("$CFG->libdir/cart.php");

/* setup some global variables */
$ME = qualified_me();

/* start up the sessions, to keep things simple we just have two
* variables, USER containing user information and CART containing
* the user's shopping cart. */
ini_set("session.name", $CFG->sessionname);
session_start();
session_register("USER");
session_register("CART");

/* initialize the USER object if necessary */
if (! isset($_SESSION["USER"])) {
$_SESSION["USER"] = array();
}

/* initialize the CART object if necessary */
if (! isset($_SESSION["CART"])) {
$_SESSION["CART"] = new Cart;
}

$USER = &$_SESSION["USER"];
$CART = &$_SESSION["CART"];

/* connect to the database */
db_connect($CFG->dbhost, $CFG->dbname, $CFG->dbuser, $CFG->dbpass);
?>

ova prodavnica mi je uspesno radila na wamp serveru , ali sad treba da se izmene podesavanja u application.php samo sto ja neznam kako to da uradim

Ako neko zna neko pomaze

Ceo dan se mucim oko toga

noisy
31.8.2009, 3:55
ne znam da li je pametno da ostavljaš ovde username i šifru.
a što se tiče problema, ni to ne znam, jbg

VojaM
31.8.2009, 14:06
Ovde ubaci svoje nove podatke:
/* database configuration */
$CFG->dbhost = "mysql4.freehostia.com";
$CFG->dbname = "dantra93.....";
$CFG->dbuser = "dantra93....";
$CFG->dbpass = "......";

Umesto tačkica napiši tačan username, password i ime baze (dbname).

Za sledeće parametre trebalo bi da znaš tačan fizički path root direktorijuma za sajt na serveru. Možeš da probaš da li će ovako upaliti. Recimo ovako:

/* directory configuration, if all your mymarket files are in one directory
* you probably only need to set the wwwroot variable. valid examples are:
*
* $CFG->wwwroot = "http://myserver.com/mymarket";
* $CFG->wwwroot = "http://localhost/mymarket";
*
* do not include the trailing slash. dirroot is the physical path on your
* server where mymarket can find it's files. for more security, it is
* recommended that you move the libraries and templates ($CFG->libdir
* and $CFG->templatedir) outside of your web directories.
*/
$CFG->wwwroot = "http://trajko41.freehostia.com";
$CFG->dirroot = "/www/trajko41.freehostia.com";
$CFG->templatedir = "$CFG->dirroot/templates";
$CFG->libdir = "$CFG->dirroot/lib";
$CFG->imagedir = "$CFG->wwwroot/images";
$CFG->picture = "$CFG->dirroot/images/picture";
$CFG->slika = "$CFG->wwwroot/images/picture/";
$CFG->icondir = "$CFG->imagedir/icons";
$CFG->bannerdir = "$CFG->imagedir/banners";
$CFG->support = "support@mymarket.org";
$CFG->version = "1.71";
$CFG->sessionname = "mymarket";

Ako tako neće, možeš da probaš da definišeš samo promenljivu wwwroot i da prepraviš ono gde se na nekoliko mesta pominje $CFG->dirroot u $CFG->wwwroot.

Dalje se direktno pominje učitavanje nekih php biblioteka (load standard libraries), nemam pojma da li to pali i na linuksu.

Ako sve ovo ne uspe, probaj da nađeš za taj tvoj marketinški paket uputstvo za instalaciju pod linuksom. Ti si ga, očigledno, držao pod Windowsom.