473,394 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

$_SERVER["DOCUMENT_ROOT"] returns null or blank

Hi,

I am trying to include some php files in one of my php page. It errors out saying:

Expand|Select|Wrap|Line Numbers
  1. Warning: include(/apps1/includes/getINIParamVal.php) [function.include]: failed to open stream: No such file or directory in D:\inetpub\vhosts\aadityatech.in\httpdocs\apps\apps1\index.php on line 9
  2.  
  3. Warning: include() [function.include]: Failed opening '/apps1/includes/getINIParamVal.php' for inclusion (include_path='.;./includes;./pear') in D:\inetpub\vhosts\aadityatech.in\httpdocs\apps\apps1\index.php on line 9
  4.  
I checked twice, and found that my getINIParamVal.php in D:\inetpub\vhosts\aadityatech.in\httpdocs\apps\app s1\includes.

I suspect that $_SERVER["DOCUMENT_ROOT"] variable returns the null value. I have included the file with following line:
Expand|Select|Wrap|Line Numbers
  1. include($_SERVER["DOCUMENT_ROOT"] . "/app1/includes/" . "getINIParamVal.php");
  2.  
My document root in apache is:
D:\inetpub\vhosts\aadityatech.in\httpdocs\apps

Please help. I would highly appreciate.

Thanks,
Akshay
Jul 29 '11 #1
1 3014
at first look there's a mistake where you write /app1 in your include. There should be /apps1 , right ?
Jul 31 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Rene van Hoek | last post by:
Hi, I am using Xalan 1.8.0 and Xerces 2.6.0 in C++. I have an XML document which I first transform into an other XML document using an XSL styelsheet. Then I want to parse with XPathEvaluator...
1
by: Suresh | last post by:
Hi, I have an C# CSEXE.exe (CSexe.cs) and a CSDll.dll (CSdll.cs). exe is compiled with a reference to dll. Calling for the class Type defined in CSDLL.dll using Type.GetType(...
2
by: Jeff Adams | last post by:
I am using MSVC .NET to create a C program. I am having trouble creating a window. The createwindow returns NULL however no error is caught. The GetLastError() returns "operation completed...
3
by: Zoury | last post by:
Good day! :O) I have the following code : //*** using System; using System.Windows.Forms; <snip>
8
by: Brian | last post by:
This is causing me to not be able to create a relation in my dataset. Here's my code: dc1 = ds.Tables .Columns ; dc2 = ds.Tables .Columns ; dr1 = new System.Data.DataRelation...
0
by: Zean Smith | last post by:
I am trying to get my C# client to connect to a 3rd Perl Web Service (SOAP Lite), this is the code that fails ...... object results = this.Invoke("getGrossData", new object {week} ); return...
11
by: MLH | last post by:
I have 2 lines in a procedure that assign MyVariant a value - line #238 and line #491. When line #238 runs, the value is 152. When line #491 runs, the DLookup function returns Null. I would expect...
1
by: js | last post by:
I am using the following C# code and T-SQL to get result object from a SQL Server database. When my application runs, the ExecuteScalar returns "10/24/2006 2:00:00 PM" if inserting a duplicated...
6
by: Peter Michaux | last post by:
Suppose I have implemented a language with garbage collection in C. I have wrapped malloc in my own C function. If malloc returns NULL then I can run the garbage collector and then try malloc...
1
by: jrlittle86 | last post by:
I know I'm overlooking something very simple but How can I check if the text within an XML tag is blank? The code below works fine as long as there are values within an XML node (For example the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.