질문 Q #10822
core/Common.php 대해 질문 있습니다.
dataguru 2013-09-17 15:30:50
 현제 windows 2003 iis 에서 php 설치하여 테스트 중입니다.
그런데 아래와 같은 오류가 발생하네요. 문제는 count 가 초기화 안되어 있어서 그런것 같은데
count 변수 초기화만 시켜주면 해결이 될까요? 이게 system 폴더 안에 있는 파일이라 한부로 건드리면 안될것 같아서요..

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: count

Filename: core/Common.php

Line Number: 531




 

if ( ! function_exists('remove_invisible_characters'))

{

function remove_invisible_characters($str, $url_encoded = TRUE)

{

$n>

// every control character except newline (dec 10)

// carriage return (dec 13), and horizontal tab (dec 09)

if ($url_encoded)

{

$non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15

$non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31

}

$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127


do

{

$str = preg_replace($non_displayables, '', $str, -1, $count);

}

while ($count);


return $str;

}

}

 
답변 4
#1 dataguru 2013-09-17 15:42:51
추가 질문 있습니다.
iis + php 로 사용하고 있는데요 코드이그나이터 콘트롤러 규칙이 적용이 안됩니다.
따로 설정할 php 문서가 있나요?

.htaccess 파일은 다음과 같습니다.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|captcha|include|uploads|application|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
#2 들국화 2013-09-17 15:53:38
apache + php 를 사용 하셔야 합니다.

iis 에서는 web.config 파일에 설정을 해야 하는거 같네요.

iis 워낙에 오래전에 사용해 봐서.. ㅡㅡ;


http://stackoverflow.com/questions/7688714/htaccess-is-not-working-on-iis
#3 dataguru 2013-09-17 15:58:38
감사합니다!

#4 다다아빠 2014-10-21 11:00:35

IIS + CI 2.2.0 설치하자마자 index.php 콜 하니 아래와 같은 메시지가 보여서..여기저기 자료 찾가다 찾은 자료 공유합니다.
[ㅁㅔㅅㅣ지]
A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

[해결방법]

이전: return $_config[0] =& $config;
변경: $_config[0] =& $config;
         return $_config[0]; 

참고:https://ellislab.com/forums/viewthread/244510/#1066558
   milan.petrak