Results 1 to 5 of 5
Hello everyone :P
I am trying to setup a webserver.Everything is awesome except one thing I see php files as text when i try to view them with the browser.
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-18-2008 #1
help setting up Apache
Hello everyone :P
I am trying to setup a webserver.Everything is awesome except one thing I see php files as text when i try to view them with the browser.
I uncommented the line to enable php,I checked if the module was there,but i still can not see php files.
I have slackware 12.0,and I am a total noob when it comes to apache.
How can i fix this???
Thanks in advance
- 07-18-2008 #2Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 2,514
Check to see if you have the following entries. In your httpd.conf file add to Directory Index: index.php Add '.httpd-php .php' to Add Type Application - near bottom of file. Set Document Root to /var/www/htdocs. In /etc/apache there is a 'php.ini' file. need /var/www/htdocs entered for doc_root.
- 07-24-2008 #3
hi

I check everything and everything was there,but there is a small problem whenever I try to view anything I get a
Forbidden You don't have permission to access / on this server.
How can this happen last week it was working fine(except the php files).
Do you know how to fix this??
thx in advance
- 07-24-2008 #4Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 2,514
If you made any of these changes, you need to re-start apache.
Did you create the info.php file? If not, open a text editor and type the following in it: <?php phpinfo();?>
Save it as info.php in your /var/www/htdocs directory and also a copy in your public_html directory in your home directory. Try accessing it in the /var/www/htdocs by opening a browser and entering: http://localhost/info.php
If that doesn't work (probably won't) open the browser and enter the following:
http://localhost/~javelin93/info.php (change javelin93 to whatever your actual username is. If this works you should get a lot of information which might help resolve the problem.
When you added .httpd-php .php to Add Type Application, did you put the period (.) in front and a space between?
Not sure if this will help. Are you saying that now you are unable to access anything on apache or just not php files?
- 07-25-2008 #5
I restarted apache,but i get the same thing(403 forbidden).
oh I cannot access anything


Reply With Quote
