Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache php not working on gentoo linux

Status
Not open for further replies.

methodtwo

Technical User
Jul 5, 2007
2
GB
'm a noob using gentoo and today i emerged apache with apache2 in my USE variable in /etc/make.conf, started the server and tested it from a browser using: .So far so good.
Then i emerged dev-lang/php and the apache config file got
updated to include: APACHE_OPTS="-D DEFAULT_HOST -D PHP5.
I then created a sample .php file in /var/ .But when i try to access this file from a browser using: OR: file:///var/i just get error 404: filenot found OR the url was not found on the server.Does this mean PHP is not working as an apache module?, if so what can i do?.Or does it just mean
that the server needs more info on where to find it's filesystem?, if so how do i give this info to apache?
Thankx kindly for any help
 
Hi

methodtwo said:
i just get error 404: filenot found OR the url was not found on the server.
Well, that means that Apache is working. If PHP is working or not, we have no information about. The request did not reached any PHP script so it gives no clues. Try this URL :


The above URL refers to the file.php existing in the directory indicated by the [tt]DocumentRoot[/tt] directive in your httpd.conf file.

If the URL does not work, check your httpd.conf file. If can not find out the correct path where to put file.php, yu will have to post more details.

By the way, check the file and directory permissions too. Apache will try to access them with the permission of what is set at the [tt]User[/tt] and [tt]Group[/tt] directive.

Feherke.
 
if you tried a url like this

i am not surprised it did not work. this is not a valid format for an http url.

similarly
is highly unlikely to work the way you expect it. apache does not intermediate the file:// protocol and so php is unlikely to be instantiated to process the file for you. If the url is correct, however, your filesystem should have been willing to deliver the source code of that file to you.

the second error suggests that your url is not correct.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top