halalaninitiative / halalan

Free and open-source voting system
Other
7 stars 13 forks source link

PHP parse error on eval()'d code #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Halalan
2. Go to halalan's base_url

What is the expected output? What do you see instead?
The login page should be displayed. However, this error occurs instead:

Parse error: syntax error, unexpected '<' in
/home/darwin/Projects/UnPLUG/halalan/trunk/system/libraries/Loader.php(706)
: eval()'d code on line 1

This error is caused by the call to eval() and only occurs when
short_open_tag is Off.

Please use labels and text to provide additional information.
Apache 2.2.8
PHP 5.2.6

Original issue reported on code.google.com by djclue...@gmail.com on 3 Jun 2008 at 11:17

GoogleCodeExporter commented 9 years ago

Original comment by djclue...@gmail.com on 3 Jun 2008 at 11:18

GoogleCodeExporter commented 9 years ago
Please make sure that $config['rewrite_short_tags'] is equal to TRUE in
system/application/config.php.

Original comment by waldemar...@gmail.com on 4 Jun 2008 at 4:42

GoogleCodeExporter commented 9 years ago
That should be system/application/config/config.php but it seems that this is an
upstream bug.  I tried reverting to the older version and it works.

Original comment by waldemar...@gmail.com on 4 Jun 2008 at 5:24

GoogleCodeExporter commented 9 years ago
$config['rewrite_short_tags'] is equal to TRUE in my config. Yeah, it seems 
that this
is an upstream bug caused by the usage of eval().

Original comment by djclue...@gmail.com on 4 Jun 2008 at 10:09

GoogleCodeExporter commented 9 years ago
Now I know why eval() was complaining about syntax errors...
Should we temporarily change line 706 of Loader.php to:

echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php 
echo ',
file_get_contents($_ci_path))).'<?php ');

(like in CI 1.6.1) until this issue is fixed upstream?

Original comment by djclue...@gmail.com on 5 Jun 2008 at 11:22

GoogleCodeExporter commented 9 years ago
I reported it at http://codeigniter.com/forums/viewthread/81326/ but there is no
response yet.  I suggest we don't use <?= anymore.

Original comment by waldemar...@gmail.com on 5 Jun 2008 at 5:46

GoogleCodeExporter commented 9 years ago
Fixed in r466.

Original comment by djclue...@gmail.com on 8 Jun 2008 at 2:41

GoogleCodeExporter commented 9 years ago

Original comment by toni...@gmail.com on 10 Jun 2008 at 9:52