---
title: "Strul med apache och PHP"
type: "forum-thread"
url: "https://www.webforum.nu/amne/webbservrar/76331-strul-med-apache-och-php"
topic: "Webbservrar"
topic_url: "https://www.webforum.nu/amne/webbservrar"
author: "Viktor"
published: "2003-05-08T12:51:38.000Z"
updated: "2003-05-08T13:05:06.000Z"
replies: 1
views: 231
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/webbservrar/76331-strul-med-apache-och-php"
---

# Strul med apache och PHP

## #1 — Viktor, 2003-05-08T12:51Z

Jag har installerat php som en modul. Installationen fungerade utan problem men när jag kör en php sida så vill den att jag ska ladda ner den på min lokala burk, det är ju inte riktigt så det ska vara tycker jag. Jag har lagt till "AddType application/x-httpd-php .php" i min httpd.conf och startat om apache några gåner.
Jag kör Apache 2.0.43 och senaste php.

/Viktor

Permalänk: https://www.webforum.nu/p/76331

## #2 — Viktor, 2003-05-08T13:05Z

Problemet är löst.

Om man läser INSTALL för php så står det

> The only thing left to do is to edit your httpd.conf file and make sure the
> PHP 4 mime type is there and uncommented.  You need a line that looks like
> this:
> 
>    AddType application/x-httpd-php .php
> 
> Then restart your server (apachectl restart) and you should be able to
> serve up PHP files now.  Make a test file called test.php and put some
> PHP tags in it.  Like \<?phpinfo()?\>, for example.

Om man sedan läser på php's hemsida så står det

> Edit your httpd.conf file and check that these lines are
>     present:
>   
>    LoadModule php4_module modules/libphp4.so
>    AddType application/x-httpd-php .php

Så nu fungerar det.

/Viktor

Permalänk: https://www.webforum.nu/p/1040967

---

Tråden på webben: https://www.webforum.nu/amne/webbservrar/76331-strul-med-apache-och-php
