Cannot enable clamav nor Spamassasin , PHP issue

OS = Ubuntu14.04

Vmin 4.17 was not installed using the install script, regretably :frowning: and onto an new install of Webmin. After fixing some other stuff manually , mostly var/www path problems -

I get this error:

Failed to save enabled features : Apache configuration file /etc/apache2/mods-enabled/php5.conf contains SetHandler lines that prevent PHP from running with domain owner permissions. These lines must be removed.

Which makes sense because PHP is not working at all for any previews so far for the domains that use it.

I was messing with this file earlier but it cannot be edited in Webmins file manager , nor downloaded as its saying its not a real file or whatever, I guess for security reasons. I dont like using VI editor but I got Nano and still Im not sure why its faulting this , heres what I can tell is in the file from the nano editor. I thought for sure there was more in this file than I can see here when viewing it in the VI editor.

As the PHP execution mode for this domain I am testing, I have CGI wrapper selected because I wanted to see what the best method would be. mod_php also does not work and the other option I installed was one that I forget the name of at the moment but was a hybrid of the 2 that needed php5 installed. PHP version info also does not come up so there is a major problem here.

I do have .htaccess files in the public_html home folders for these domains, and from what I read, the execution mode selected could either ignore or use them depending on what one is used?

GNU nano 2.2.6 File: /etc/apache2/mods-enabled/php5.conf

[code]

<FilesMatch β€œ.+.ph(p[345]?|t|tml)$”>
SetHandler application/x-httpd-php

<FilesMatch β€œ.+.phps$”>
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it’s recommended to enable access to the files
# only in specific virtual host or directory
Order Deny,Allow
Deny from all

Deny access to files without filename (e.g. β€˜.php’)

<FilesMatch β€œ^.ph(p[345]?|t|tml|ps)$”>
Order Deny,Allow
Deny from all

Running PHP scripts in user directories is disabled by default

                           [ Read 30 lines ]

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
==========================================================[/code]

Bumping this up - can anyone at least lead me in the right direction?

Howdy,

Hmm, I’m not sure I understand the questions you’re asking there – but the error you received from Virtualmin indicates that you need to comment out the SetHandler lines in that php5.conf file.

If you comment those out, it should resolve the errors you were seeing.

-Eric

Hi andreychek

The trick with that file is that it cant be edited with filemanager, nor downloaded. Its got to be edited in something like VI editor at the command prompt, I am guessing by the way its chmodded, for added security.

Im mostly concerned that I would mess up the file as Im bad with VI editor commands. I did notice some " ~ " trailing chars at the end of that file, which I didnt wanna mess with.

I also realized that I installed vmin onto a webmin install manually via apt get I believe, and I am pretty sure the recommended way to install vmin is via the install.sh script?

While trying to fix this php problem, I installed other php handlers besides whats installed by default, hoping to resolve the issue. If I use the install script , will it overwrite the current installation and also fix the php problem?
It seems to me in my reearch the manual install assumes the apache dir is /var/www , while its suppose to be /home/ , and I think thats most the problem but Im not 100% sure.