arbitrageur Posted November 3, 2014 Share Posted November 3, 2014 (edited) 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 November 3, 2014 by arbitrageur Quote Link to comment https://forums.phpfreaks.com/topic/292238-short-tags-on-ec2/ Share on other sites More sharing options...
Solution mac_gyver Posted November 3, 2014 Solution Share Posted November 3, 2014 <?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. Quote Link to comment https://forums.phpfreaks.com/topic/292238-short-tags-on-ec2/#findComment-1495586 Share on other sites More sharing options...
requinix Posted November 3, 2014 Share Posted November 3, 2014 = is available in PHP 5.4+ regardless of settings. If it doesn't work then you're using 5.3 (or earlier) and you need to upgrade. Quote Link to comment https://forums.phpfreaks.com/topic/292238-short-tags-on-ec2/#findComment-1495588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.