I'm new here

PHP not working on FirstSpirit

I have PHP file for form processing but my FristSpirit server doesn't recognize PHP. Can you help me?

The PHP is not executed, I will attach image.

4 Replies
Occasional Observer

Have you changed the file extention to .php .

Isn't the PHP Start Tag <?php

0 Kudos

Yes extension was changed, that in picture is output in browser when select inspect page.

Code looks like this:


        echo 'Firstname'. $_POST["template-contactform-firstname"];
        echo 'Lastname' . $POST['template-contactform-lastname'];
        echo 'Email' . $POST['template-contactform-email'];
        echo 'Company' . $POST['template-contactform-company'];
        echo 'Country' . $POST['template-contactform-country'];
        echo 'Phone' . $POST['template-contactform-phone'];
        echo 'Message: ' . $_POST["template-contactform-message"];


0 Kudos

Hi Milovan,

the problem here is "htmlMode". FirstSpirit sees XMLish tags and wants to inject stuff for the preview, which fails sometimes.

See for more information (Documentation FirstSpirit™  tells you the login credentials)

You need to deactive "htmlMode" for the tags, like this:

$CMS_SET(#global.htmlMode, false)$<?php$CMS_SET(#global.htmlMode, true)$


$CMS_SET(#global.htmlMode, false)$?>$CMS_SET(#global.htmlMode, true)$

In case you still get the commented-out version, caching is happening. You need to force-refresh, or simply wait a bit.



Hello Milovan,

is this still an open question? Do you need further help or did the given replies already help you?

If so it would be great if you mark the "correct answer".

Best regards

0 Kudos