Jump to content

Recommended Posts

error messages im getting

 

<?
/* $RCSfile: application.php,v $ (c) 2000 Ying Zhang (ying@zippydesign.com)
*
* $Revision: 1.7 $
* $Date: 2002/09/23 17:31:17 $
* $Author: yingz $
*
* 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!
*/

/* 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 = "mymarket";
$CFG->dbuser = "root";
$CFG->dbpass = "root";

/* 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://localhost/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     = dirname(__FILE__);
$CFG->templatedir = "$CFG->localhost/mymarket/templates";
$CFG->libdir      = "$CFG->localhost/mymarket/lib";
$CFG->imagedir    = "$CFG->localhost/mymarket/images";
$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   = true;		// enabled banner advertising
$CFG->currency      = "$";
$CFG->currencyfirst = true;	// 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);
?>

<br />
<b>Notice</b>:  Undefined variable: CFG in <b>C:\wamp\www\mymarket\index.php</b> on line <b>21</b><br />
<br />
<b>Notice</b>:  Trying to get property of non-object in <b>C:\wamp\www\mymarket\index.php</b> on line <b>21</b><br />

<br />
<b>Warning</b>:  include(/header.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>C:\wamp\www\mymarket\index.php</b> on line <b>21</b><br />
<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Failed opening '/header.php' for inclusion (include_path='.;C:\php5\pear') in <b>C:\wamp\www\mymarket\index.php</b> on line <b>21</b><br />

<table width=100%>
<tr valign="top">
	<td class=normal>
		Hello and welcome to MyMarket!  This is the homepage, web masters,
		use this area:
		<ul class=normal>
			<li>Provide a basic map of the site</li>
			<li>Advertise your on-sale items</li>
			<li>Welcome customers to your site</li>

			<li>Do useful things</li>
		</ul>

		<p>To begin shopping, <a href="shopping/">go to the shopping page</a>
		or buy the on-special items to your right.  Your shopping cart is
		always visible on the left side of your screen.  Click it to edit
		the contents of your basket or to check out.
	</td>
</tr>
</table>

<br />
<b>Notice</b>:  Undefined variable: CFG in <b>C:\wamp\www\mymarket\index.php</b> on line <b>45</b><br />
<br />
<b>Notice</b>:  Trying to get property of non-object in <b>C:\wamp\www\mymarket\index.php</b> on line <b>45</b><br />

<br />
<b>Warning</b>:  include(/footer.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>C:\wamp\www\mymarket\index.php</b> on line <b>45</b><br />
<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Failed opening '/footer.php' for inclusion (include_path='.;C:\php5\pear') in <b>C:\wamp\www\mymarket\index.php</b> on line <b>45</b><br />

 

 

index.php

 


<?php
/* index.php (c) 2000 Ying Zhang (ying@zippydesign.com)
*
* 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
*****************************************************************************/
include("application.php");

$DOC_TITLE = "MyMarket Home";
include($CFG->templatedir."/header.php");
?>

<table width=100%>
<tr valign="top">
	<td class=normal>
		Hello and welcome to MyMarket!  This is the homepage, web masters,
		use this area:
		<ul class=normal>
			<li>Provide a basic map of the site</li>
			<li>Advertise your on-sale items</li>
			<li>Welcome customers to your site</li>
			<li>Do useful things</li>
		</ul>

		<p>To begin shopping, <a href="shopping/">go to the shopping page</a>
		or buy the on-special items to your right.  Your shopping cart is
		always visible on the left side of your screen.  Click it to edit
		the contents of your basket or to check out.
	</td>
</tr>
</table>

<?php
include($CFG->templatedir."/footer.php");
?>

 

and the application.php

 


<?
/* $RCSfile: application.php,v $ (c) 2000 Ying Zhang (ying@zippydesign.com)
*
* $Revision: 1.7 $
* $Date: 2002/09/23 17:31:17 $
* $Author: yingz $
*
* 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!
*/

/* 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 = "mymarket";
$CFG->dbuser = "root";
$CFG->dbpass = "root";

/* 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://localhost/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     = dirname(__FILE__);
$CFG->templatedir = "$CFG->localhost/mymarket/templates";
$CFG->libdir      = "$CFG->localhost/mymarket/lib";
$CFG->imagedir    = "$CFG->localhost/mymarket/images";
$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   = true;		// enabled banner advertising
$CFG->currency      = "$";
$CFG->currencyfirst = true;	// 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);
?>




Link to comment
https://forums.phpfreaks.com/topic/154484-errors-on-webpage/#findComment-812274
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.