| View previous topic :: View next topic |
| Author |
Message |
stev
Joined: 13 Mar 2007
Posts: 3
Location: ROMANIA
|
| Posted: Tue Mar 13, 2007 5:37 pm Post subject: Please help a newbie ! |
|
|
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] |
|
| Back to top |
|
AjnabiZ
Joined: 30 May 2006
Posts: 17
|
| Posted: Tue Mar 13, 2007 5:54 pm Post subject: |
|
|
Did you place your file under "htdocs " folder
C:\apache2triad\htdocs\ |
|
| Back to top |
|
stev
Joined: 13 Mar 2007
Posts: 3
Location: ROMANIA
|
| Posted: Tue Mar 13, 2007 5:56 pm Post subject: |
|
|
yes ... but it still doesn't work
i have wrote the next adress in the browser http://localhost/C:/apache2triad/htdocs/index.php |
|
| Back to top |
|
lku homer
Joined: 29 May 2006
Posts: 104
|
| Posted: Tue Mar 13, 2007 9:57 pm Post subject: |
|
|
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'. |
|
| Back to top |
|
stev
Joined: 13 Mar 2007
Posts: 3
Location: ROMANIA
|
| Posted: Wed Mar 14, 2007 12:37 pm Post subject: |
|
|
MAN ... i'm so stupid :oops: .... 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.... |
|
| Back to top |
|
lku homer
Joined: 29 May 2006
Posts: 104
|
| Posted: Wed Mar 14, 2007 3:17 pm Post subject: |
|
|
| No problem. |
|
| Back to top |
|
| |