Part of the EllisLab Network
   
4 of 4
4
PHP 5.3.0 Compatibility
Posted: 14 January 2010 02:11 PM   [ Ignore ]   [ # 46 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

marquex how is that better than the current code?

if ( ! is_php('5.3'))
{
    
@set_magic_quotes_runtime(0); // Kill magic quotes
 Signature 
Profile
MSG
 
 
Posted: 15 January 2010 09:27 AM   [ Ignore ]   [ # 47 ]  
Summer Student
Total Posts:  13
Joined  01-14-2010

When a version 5.4 or 6.0 is released, that code will execute the set_magic_quotes_runtime function again, and we’ll be forced to change the code again.

It’s better to use the version_compare function.

Profile
 
 
Posted: 15 January 2010 09:37 AM   [ Ignore ]   [ # 48 ]  
Summer Student
Total Posts:  13
Joined  01-14-2010

Ey i didn’t realized that is_php is using the function version_compare

Forget everything i said, is_php is right, i just didn’t know about it.

Profile
 
 
Posted: 15 January 2010 11:44 AM   [ Ignore ]   [ # 49 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

:-D

 Signature 
Profile
MSG
 
 
Posted: 16 February 2010 02:29 AM   [ Ignore ]   [ # 50 ]  
Lab Assistant
RankRank
Total Posts:  200
Joined  04-02-2009
Derek Jones - 09 September 2009 01:36 PM

CI will rewrite short tags in view files for you if the server doesn’t support it.

thats not working for me at all in php 5.3

If I use short tags it shows my code.. if I use echo statement with regular php tag it works.

Profile
 
 
Posted: 16 February 2010 07:40 AM   [ Ignore ]   [ # 51 ]  
Grad Student
Rank
Total Posts:  32
Joined  01-02-2010

one.com release php 5.3 last night i got these errors now.

Undefined property: CI_Loader::$session

and

Fatal error: Call to a member function userdata() on a non-object in

visit www.dack4.se to see the errors alive.

On line 126:

<?php 
        $mess 
$this->session->userdata('mess');
        if(!empty(
$mess))
        
{
        ?> 

Anyone know how i can fix it?

Profile
 
 
Posted: 16 February 2010 09:49 AM   [ Ignore ]   [ # 52 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002
NachoF - 16 February 2010 07:29 AM
Derek Jones - 09 September 2009 01:36 PM

CI will rewrite short tags in view files for you if the server doesn’t support it.

thats not working for me at all in php 5.3

If I use short tags it shows my code.. if I use echo statement with regular php tag it works.

Do you have ‘rewrite_short_tags’ set to TRUE in your config file?  See Alternative PHP Syntax for View files.

 Signature 
Profile
MSG
 
 
Posted: 16 February 2010 10:35 AM   [ Ignore ]   [ # 53 ]  
Lab Assistant
RankRank
Total Posts:  200
Joined  04-02-2009
Derek Jones - 16 February 2010 02:49 PM
NachoF - 16 February 2010 07:29 AM
Derek Jones - 09 September 2009 01:36 PM

CI will rewrite short tags in view files for you if the server doesn’t support it.

thats not working for me at all in php 5.3

If I use short tags it shows my code.. if I use echo statement with regular php tag it works.

Do you have ‘rewrite_short_tags’ set to TRUE in your config file?  See Alternative PHP Syntax for View files.

But didnt you say that if the server doesnt support them CI will automatically rewrite them?

Profile
 
 
Posted: 16 February 2010 10:37 AM   [ Ignore ]   [ # 54 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002
NachoF - 16 February 2010 03:35 PM
Derek Jones - 09 September 2009 01:36 PM

Do you have ‘rewrite_short_tags’ set to TRUE in your config file?  See Alternative PHP Syntax for View files.

But didnt you say that if the server doesnt support them CI will automatically rewrite them?

From the link above to the user guide:

Automatic Short Tag Support

Note: If you find that the syntax described in this page does not work on your server it might be that “short tags” are disabled in your PHP ini file. CodeIgniter will optionally rewrite short tags on-the-fly, allowing you to use that syntax even if your server doesn’t support it. This feature can be enabled in your config/config.php file.

 Signature 
Profile
MSG
 
 
Posted: 16 February 2010 11:33 AM   [ Ignore ]   [ # 55 ]  
Grad Student
Rank
Total Posts:  32
Joined  01-02-2010

did anyon even look at what i wrote? or shall i make a new topic to gain better attention?

Profile
 
 
Posted: 16 February 2010 11:37 AM   [ Ignore ]   [ # 56 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

I think a new topic would be best, with some additional context, i.e. what version of CI you’re running, where that code is located, the surrounding code, etc.

 Signature 
Profile
MSG
 
 
   
4 of 4
4