Welcome Guest, Not a member yet? Register   Sign In
Issue after upergrade to CodeIgniter 1.7.2 and PHP 5.3
#1

[eluser]Guido Mallee[/eluser]
Hello,

Yesterday I reinstalled my computer with Windows 7 and installed XAMPP with PHP 5.3.

Then I had some issues when i wanted to continue with one of my CodeIgniter projects. Soon I found out I had to upgrade my CodeIgniter to version 1.7.2 in order to be compatible with PHP 5.3. The error messages that i got before the CodeIgniter upgrade disapeared but now I'm stuck on some other problem. When opening my website in the browser I get 'Parse error: syntax error, unexpected T_ENDFOREACH'. It refers to the next piece of code in a view:

Code:
<div id="taal">
<img src="&lt;?=base_url()?&gt;assets/images/design/&lt;?=$lang?&gt;/language.png"/><br />
&lt;?php foreach ($languages as $language): ?&gt;
    &lt;?php if ($lang != $language['alias']): ?&gt;
    <a href="&lt;?=base_url() . $language['alias']?&gt;">
    &lt;? endif; ?&gt;
    <img src="&lt;?=base_url()?&gt;assets/images/design/&lt;?=$language['alias']?&gt;.png" border="0" />
    &lt;?php if ($lang != $language['alias']): ?&gt;</a>&lt;? endif; ?&gt;
&lt;?php endforeach; ?&gt;
</div>

I really can't see what is wrong with this code and everything was working fine before the upgrade to CI 1.7.2 and PHP 5.3.

Does anyone have an idea what might cause this problem?
#2

[eluser]joeizang[/eluser]
maybe this will help,

I seem to recall that the use of short tags with php5.3 was to be scrapped all together. I think you should change all your short tags to proper php tags and see what happends cos I am using the latest xampp with php5.3 and codeigniter 1.7.2 and no problemos at all
#3

[eluser]Guido Mallee[/eluser]
Thanks! That solved it!
#4

[eluser]Ram2810[/eluser]
i think you need to check if php short tags are enabled or not in index.php .... i had a problem with it once .... see if this can help in solving your problem
#5

[eluser]Guido Mallee[/eluser]
Hm, I cannot find that setting in the index.php file.
#6

[eluser]Ram2810[/eluser]
see in application/config/config.php file
#7

[eluser]Unknown[/eluser]
I seem to have stuck with a an issue with PHP 5.3 and CI 1.7. No matter what setting I try on the URI_Protocol setting my site seem to route back all the time to the home page. Irrespective of if I click on a link or if I type the URI directly on the browser to get to a different controller method I keep seeing the home page.

This is on a Windows XP SP2 machine with XAMPP. Anyone having similar issues?

Appreciated your help.




Theme © iAndrew 2016 - Forum software by © MyBB