You are not logged in.

#1 2008-09-01 12:03:52

dextrose
Member
From: Portugal
Registered: 2008-08-20
Posts: 16
Website

php isn't rendering after lamp wiki guide.

Hi

After reading the LAMP Wiki for setting up the Apache web server on an Arch and install PHP and MySQL and integrate these in the Apache server, the PHP part didn't actally run phpinfo(); or any PHP.
I am running on x64 though I don't think this should be a problem since I didn't have this problem on 64bit version of Ubuntu or Mandriva.
Any idea?

p.s.I have made pacman -Syu

Best Regards,
Jorge.

Offline

#2 2008-09-02 15:52:47

abarilla
Member
From: Colorado Springs, CO
Registered: 2006-12-06
Posts: 29

Re: php isn't rendering after lamp wiki guide.

If it's printing out the php code instead of running it, it's most likely one of two problems:

1) You're missing the part

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

2) You didn't restart the apache service


Sic gorgiamus allos subjectatos nunc

Offline

#3 2008-09-06 08:59:49

veek
Member
Registered: 2006-03-10
Posts: 167

Re: php isn't rendering after lamp wiki guide.

Try checking to see if you have a /etc/php/php.ini.pacnew.

If so you might be using an older config file. rename (mv) php.ini.pacnew to php.ini,
and then restart apache.

Solved the issue for me when I had the same problem.

Edit: Just diff'ed the old php.ini and the new one and found this:

252c252
< open_basedir = /home/:/tmp/:/usr/share/pear/
---
> open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
561c561
< cgi.fix_pathinfo=1
---
> ; cgi.fix_pathinfo=1

The difference in the open_basedir path is important because the new apache
now serves documents out of /srv/http instead of /home. Also if you read php.ini you'll see:

; open_basedir, if set, limits all file operations to the defined directory
; and below.

So I guess that explains that.

Last edited by veek (2008-09-06 09:07:59)

Offline

Board footer

Powered by FluxBB