Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works


  • Please log in to reply




  • Member
  • PipPip
  • 21 posts
Hello everyone! I have a hair-pulling problem as it pertains to a PEAR tutorial (Beginning PHP 5 and MySQL E-Commerce).

In chapter 3, I am getting the follow error and backtrace:

Notice: Constant PATH_SEPARATOR already defined in C:\manginweb\include\config.inc.php on line 24

TEXT: DB::include_once(DB/mysqli.php) [function.DB-include-once]: failed to open stream: No such file or directory
LOCATION: C:\manginweb\libs\pear\db.php, line 373, at January 14, 2008, 1:23 pm
Showing backtrace:
DB.connect() # line 373, file: C:\manginweb\libs\pear\db.php
DB.connect("mysqli://admin:admin@localhost/manginweb", "true") # line 13, file: C:\manginweb\include\database.php
DbManager.__construct("mysqli://admin:admin@localhost/manginweb") # line 9, file: C:\manginweb\include\app_top.php
require_once("C:\manginweb\include\app_top.php") # line 3, file: C:\manginweb\index.php

Now, here is the section of config.inc.php being referenced:

// Change the include_path configuration option to enable PEAR DB access
if ((substr(strtoupper(PHP_OS), 0, 3)) == "WIN")
define("PATH_SEPARATOR", ";");
define("PATH_SEPARATOR", ":");
ini_set('include_path', SITE_ROOT . '/libs/PEAR' .
PATH_SEPARATOR . ini_get('include_path'));

Does anyone have any idea why this might be happening? Thanks in advance.
  • 0




    Spyware Veteran

  • GeekU Moderator
  • 31,642 posts
I found this:
That sounds like a feasible answer. Hope it helps you.
  • 0




  • Topic Starter
  • Member
  • PipPip
  • 21 posts
Thanks, Metallica. It seems this constant is already defined by php and therefore I do not need the code block. However, I am having trouble apparently connecting with the MySQL database. Looks like I will have to do some digging!
  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP