Skip to main content
Participating Frequently
November 29, 2010
Answered

PHP Local Testing Server Not Working!

  • November 29, 2010
  • 1 reply
  • 1709 views

Hi Guys,

I've just set up my PHP local testing server, although its not working properly! If you could help that would be so wonderful!

Here is my current settings:

Local Site Folder: C:\XAMPP\htdocs\valsoo\

Web URL: http://localhost/valsoo/

Server Folder: C:\XAMPP\htdocs\valsoo\

Local/Network

Server Model: PHP MySQL

I'm testing the 'local testing server' with a file called site_check.php which works in the Local Site Folder root (C:\XAMPP\htdocs\valsoo\site_check.php) but fails to work when the file is within folders (C:\XAMPP\htdocs\valsoo\lesson01). Not all files work in the root either. ANY SUGGESTIONS?

Thanks so much!

This topic has been closed for replies.
Correct answer David_Powers

I deleted the C:/htdocs but it didn't change anything. Maybe testing through my live site using FTP is the only way.. I can't seem to set up my local testing server properly. The testing files site_check.php and test.php work in the root folder, but nowhere else. No other files work in the root folder, or other folders such as lesson01. Strange!

Is testing through your live site using FTP a BIG security risk?


Brentis wrote:

I deleted the C:/htdocs but it didn't change anything.

That doesn't surprise me. If you were having difficulty with files not being found, just deleting a folder won't help. You might have deleted the folder the browser was looking for.

Assuming that XAMPP is installed, make sure that Apache is running, and then type http://localhost in the browser address bar to load the XAMPP admin page. Click the phpinfo() link in the left navigation sidebar, and find the value of DOCUMENT_ROOT in the Apache Environment section.

Once you know the correct location for DOCUMENT_ROOT, you should be able to put your files in a subfolder of the DOCUMENT_ROOT folder, and define your testing server correctly in Dreamweaver.

1 reply

David_Powers
Inspiring
November 29, 2010

Brentis wrote:

I'm testing the 'local testing server' with a file called site_check.php which works in the Local Site Folder root (C:\XAMPP\htdocs\valsoo\site_check.php) but fails to work when the file is within folders (C:\XAMPP\htdocs\valsoo\lesson01). Not all files work in the root either.

If site_check.php works, your local testing server is working.

What do you mean when you say that it fails to work when the file is in a folder, such as lesson01? What actually happens? What sort of files don't work in the root? Without more details, it's impossible to help.

If site_check.php is in C:\XAMPP\htdocs\valsoo\lesson01, you should be able to access the file through http://localhost/valsoo/lesson01/site_check.php.

BrentisAuthor
Participating Frequently
November 29, 2010

Hi David,

site_check.php is in lesson02, but http://localhost/valsoo/lesson02/site_check.php still fails to work. It comes up with this:

Object Not Found

Error 404

Strangely however, site_check.php works when I put it in the root folder http://localhost/valsoo/site_check.php
I tried putting another file from your cd quotes_01.php into the root folder just like with site_check.php, but it failed to work. Strange!
I just noticed that I had found a folder C:\htdocs\valsoo as well as C:\XAMPP\htdocs\valsoo, could this be a problem?
Thanks David!

BrentisAuthor
Participating Frequently
December 2, 2010

Great, sounds like the problem has been solved! Although what would the web url be?

The same? http://localhost/valsoo/?


I just used localhost/valsoo and yes it works! Finally!

Thanks very much for your help David! Its much appreciated!!

Brentis