Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com\www
Old 12-12-2010, 02:05 AM Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com\www
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Hi,

I am trying to run php shopping cart at my website and its flagging up with the error I've given

Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com\wwwroot\te st\plaincart\plaincart\library\config.php on line 18

Please let me know how can I solve it.

Code is:
PHP Code:
// setting up the web root and server root for
// this shopping cart application
$thisFile str_replace('\\''/'__FILE__);
$docRoot $_SERVER['DOCUMENT_ROOT'];

$webRoot  str_replace(array($docRoot'library/config.php'), ''$thisFile);
$srvRoot  str_replace('library/config.php'''$thisFile);

define('WEB_ROOT''/test/plaincart/plaincart/',$webRoot);
define('SRV_ROOT''/mydoamin/wwwroot/test/plaincart/plaincart/',$srvRoot);

// these are the directories where we will store all
// category and product images
define('CATEGORY_IMAGE_DIR''images/category/');
define('PRODUCT_IMAGE_DIR',  'images/product/'); 
Your help would be highly appreciated.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-12-2010, 03:23 AM Re: Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
It looks like document_root is not set. I'm guessing it has to do with your server config.

From the documentation:
Quote:
There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here
http://php.net/manual/en/reserved.variables.server.php

You may need to set DocumentRoot in your httpd.conf (assuming you're using apache)
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 12-12-2010 at 03:28 AM..
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 12-12-2010, 11:55 PM Re: Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Thanks NullPointer,

I am using windows server.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Notice: Undefined index: DOCUMENT_ROOT in C:\HostingSpaces\Unlimited\mydomain.com\www
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26483 seconds with 12 queries