I'm running EE 5.2.6 and also using the Okler Porto Theme HTML5 Template v7.2.6 (Most Recent).

I have spliced up the Okler Porto Template into Header, Body and Footer.

The issue I am having is with my contact page form. I am using their 'contact-us-advanced.php' script which is PHP and pasted above the in my header section.

I have turned PHP on in my 'header-contact' html template in EE 5.2.6. When I load the page I get this error message:

Fatal error: Namespace declaration statement has to be the very first statement in the script in /var/www/vhosts/thearthole.co.uk/httpdocs/bumhole/ee/legacy/libraries/Functions.php(627) : eval()'d code on line 2

Is there a fix for this issue and am guessing that EE is writing some white space above the PHP script in the template.

Best regards, Rob

  • I've abandoned using the Okler Theme PHP and instead have found the Email Addon in EE 5.2.6 and started using that. Sorry to waste any time in reading the above but if anyone does have a fix for it, I would still like to know. Thanks in advance. Rob – Rob Mar 25 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.