세션을 저장하는 파티션 또는 디렉토리(/tmp) 사용율이 100% 일때 발생합니다.
No space left on device (28)세션을 저장하는 디렉토리를 비워보세요~~!!!
No space left on device (28)세션을 저장하는 디렉토리를 비워보세요~~!!!

WordPress ERD 2.7
$this->Email->charset = 'utf-8';
$this->Email->from = '블루비 <blog @ blueb . net>';
$this->Email->to = '블루비 <blog @ blueb . net>';
$this->Email->subject = 'CakePHP Email Test';
$this->Email->template = 'test'; //views/elements/email/html/test.ctp
$this->Email->sendAs = 'both'; // text, html or both
$this->Email->send();
저는 이미 일주일전에 결제까지 했어요 ㅋㅋ
혹시 오시면 뵙겠네요 ^^;
작년에 CakePHP 했다고 들었는데 아마 그래서 안들어간 것 같아요

CKEditor
저도 이 사실을 얼마 전에 알았답니다. ;; 바뀐건 꽤 된 것 같던데 말이죠. ckeditor 같은 해외 위지윅들은 국산 에디터들보다 웹표준에 훨씬 잘 맞는 코드를 만들어주는 것 같아요. 짧은 지식에 인상적 판단이지만 말예요.
제가 웹관리 지식이 아주 초보라 무식한 질문이 될지도 모르겠네요. 이 CKeditor를 사이트 계정에 올려서 이용한다는 것은 이해하겠는데 구체적으로는 어떻게 사용하는 것입니까? 예를 들면, 이 프로그램을 사용하면 관리하고자 하는 웹사이트 첫페이지를 웹상에서 수정할 수 있다는 의미인가요? 그렇다면, 어떤식으로 그 파일을 열고 수정하고 저장해야 하는지 등의 방법이 궁금합니다.
관련 내용이 있는 링크만 알려주셔도 고맙겠습니다.
CKeditor 는 html코드상에 자바스크립트로 구동이 됩니다... 드림위버와 같은 위지윅 에디터만 제공을 한다고 생각하시면 됩니다.
파일을 열고 수정하는 방법은 데이터 베이스와 연동을 해야 합니다.
php, jsp, asp와 같은 웹언어 그리고 데이터 베이스( MySQL, MsSQL, Oracle .. ) 를 통해서 구현을 해야겠지요~~!!!
웹프로그래머가 해야 할 일입니다..... 관리적인 측면과는 다소 거리가 있죠~~!!!


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="Imported Rule CSS" stopProcessing="true">
<match url="^css(.*)$" ignoreCase="false" />
<action type="Rewrite" url="webroot/css{R:1}" />
</rule>
<rule name="Imported Rule JS" stopProcessing="true">
<match url="^js(.*)$" ignoreCase="false" />
<action type="Rewrite" url="webroot/js{R:1}" />
</rule>
<rule name="Imported Rule IMG" stopProcessing="true">
<match url="^img(.*)$" ignoreCase="false" />
<action type="Rewrite" url="webroot/img{R:1}" />
</rule>
<rule name="Imported Rule Images" stopProcessing="true">
<match url="^images(.*)$" ignoreCase="false" />
<action type="Rewrite" url="webroot/images{R:1}" />
</rule>
<rule name="Imported Rule Flash" stopProcessing="true">
<match url="^flash(.*)$" ignoreCase="false" />
<action type="Rewrite" url="webroot/flash{R:1}" />
</rule>
<rule name="Imported Rule Files" stopProcessing="true">
<match url="^files(.*)$" ignoreCase="false" />
<action type="Rewrite" url="webroot/files{R:1}" />
</rule>
<rule name="Imported Rule 3" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<handlers>
<add name="php5" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe" resourceType="Unspecified" />
</handlers>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>

Configure::write('Config.language', 'kor');
Router::connect('/:language/:controller/:action/*', array(), array('language' => '[a-z]{3}'));
class AppController extends Controller {
function beforeFilter(){
$this->_setLanguage();
}
function _setLanguage() {
if ( $this->Cookie->read('lang') && !$this->Session->check('Config.language')){
$this->Session->write('Config.language', $this->Cookie->read('lang'));
}
else if( isset($this->params['language'] ) && ($this->params['language'] != $this->Session->read('Config.language')) ){
$this->Session->write('Config.language', $this->params['language']);
$this->Cookie->write('lang', $this->params['language'], true, '20 days');
}
else if ( !isset($this->params['language']) && isset($this->params['named']['language']) && ($this->params['named']['language'] != $this->Session->read('Config.language'))) {
$this->Session->write('Config.language', $this->params['named']['language']);
$this->Cookie->write('lang', $this->params['named']['language'], true, '20 days');
}
else if( !isset($this->params['language']) && !isset($this->params['named']['language']) && $this->Cookie->read('lang') != Configure::Read('Config.language') ){
$this->Session->write('Config.language', Configure::Read('Config.language'));
$this->Cookie->write('lang', Configure::Read('Config.language'), true, '20 days');
}
}
}//end of class AppController
msgid "num"/app/locale/kor/LC_MESSAGES/default.po
msgstr "No"
msgid "file"
msgstr "File"
msgid "num"
msgstr "번호"
msgid "file"
msgstr "파일"
<?=__("num");?> >> 번호
<?=$this->link(__("num",true),array('/'));?> >> <a href="/">번호</a>
http://blueb.net/controller/action (kor language)
http://blueb.net/eng/controller/action (eng language)
<%
import! java.util.regex.*; // Pattern과 Matcher가 속한 패키지
class RegularEx5
{
public static void main(String[] args)
{
String source = "23123()asdawe()23123()asdawe()23123()asdawe()";
String pattern = "\\d+\\(\\)";// 숫자(\\d)뒤에오는 괄호를 패턴으로 지정
// \d는 숫자를 의미하며 +는 하나이상의 숫자가 있어야함을 의미
// 괄호는 예약문자(?)이므로 \\를 앞에 붙여줘야 괄호로 인식
// 괄호앞에 \\를 붙이지 않으면 그룹화문자로 인식한다.
// \를 \\와 같이 두개씩 쓰는 이유는
//문자열 내에서 \를 표현하려면 두개 써줘야하기 때문
StringBuffer sb = new StringBuffer();
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(source);
System.out.println("source:"+source);
int i=0;
while(m.find()) {// 지정한 패턴과 매칭되는 부분을 치환한다. 마지막 두글자인 괄호를 잘라내고
// 원하는 문자(@@)로 바꾼다.
// find()를 통해서 패턴과 일치하는 부분은 m.group()을 통해서 얻는다.
m.appendReplacement(sb, m.group().substring(0, m.group().length()-2)+"@@");
}//end of while
m.appendTail(sb);
System.out.println("result:"+sb.toString());
}
}
/*
source:23123()asdawe()23123()asdawe()23123()asdawe()
result:23123@@asdawe()23123@@asdawe()23123@@asdawe()
*/%>
숫자뒤에오는 ()를 @@로 바꾼겁니다.
ex)정규식 사용예
package test.regEx;
import! java.util.regex.*; // Pattern과 Matcher가 속한 패키지
class RegularEx {
public static void main(String[] args) {
String[]
data = { "bat", "baby", "bonus", "c", "cA", "co", "c.",
"c0", "c#",
"car", "combat", "count", "date", "disc", "mmcard", "mmca",
"ca",
"ca&&", "^ca", "*ca~", "#*&ca)^(", "yraa*ca#iiop", "yraa*ca&",
"yraa*ca", "ca^7ae", ")ca^7ae", "aa''ca%", "'(ca%^bc",
"vv'(ca%^bc",
"dca~", "*ca0", "*ca0^", "%*ca0", "%*ca0ca^^", "%*ca가^^",
"%*ㄱca^^",
"^@", "&*@~", "@_~", "@@", "#@@*", "*@@", "aa*@@", "yraa*@@(fa", "*@@0",
"@@0", "aa''@%", "aa''@%(aa", "''@%(aa",
"'@%(aa",
"**@rd",
"mm@^^", "*@0*", "*@0@*", "*@ㄱ@*", "*@ㄱ*",
"ㄱ@*"};
String[] pattern = { ".*", "c[a-z]*", "c[a-z]",
"c[a-zA-Z]",
"c[a-zA-Z0-9]", "c.", "c.*", "c\\.", "c\\w", "c\\d",
"c.*t",
"[b|c].*", ".*a.*", ".*a.+",
"[b|c].{2}","[a-z]*ca[a-z]*",
"[^a-zA-Z0-9ㄱ-힣]*@[^a-zA-Z0-9ㄱ-힣]*",
"@[^a-zA-Z0-9ㄱ-힣].*", "[a-zA-Z0-9ㄱ-힣]*[^a-zA-Z0-9ㄱ-힣]@",
"[^a-zA-Z0-9ㄱ-힣]*@[^a-zA-Z0-9ㄱ-힣].*",
"[a-zA-Z0-9ㄱ-힣]*[^a-zA-Z0-9ㄱ-힣]@[^a-zA-Z0-9ㄱ-힣].*",
"[^a-zA-Z0-9ㄱ-힣]*ca[^a-zA-Z0-9ㄱ-힣]*",
"ca[^a-zA-Z0-9ㄱ-힣].*", "[a-zA-Z0-9ㄱ-힣]*[^a-zA-Z0-9ㄱ-힣]ca",
"[^a-zA-Z0-9ㄱ-힣]*ca[^a-zA-Z0-9ㄱ-힣].*",
"[a-zA-Z0-9ㄱ-힣].*[^a-zA-Z0-9ㄱ-힣]ca[^a-zA-Z0-9ㄱ-힣].*"};
for (int x = 0; x < pattern.length; x++) {
Pattern p =
Pattern.compile(pattern[x]);
System.out.print("Pattern : " + pattern[x] +
" 결과: ");
for (int i = 0; i < data.length; i++) {
Matcher m =
p.matcher(data[i]);
if (m.matches())
System.out.print(data[i] +
", ");
}
System.out.println();
}
} // public static void
main(String[] args)
}
/*
Pattern : .* 결과: bat, baby, bonus, c, cA, co, c., c0, c#, car, combat,
count, date, disc, mmcard, mmca, ca, ca&&, ^ca, *ca~, #*&ca)^(,
yraa*ca#iiop, yraa*ca&, yraa*ca, ca^7ae, )ca^7ae, aa''ca%, '(ca%^bc,
vv'(ca%^bc, dca~, *ca0, *ca0^, %*ca0, %*ca0ca^^, %*ca가^^, %*ㄱca^^, ^@, &*@~,
@_~, @@, #@@*, *@@, aa*@@, yraa*@@(fa, *@@0, @@0, aa''@%, aa''@%(aa, ''@%(aa, '@%(aa, **@rd, mm@^^, *@0*, *@0@*, *@ㄱ@*, *@ㄱ*, ㄱ@*,
Pattern :
c[a-z]* 결과: c, co, car, combat, count, ca,
Pattern : c[a-z] 결과: co, ca,
Pattern : c[a-zA-Z] 결과: cA, co, ca,
Pattern : c[a-zA-Z0-9] 결과: cA, co,
c0, ca,
Pattern : c. 결과: cA, co, c., c0, c#, ca,
Pattern : c.* 결과: c,
cA, co, c., c0, c#, car, combat, count, ca, ca&&, ca^7ae,
Pattern :
c\. 결과: c.,
Pattern : c\w 결과: cA, co, c0, ca,
Pattern : c\d 결과: c0,
Pattern : c.*t 결과: combat, count,
Pattern : [b|c].* 결과: bat, baby,
bonus, c, cA, co, c., c0, c#, car, combat, count, ca, ca&&, ca^7ae,
Pattern : .*a.* 결과: bat, baby, car, combat, date, mmcard, mmca, ca,
ca&&, ^ca, *ca~, #*&ca)^(, yraa*ca#iiop, yraa*ca&, yraa*ca,
ca^7ae, )ca^7ae, aa''ca%, '(ca%^bc, vv'(ca%^bc, dca~, *ca0, *ca0^, %*ca0,
%*ca0ca^^, %*ca가^^, %*ㄱca^^, aa*@@, yraa*@@(fa,
aa''@%, aa''@%(aa, ''@%(aa, '@%(aa,
Pattern : .*a.+ 결과: bat, baby, car, combat, date, mmcard, ca&&,
*ca~, #*&ca)^(, yraa*ca#iiop, yraa*ca&, yraa*ca, ca^7ae, )ca^7ae,
aa''ca%, '(ca%^bc, vv'(ca%^bc, dca~, *ca0, *ca0^, %*ca0, %*ca0ca^^, %*ca가^^,
%*ㄱca^^, aa*@@, yraa*@@(fa, aa''@%, aa''@%(aa, ''@%(aa, '@%(aa,
Pattern : [b|c].{2} 결과: bat, car,
Pattern : [a-z]*ca[a-z]* 결과: car,
mmcard, mmca, ca,
Pattern : [^a-zA-Z0-9ㄱ-힣]*@[^a-zA-Z0-9ㄱ-힣]* 결과: ^@,
&*@~, @_~, @@, #@@*, *@@,
Pattern : @[^a-zA-Z0-9ㄱ-힣].* 결과: @_~, @@,
@@0,
Pattern : [a-zA-Z0-9ㄱ-힣]*[^a-zA-Z0-9ㄱ-힣]@ 결과: ^@, @@,
Pattern :
[^a-zA-Z0-9ㄱ-힣]*@[^a-zA-Z0-9ㄱ-힣].* 결과: &*@~, @_~, @@, #@@*, *@@, *@@0, @@0, ''@%(aa, '@%(aa,
Pattern :
[a-zA-Z0-9ㄱ-힣]*[^a-zA-Z0-9ㄱ-힣]@[^a-zA-Z0-9ㄱ-힣].* 결과: #@@*, *@@, aa*@@, yraa*@@(fa, *@@0, '@%(aa,
Pattern :
[^a-zA-Z0-9ㄱ-힣]*ca[^a-zA-Z0-9ㄱ-힣]* 결과: ca, ca&&, ^ca, *ca~,
#*&ca)^(,
Pattern : ca[^a-zA-Z0-9ㄱ-힣].* 결과: ca&&, ca^7ae,
Pattern : [a-zA-Z0-9ㄱ-힣]*[^a-zA-Z0-9ㄱ-힣]ca 결과: ^ca, yraa*ca,
Pattern :
[^a-zA-Z0-9ㄱ-힣]*ca[^a-zA-Z0-9ㄱ-힣].* 결과: ca&&, *ca~, #*&ca)^(,
ca^7ae, )ca^7ae, '(ca%^bc,
Pattern :
[a-zA-Z0-9ㄱ-힣].*[^a-zA-Z0-9ㄱ-힣]ca[^a-zA-Z0-9ㄱ-힣].* 결과: yraa*ca#iiop,
yraa*ca&, aa''ca%, vv'(ca%^bc,
*/
[참고]쌍따옴표(")내에서 escape문자(\)를 표현하려면 escape문자를 '\'와 같이 두 번 사용해야한다.
자주 쓰일 만한 몇 가지 패턴들을 만들어서 테스트하였다. 그 결과를 정리해보면 다음과 같다.
pattern0 = "[^가-힣]" '한글만
pattern1 = "[^-0-9 ]" '숫자만
pattern2 =
"[^-a-zA-Z]" '영어만
pattern3 = "[^-가-힣a-zA-Z0-9/ ]" '숫자와 영어 한글만
pattern4 =
"<[^>]*>" '태그만
pattern5 = "[^-a-zA-Z0-9/ ]" '영어 숫자만
|
정규식 |
설명 |
결과 |
|
c[a-z]* |
c로 시작하는 영단어 |
c,ca,co,car,combat,count, |
|
c[a-z] |
c로 시작하는 두 자리 영단어 |
ca,co, |
|
c[a-zA-Z] |
c로 시작하는 두 자리 영단어 (a~z 또는 A~Z, 즉 대소문자 구분안함) |
cA,ca,co, |
|
c[a-zA-Z0-9] c\w |
c로 시작하고 숫자와 영어로 조합된 두 글자 |
cA,ca,co,c0, |
|
.* |
모든 문자열 |
bat,baby,bonus,c,cA,ca,co,c.,c0,c#,car,combat,count,date,disc, |
|
c. |
c로 시작하는 두 자리 |
cA,ca,co,c.,c0,c#, |
|
c.* |
c로 시작하는 모든 문자열(기호포함) |
cA,ca,co,c.,c0,c#,car,combat,count, |
|
c\. |
c.와 일치하는 문자열 '.'은 정규식표현에 사용되는 문자이므로 escape문자인 ''를 사용해야한다. |
c., |
|
c\d c[0-9] |
c와 숫자로 구성된 두 자리 문자열 |
c0, |
|
c.*t |
c로 시작하고 t로 끝나는 모든 문자열 |
combat,count, |
|
[b|c].* [bc].* [b-c].* |
b 또는 c로 시작하는 문자열 |
bat,baby,bonus,c,cA,ca,co,c.,c0,c#,car,combat,count, |
|
[^b|c].* [^bc].* [^b-c].* |
b 또는 c로 시작하지 않는 문자열 |
date,disc, |
|
.*a.* |
a를 포함하는 모든 문자열 * : 0 또는 그 이상의 문자 |
bat,baby,ca,car,combat,date, |
|
.*a.+ |
a를 포함하는 모든 문자열. +: 1 또는 그 이상의 문자 +는 *과는 달리 반드시 하나 이상의 문자가 있어야 하므로 a로 끝나는 단어는 포함되지 않았다. |
bat,baby,car,combat,date, |
|
[b|c].{2} |
b 또는 c로 시작하는 세 자리 문자열. (b 또는 c 다음에 두 자리이므로 모두 세 자리) |
bat,car, |
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>http://blueb.net/blog</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/error/code404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error/code500.jsp</location>
</error-page>
</web-app>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
response.setStatus(HttpServletResponse.SC_OK);
%>
<html>
<head>
<title>404 Not Found</title>
</head>
<body>The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable. </body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
response.setStatus(HttpServletResponse.SC_OK);
%>
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
The server encountered an unexpected condition which prevented it from fulfilling the request.
</body>
</html>
Javascript
<script type="text/javascript">
window.location.href = 'http://blueb.net/blog'
</script>
if (Auth_OpenID::arrayGet($q, $key) != $value) {
on line 922 with
if ($key != 'url' && Auth_OpenID::arrayGet($q, $key) != $value) {
public $components = array('Openid');
Login form (app/views/users/login.ctp):
<?php
if (isset($message)) {
echo '<p class="error">'.$message.'</p>';
}
echo $form->create('User', array('type' => 'post', 'action' => 'login'));
echo $form->input('OpenidUrl.openid', array('label' => false));
echo $form->end('Login');
?>
And the controller (app/controllers/users_controller.php):
<?
class UsersController extends AppController {
public $components = array('Openid');
public $uses = array();
public function login() {
$returnTo = 'http://'.$_SERVER['SERVER_NAME'].'/users/login';
if (!empty($this->data)) {
try {
$this->Openid->authenticate($this->data['OpenidUrl']['openid'], $returnTo, 'http://'.$_SERVER['SERVER_NAME']);
} catch (InvalidArgumentException $e) {
$this->setMessage('Invalid OpenID');
} catch (Exception $e) {
$this->setMessage($e->getMessage());
}
} elseif (count($_GET) > 1) {
$response = $this->Openid->getResponse($returnTo);
if ($response->status == Auth_OpenID_CANCEL) {
$this->setMessage('Verification cancelled');
} elseif ($response->status == Auth_OpenID_FAILURE) {
$this->setMessage('OpenID verification failed: '.$response->message);
} elseif ($response->status == Auth_OpenID_SUCCESS) {
echo 'successfully authenticated!';
exit;
}
}
}
private function setMessage($message) {
$this->set('message', $message);
}
}
?>
$this->Profile->validate = Set::merge($this->Profile->validate, array(
'name'=>array(
'required'=>true,
'rule'=>array('alphaNumeric')
)
));
$this->Board->bindModel(array(
'hasOne'=>array('[ClassName]'=>array('foreignKey'=>'id'))
));
$this->Board->bindModel(array(
'hasOne'=>array('[ClassName]'=>array('foreignKey'=>'id'))
),false);
$form->input('Model.field',array (
'legend'=>false,
'type'=>'radio',
'options'=>array(
'val1'=>'label1',
'val2'=>'label2'
),
'default'=>'val2')))
제가 블로그를 티스토리로 옮겼어요. 그래서 하위 디렉토리 tc 없이 그냥 글번호를 붙여주면 그 글로 갑니다. ^^
http://anjella.co.kr/tc/283
=> http://anjella.co.kr/283
2009/11/05 18:04 [수정/삭제] [답글]
그렇군요. 꽉차면 저런 메시지가 뜨는군요!
2009/11/06 09:24 [수정/삭제]
저 메시지 말고도 추가 메시지가 더 나오는데 거기에 보면 session.save_path 과련 메시지도 보입니다.
갑자기 모든 사이트에 저런 메시지가 보이길래 서버쪽 문제인거 같아 찾아 보니.. 역시나 .. full disk