Jump to content

Short tags on EC2


arbitrageur
Go to solution Solved by mac_gyver,

Recommended Posts

HI,

 

I'm using;

https://github.com/onassar/PHP-Pagination

 

It works on my local test server, but on EC2, short tags are apparently not enabled by default.

 

The pagination is printing php:

<div class="pagination"><ul class="<?php= implode(' ', $classes) ?>">
<li class="<?php= implode(' ', $classes) ?>"><a href="<?php= ($href) ?>"><?php= ($previous) ?></a></li>
<li class="number active"><a data-pagenumber="<?php= ($current) ?>" href="#"><?php= ($current) ?></a></li>
<li class="number"><a data-pagenumber="<?php= ($current + $x + 1) ?>" href="<?php= ($href) ?>"><?php= ($current + $x + 1) ?></a></li>
<li class="number"><a data-pagenumber="<?php= ($current + $x + 1) ?>" href="<?php= ($href) ?>"><?php= ($current + $x + 1) ?></a></li>
<li class="<?php= implode(' ', $classes) ?>"><a href="<?php= ($href) ?>"><?php= ($next) ?></a></li>

I tried replacing <? with <?php to no avail. Not sure if the fact that one dependency is named "render.inc.php" instead of just ".php" which is causing the issue. Any ideas why apache is doing this? I'd rather not edit the .ini. Thanks..

Edited by arbitrageur
Link to comment
Share on other sites

  • Solution

<?php= does not exist. <?= would become <?php echo (with a space between the echo and any following value)

 

this isn't an Apache problem. it's a php configuration problem and people using php's lazy-way short-cuts in code they publish for others to use that is not portable between php versions/configurations.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.