webForumDet fria alternativet

Strul med apache och PHP

1 svar · 219 visningar · startad av Viktor

ViktorMedlem sedan aug. 20021 752 inlägg
#1

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

ViktorMedlem sedan aug. 20021 752 inlägg
#2

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

123 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
120 ms — hämta tråd, inlägg och bilagor (db)