TIP게시판

제목 php 5.3.0에서 ci 에러 잡기
글쓴이 변종원(웅파) 작성시각 2009/08/17 21:19:54
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 17327   RSS
ci포럼에서 퍼왔습니다.
좀전에 집에 xampp 1.7.2 버전을 설치하고 svn으로 데이터 다운로드후 접속을 했더니..
무지막지한 에러를 뱉어내더군요.
그래서 ci포럼 검색해보니 php 5.3.0부터 set_magic_quotes_runtime 이게 없어졌습니다. ^^;;;;
이거 큰일이네요. CI 1.7.2 버전이 빨리 나와야겠네요.



my client can’t wait for CI 1.7.2

so i have to make several changes myself wink

here what i do

A. remove by condition set_magic_quotes_runtime

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

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)

$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:

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

to:

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


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

from:

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

to:

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

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


i hope this can help


 다음글 sql인젝션 방지처리. (1)
 이전글 파일 1개로 mysql관리하기. (4)

댓글

ci세상 / 2009/08/17 22:56:22 / 추천 0
오레 ~~ 감사합니다.^^

이클립스로 디버그할때 4.X , 5.X... 여러개를 설치해 두고 바꿔가면서 돌려보아야 하겠네요^^

CI버젼도 앞으로는 5.X 최적화된 배포버젼이 나오기를 기대하면서 유용한팁 얻어갑니다.~
듬직이 / 2009/08/18 10:18:43 / 추천 0
감사합니다...
한동안 xampp 1.7.1 버전을 사용해야 겠네요 ^^;