Apache2.2.21 + mod_cgi + php rendering problem

The Apache configuration doesn't support DSO. When I request files with the postfix .html a dialogue box appears for either saving or opening the file. When it is a PHP script that I request the PHP tags are ignored and the code is rendered as plain text.

I have added and removed the media type;
Code:
 AddType applicatioon/x-htttpd-php .php
and
Code:
 AddType applciation/x-httpd-source .phps

Added and removed these handlers:
Code:
 AddHandler cgi-scrpt .cgi
Code:
 AddHanler php-script .php

And also added in the Options directive
Code:
Options ExecCGI

Leaving these directive in part or in whole doesn't change anything, a dialogue box on html tags, when removed the PHP script is displayed as plain text.
I don't know how to solve the issue. Can anyone help?
 
SirDice,

Thanks for pointing this out, but the httpd.config file has the correct syntax and spelling and apache2.2.17_1 is still mute.

Both Apache and PHP5 have been downloaded from a package version 8.2 release.

The version running on my computer is version 8.1 release, the reason is that I kept getting a libutil.so.9 needed by perl from ld-elf.so.1 while installing Apache2.2_17 downloaded from the ftp-archives

I don't know what to do next. Any advice short of upgrading to another package version?

May be has it anything to do with the sequence of the installations?
I did first install PHP5 extensions, then MySQL and finally Apache..
 
The PHP package does not contain the Apache module. You must build lang/php5 and choose the option to build the Apache module.

Code:
     APACHE=[B]off[/B] ([B]default[/B]) "Build Apache module"
 
Hello DutchDaemon, thank you for replying.

I don't know how to do that from packages installed with the [cmd=]pkg_add -r apache-2-2.17_1[/cmd] directive.

That version doesn't support "dso" modules, nor "fcgi", it only supports, it seems, "mod_cgi".

I have re-installed it, but still the same problem, php code is plain text,seems that I am in for a downgrade.

An earlier version worked really well, no compatibility problem nor any of the nefarious
Code:
 /libexec/ld-elf.so.1
Code:
could not find "libutil.so.9" needed by "perl"
A configuration file issue maybe?
 
You need to build lang/php5 from ports if you want the Apache module. The package does NOT contain it.

If you want some of the other Apache modules you'll have to build www/apache22 from the port too.
 
Back
Top