Welcome Guest, Not a member yet? Register   Sign In
PHP 5.3.0 Compatibility
#25

[eluser]Unknown[/eluser]
my client can't wait for CI 1.7.2

so i have to make several changes myself ;-)

here what i do

A. remove by condition set_magic_quotes_runtime

file: codeigniter/CodeIgniter.php (line: 60)

Code:
if(!phpversion()=='5.3.0')
    set_magic_quotes_runtime(0); // Kill magic quotes



B. remove all new object by reference, change '=&' to '='

from: $objects[$class] =& new $name();
became: $objects[$class] = new $name();

file: codeigniter/Common.php (line: 130)
file: codeigniter/Common.php (line: 136)
file: libraries/Loader.php (line: 255)
file: database/DB.php (line: 133)

Code:
$objects[$class] = new $name();

see: = new


C. since hyphen '-' became special character in php 5.3, change this way:

file: config/config.php (line: 153)

from:
Code:
$config['permitted_uri_chars'] = 'a-z ~%.:_\-';

to:
Code:
$config['permitted_uri_chars'] = '~%.:_\-';


file: libraries/URI.php (line: 189)

from:
Code:
if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))

to:
Code:
if ( !
preg_match("|^[\w".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))

wacth!:
! preg_match("|^[\w


i hope this can help


Messages In This Thread
PHP 5.3.0 Compatibility - by El Forum - 07-29-2009, 08:30 AM
PHP 5.3.0 Compatibility - by El Forum - 07-30-2009, 12:24 AM
PHP 5.3.0 Compatibility - by El Forum - 07-30-2009, 12:49 AM
PHP 5.3.0 Compatibility - by El Forum - 07-30-2009, 05:59 AM
PHP 5.3.0 Compatibility - by El Forum - 07-30-2009, 06:52 AM
PHP 5.3.0 Compatibility - by El Forum - 07-30-2009, 11:45 PM
PHP 5.3.0 Compatibility - by El Forum - 07-31-2009, 03:05 AM
PHP 5.3.0 Compatibility - by El Forum - 07-31-2009, 03:23 AM
PHP 5.3.0 Compatibility - by El Forum - 07-31-2009, 03:45 AM
PHP 5.3.0 Compatibility - by El Forum - 07-31-2009, 04:50 AM
PHP 5.3.0 Compatibility - by El Forum - 08-04-2009, 04:25 AM
PHP 5.3.0 Compatibility - by El Forum - 08-04-2009, 04:44 AM
PHP 5.3.0 Compatibility - by El Forum - 08-04-2009, 05:45 AM
PHP 5.3.0 Compatibility - by El Forum - 08-04-2009, 07:57 AM
PHP 5.3.0 Compatibility - by El Forum - 08-04-2009, 08:51 AM
PHP 5.3.0 Compatibility - by El Forum - 08-04-2009, 08:53 AM
PHP 5.3.0 Compatibility - by El Forum - 08-05-2009, 11:39 PM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 12:09 AM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 02:09 AM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 02:55 AM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 03:33 AM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 10:42 AM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 12:32 PM
PHP 5.3.0 Compatibility - by El Forum - 08-06-2009, 12:38 PM
PHP 5.3.0 Compatibility - by El Forum - 08-10-2009, 04:00 PM
PHP 5.3.0 Compatibility - by El Forum - 08-10-2009, 04:09 PM
PHP 5.3.0 Compatibility - by El Forum - 08-10-2009, 04:17 PM
PHP 5.3.0 Compatibility - by El Forum - 08-18-2009, 01:43 PM
PHP 5.3.0 Compatibility - by El Forum - 08-19-2009, 09:52 AM
PHP 5.3.0 Compatibility - by El Forum - 08-23-2009, 08:10 PM
PHP 5.3.0 Compatibility - by El Forum - 08-23-2009, 08:15 PM
PHP 5.3.0 Compatibility - by El Forum - 08-23-2009, 08:27 PM
PHP 5.3.0 Compatibility - by El Forum - 08-24-2009, 09:29 PM
PHP 5.3.0 Compatibility - by El Forum - 08-25-2009, 02:46 AM
PHP 5.3.0 Compatibility - by El Forum - 08-26-2009, 11:47 AM
PHP 5.3.0 Compatibility - by El Forum - 08-26-2009, 11:55 AM
PHP 5.3.0 Compatibility - by El Forum - 08-26-2009, 12:09 PM
PHP 5.3.0 Compatibility - by El Forum - 08-26-2009, 01:21 PM
PHP 5.3.0 Compatibility - by El Forum - 08-26-2009, 01:44 PM
PHP 5.3.0 Compatibility - by El Forum - 08-26-2009, 01:52 PM
PHP 5.3.0 Compatibility - by El Forum - 09-08-2009, 12:07 PM
PHP 5.3.0 Compatibility - by El Forum - 09-08-2009, 05:14 PM
PHP 5.3.0 Compatibility - by El Forum - 09-08-2009, 07:40 PM
PHP 5.3.0 Compatibility - by El Forum - 09-09-2009, 03:45 AM
PHP 5.3.0 Compatibility - by El Forum - 09-09-2009, 07:36 AM
PHP 5.3.0 Compatibility - by El Forum - 01-14-2010, 12:08 PM
PHP 5.3.0 Compatibility - by El Forum - 01-14-2010, 12:11 PM
PHP 5.3.0 Compatibility - by El Forum - 01-15-2010, 07:27 AM
PHP 5.3.0 Compatibility - by El Forum - 01-15-2010, 07:37 AM
PHP 5.3.0 Compatibility - by El Forum - 01-15-2010, 09:44 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 12:29 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 05:40 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 07:49 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 08:35 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 08:37 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 09:33 AM
PHP 5.3.0 Compatibility - by El Forum - 02-16-2010, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB