Help - Search - Members - Calendar
Full Version: $root_path=$_SERVER problem
MSFN Forums > Coding, Scripting and Servers > Web Development (HTML, Java, PHP, ASP, XML, etc.)

   
Google Internet Forums Unattended CD/DVD Guide
fleming
I have a CMS in php, and I am trying to set it up so I can view the site locally.

I had setup my MySQL database and everything, but for some reason I keep getting an error that is being referred to something in regards to my root_path.

This is what I have at the beginning of every file:

// get the document root - for use on include files
$root_path=$_SERVER['DOCUMENT_ROOT'];

Am I suppose to change what is inside ['DOCUMENT_ROOT'] ? Maybe to localhost ?

I am sorry if this is not enough info, but I was able to view some of the content, but every error through out a problem with my root path.

Is there something I need to do to make it so I can view these PHP files locally only?

Do you require any other info?

I had installed my Apache and MySQL by using WAMP.

Thanks for any help!
matrix0978
you need to install PHP along with Apache, and MySQL.
fleming
WAMP does install all the necessary things:

1. MySQL
2. Apache
3. PHP
matrix0978
im not sure what would work in this case but try replace DOCUMENT_ROOT with the follwoing

rootdomain
HTTP_HOST
PHP_SELF
localedir
rooturl
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.