You are not logged in.

#1 2007-11-11 06:30:39

Canute
Member
From: Norway
Registered: 2007-04-23
Posts: 21

[Fixed] Lamp, can't get php to work.

I followed most of this guide http://wiki.archlinux.org/index.php/LAMP . I made a test.php file, with echo 'whatever';. When I try to visit it, it's just blank. If I go to an .html document, it works. My access log says a 500 error (Internal Server Error) occurs. Here's my http.conf http://pastebin.com/m42f20e4b

This is what the access log says:
192.168.2.88 - - [11/Nov/2007:05:39:46 -0800] "GET /index.php HTTP/1.1" 500 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071103 BonEcho/2.0.0.9"

Error log, says nothing, even though i set it to debug.

apachectl -t
Syntax OK

If I try to use php on the commandline, it works like expected.
Anyone know how to, if anything, debug this?

Last edited by Canute (2007-11-11 15:05:52)

Offline

#2 2007-11-11 07:41:56

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: [Fixed] Lamp, can't get php to work.

Hi Canute,
can you post the content of your test.php file?

Offline

#3 2007-11-11 07:45:11

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: [Fixed] Lamp, can't get php to work.

Another thing, your access log says "GET /index.php" so it seems that you try to access the wrong page.
Should it be test.php?

Offline

#4 2007-11-11 10:39:17

antis
Member
From: sweden
Registered: 2007-05-18
Posts: 108

Re: [Fixed] Lamp, can't get php to work.

In your php.ini file... is display_errors = off?
If so, then change it to "on" and you might be able to get more information about what is going on.

Offline

#5 2007-11-11 14:31:05

Canute
Member
From: Norway
Registered: 2007-04-23
Posts: 21

Re: [Fixed] Lamp, can't get php to work.

Oh, i'm sorry, My page is index.php not test.php:

<?php
echo 'whatever';
?>

.

But that was not the problem. display_errors = On shows it right away

Warning: Unknown: open_basedir restriction in effect. File(/var/www/canutes.net/index.php) is not within the allowed path(s): (/home/:/tmp/:/usr/share/pear/) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0

Fatal error: Unknown: Failed opening required '/var/www/canutes.net/index.php' (include_path='.:/usr/share/pear') in Unknown on line 0

With this i'll probably get to work it out smile

Last edited by Canute (2007-11-11 14:32:00)

Offline

#6 2007-11-11 15:01:50

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

Re: [Fixed] Lamp, can't get php to work.

Offline

Board footer

Powered by FluxBB