Server can't handle @php() but can handle @php?

Not sure what is missing on my staging server, it runs php and apache no problem. But for some reason the shorthand @php() breaks pages.

Like @php(post_class()) just echoes out <?php(post_class()) when the server actually renders the page. Having to change every instance of @php(some_function()) to @php some_function() @endphp everywhere is not fun lol.

It’s running PHP 7 and Apache, any idea what’s going on here?

But you probably should do this anyways, because we were wrong with our initial implementation. See https://github.com/roots/sage/pull/2042 and https://github.com/roots/sage/issues/2012

1 Like

Oh fun lol. So this is already fixed on new installs?

Yeah, https://github.com/roots/sage/pull/2042 is in master.