Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Please help a newbie !
Google
Post new topic Reply to topic
Author Message
stev
 
 


Joined: 13 Mar 2007
Posts: 3
Location: ROMANIA

PostPosted: Tue Mar 13, 2007 5:37 pm Reply with quoteBack to top

Hi!
I want to mention that this is my first encounter with apache. I don't know anything about it.

And of course i have a problem.

I installed apache2triad on my computer. I wrote a simple php code:
Code:
<html>
<body>

<?php
echo "Hello World";
?>

</body>
</html>
i have wrote this code in notepad and save it with .php extension.

i start apache and i want to see that text "Hello World" on my browser.

i have wrote in the address bar from my browser : http://localhost/J:/work.php ... and it says to me the next thing:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
localhost
03/13/07 19:13:16
Apache/2.2.0 (Win32) PHP/5.1.2


What do i have to do to make it work? Do i have to copy the php file in a certain folder... or do i have to set up some permissions (how)?
i also want to mention that i have windows xp professional....and i use firefox as browser...

Thanx in advance....and sorry for bothering with such question...
[/quote]
View user's profileSend private message
AjnabiZ
 
 


Joined: 30 May 2006
Posts: 17

PostPosted: Tue Mar 13, 2007 5:54 pm Reply with quoteBack to top

Did you place your file under "htdocs " folder


C:\apache2triad\htdocs\
View user's profileSend private message
stev
 
 


Joined: 13 Mar 2007
Posts: 3
Location: ROMANIA

PostPosted: Tue Mar 13, 2007 5:56 pm Reply with quoteBack to top

yes ... but it still doesn't work


i have wrote the next adress in the browser http://localhost/C:/apache2triad/htdocs/index.php
View user's profileSend private message
lku homer
 
 


Joined: 29 May 2006
Posts: 104

PostPosted: Tue Mar 13, 2007 9:57 pm Reply with quoteBack to top

Well you kind of have the wrong code for a php file.

Code:

<?php
echo "Hello World";
?>


And this should be the address.
[quote]
localhost
[quote]

As long as your httpd.conf file has the default DocumentRoot (C:/a2t/htdocs) then localhost will take you directly to the htdocs folder. Since index.php is a part of the DirectoryIndex, you don't need to have the file name. If you had index1.php then you would need to have 'localhost/index1.php'.
View user's profileSend private messageAIM AddressYahoo MessengerMSN MessengerICQ Number
stev
 
 


Joined: 13 Mar 2007
Posts: 3
Location: ROMANIA

PostPosted: Wed Mar 14, 2007 12:37 pm Reply with quoteBack to top

MAN ... i'm so stupid Embarassed .... all i had to do it was to write in the adress bar http://localhost/index.php not the whole adress (http://localhost/C:/.../index.php)

THANX Iku....
View user's profileSend private message
lku homer
 
 


Joined: 29 May 2006
Posts: 104

PostPosted: Wed Mar 14, 2007 3:17 pm Reply with quoteBack to top

No problem.
View user's profileSend private messageAIM AddressYahoo MessengerMSN MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT