Welcome! Log In Create A New Profile

Advanced

confused smiley 1A and 1B - Cannot view Page (localhost???)

Posted by prinsdg 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
confused smiley 1A and 1B - Cannot view Page (localhost???)
March 23, 2007 11:39PM
I created my first page (php) saved it, the worx, BUT when I open it as indicated in the texbook i get this message :

Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404
localhost
03/23/07 23:27:51
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4

...this means I cannot go any further because I cannot view my page. Did anyone hd this problem and I can I fix it. I am sooooo frustrated !!!

Please Help !
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
March 24, 2007 04:01PM
I take it your installation directory is default and that you have either got your files in C:\Program Files\xampp\htdocs or a folder in the htdocs directory?

Your url should be either hxxp://localhost/page1.php or hxxp://<your pc ip address>/page1.php

Could you provide more info about the problem as its a bit vague. Provide url,installation path, when you navigate to hxxp://localhost what do you get?

xx = tt
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
March 24, 2007 10:46PM
Hi,

The php file is located at : C:\StudentPHP\firstscript.php - this is where my StudentPHP folder is located.

When I try to open it with IE, using the suggested http://localhost/firstscript.php, that is whenh I get the message as quoted in the fist posting.

I know I may sound very stupid here, but it's my first attempt at php with not much luck yawning smiley(

Hope you can help.
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
March 25, 2007 09:20AM
Hi prinsdg

If you installed xampp, then you have to save your work files in C:\(folder in which xampp is installed)\xampp\htdocs[/b]

If you just installed xampp directly on C:\, the path to htdocs is probably C:\xampp\htdocs

Once you have saved or moved your files there, you can access them in IE (or whichever browser) with the URL http://localhost/yourfilename.php

You can create subdirectories in htdocs, just remember to include that folder name in the URL as well. For example, if you save your files at C:\(folder in which xampp is installed)\xampp\htdocs\myPhpWorkfiles[/b], you will find your files in the browser by typing http://localhost/myPhpWorkfiles/somefile.php

Don't hesitate to shout if you're still confused! smiling smiley Good luck.
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
March 25, 2007 09:27AM
By the way, what happens when you just type http://localhost in your address bar? Do you see the xampp welcome page?
confused smiley Re: Re: 1A and 1B - Cannot view Page (localhost???)
March 25, 2007 09:49AM
prinsdg Wrote:
-------------------------------------------------------
> Hi,
>
> The php file is located at :
> C:\StudentPHP\firstscript.php - this is where my
> StudentPHP folder is located.
>
> When I try to open it with IE, using the suggested
> hxxp://localhost/firstscript.php, that is whenh I
> get the message as quoted in the fist posting.
>
> I know I may sound very stupid here, but it's my
> first attempt at php with not much luck yawning smiley(
>
> Hope you can help.


Now that i hover the link in bold i see the problem. You have assumed that localhost will look anywhere and everywhere for your php file.

You need to move that firstscript.php file to C:\Program Files\xampp\htdocs and then open hxxp://localhost/firstscript.php in your browser and bobs ur aunty.

Or

Move your StudentPHP with your php files in it to C:\Program Files\xampp\htdocs so it would now be C:\Program Files\xampp\htdocs\StudentPHP and then open your browser to url hxxp://localhost/StudentPHP/firstscript.php

xx=tt
confused smiley Re: Re: Re: 1A and 1B - Cannot view Page (localhost???)
March 25, 2007 10:18PM
Thanks GREGORIAN and THERESE – Once again I had to “pay the price� for trying to do things according to the book. On page IX in the Masterskill Manual (point 31) it says one has to copy the studentPHP folder to C:/ and that is what I did.
Now I moved it to C:\Program Files\xampp\htdocs\StudentPHP and all of a sudden it worked and I was able to view my page

Thanks for your help.

I now see the true value of the FORUM. Your help is appreciated. Hopefully the Masterskills book will be revisited and some of these points cleared for future so everyone won’t have to go through this every time and waste valuable time.
avatar
Mac
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
March 26, 2007 07:54AM
I repeat once again. Please read your tut letters and all messaqges on the forum -and going back to previous semester forums. This is a web-based course, therefore the forum is probably the most important element of this course.

The very first post I posted in this forum http://osprey.unisa.ac.za/phorum/read.php?121,45534 - Install XAMPP environment -
clearly explains where your files should be saved.
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
August 10, 2007 11:53AM
Hello All

I have just started with my first taslB1. Thanks to the discussions on this thread I was able to preview my page. The only problem that I have is that if I view the page using the following link http://10.121.74.178/xampp/StudentPHP/firstcript.php it gives me the message that object not found. When I access it through this link http://10.121.74.178/StudentPHP/firstcript.php I am able to view the page.

I saved my files in C:\Program Files\xampp\htdocs\StudentPHP. In order for me to preview the page I have to remove xampp in the browser.

Does anyone have an idea on how to rectify the issue?

Thankseye popping smiley
confused smiley Re: 1A and 1B - Cannot view Page (localhost???)
August 13, 2007 10:16AM
We are in Sem 2. You will need to post your questions and responses their.
Sorry, only registered users may post in this forum.

Click here to login