views:

22

answers:

1

Hello

First off let me start by saying that yes I have searched for this in google and in stackoverflow specifically, I have found many answers and tried them all. At this point I believe my only resource is posting the question myself, even if the scenario sounds repeated please be so kind as to try to help.

The situation is quite basic, on Ubuntu desktop 10.04 I set up apache via Synaptic and Php5 according to this guide and its spin-off here. At this point if I go on command line and call a php script it works, for example:

  php test.php

outputs my hello world without any problem. But if I go to firefox and point to test.php it will show the 403 error Forbidden...

I have changed ownership on /var/, /var/www/ and /var/www/test.php to every variable I can think of (www-data [apache runs as this user], purefan [my regular user], root) it makes no difference, I have also changed permissions several times 777, 0777 (just to be safe), 644, 755, no change. from CLI I got the phpinfo into a file and added it here.

If Im not mistaken the problem is happening when Apache calls the php interpreter, as when I go to http://localhost/index.php it shows apache's default "It Works!" page, but if I add php content to that file it simply gets ignored, no error is shown though (also checked error log and syslog).

So please, if you have any suggestion let me know, this is not a life or dead thing but would really like to set up using worker instead of prefork.

Thank you for your time

A: 

hmm have you installed the Apache2 PHP module?

It sounds a bit that you have installed php5-cli but not the apache2 module.

On this page you found a short example. Perhaps i could help you.

Stony
I actually tried but it didnt work, here's the pastebin of the operation: http://pastebin.com/XWuBnPEV and if I install libapache2-mod-php5 it conflicts with mpm-worker which beats the purpose
Purefan
hmm the mpm-worker for multithreading and better for php5-cgi... for the first you should use the default apache2 installation with mpm-prefork. Do the same like the example on top.
Stony
php5-cgi is already installed, can you please elaborate on the "Do the same like the example on top" please?
Purefan