logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: when browsing to localhost\test.php : object not found
Author
dreubens81



Joined: 15 Apr 2015
Posts: 5
Location: england, oxford

PostPosted: Wed 15 Apr '15 22:56    Post subject: when browsing to localhost\test.php : object not found Reply with quote

Windows 7 32bit SP1
XAMMP 5.6.3
which comprises the following:
Apache 2.4
PHP 5.6.3
MySQL 6.6.21
phpMyAdmin 4.2.11
OpenSSL 1.0.1j


Hello,

I am new to these forums and new to coding. I just hit my first hurdle and could do with some advise please.

I downloaded XAMMP and got that installed (UAC and AV off)
PHP module is activated. (according to the "status" on the XAMMP localhost page)
The Apache and MySQL services are also up and running with no error.
The following 2 lines of code have been entered into httpd.conf and then the service restarted:

LoadModule php5_module "C:\xampp\php\php5apache2_4.dll"

AddType application/x-httpd-php .php

My text book (PHP, MySQL, Javascript & HTML5 for Dummies)wants me to confirm PHP is definitely working by putting a test.php file into the htdocs folder which in my case is
"C:\xampp\htdocs" So i have created the file with the following code:

<!doctype html>
<html>
<head>
<title> PHP Test </title>
</head>
<body>
<p>This is an HTML line</p>
<?php
echo "<p>This is a PHP line</p>";
phpinfo( );
?>
</body>
</html>

And then browsing to http://localhost/xampp/test.php to view it, but i just get "object not found"

I am guessing (hoping!) this is something easy to remedy??
-on a seperate note, how do i change my webserver name to something a bit more inspiring than just localhost?

Any help much appreciated
Darryl
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Thu 16 Apr '15 17:06    Post subject: Reply with quote

The url is

http://localhost/test.php not http://localhost/xampp/test.php
Back to top
dreubens81



Joined: 15 Apr 2015
Posts: 5
Location: england, oxford

PostPosted: Thu 16 Apr '15 17:55    Post subject: Reply with quote

I am getting "object not found" when browzing to http://localhost/test.php too.
Back to top
dreubens81



Joined: 15 Apr 2015
Posts: 5
Location: england, oxford

PostPosted: Thu 16 Apr '15 19:26    Post subject: Reply with quote

Please guys, help me out, this is driving me nuts, i just want to get started!
Back to top
dreubens81



Joined: 15 Apr 2015
Posts: 5
Location: england, oxford

PostPosted: Thu 16 Apr '15 20:15    Post subject: Reply with quote

I just uninstalled and then reinstalled XAMPP, same thing. I even created a test.txt file in the htdocs folder and when browsing to

http://localhost/xampp/test.txt OR
http://localhost/test.txt

i am still getting "object not found"
No one else seems to be having these problems on forums or youtube, i don't get it.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 16 Apr '15 20:35    Post subject: Reply with quote

What, if anything, is in c:/xampp/apache/logs/error.log ?
Notices are not errors. Warns are not errors either but may give a clue though usually not. In other words, do not post a bunch of lines that say :notice)

What, if anything, might be a php_error.log file in the c:/xampp/htdocs folder?

I have actually seen this in the Xampp forum but saw nothing there to resolve it. English version, Xampp for Windows, about 3 or 4 pages in.
Back to top
dreubens81



Joined: 15 Apr 2015
Posts: 5
Location: england, oxford

PostPosted: Thu 16 Apr '15 20:59    Post subject: Reply with quote

Thanks for the reply glsmith. However, i stumbled upon an article with someone saying to add a "testfolder" folder into htdocs and then dump the files into there.

I done that and then browsed to

"http://localhost/testfolder/test.php" and it worked.
Back to top


Reply to topic   Topic: when browsing to localhost\test.php : object not found View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules