Posted
Filed under 프로그래밍
5.6으로 설치했더니 insert에서 오류가 난다.
이전버전에서는 값을 넘겨주지 않아도 됐는데 default 값이 정해져있지 않으면 invalid value error 오류를 떨군다.
이걸 처리하려면 코드에서
SET SESSION sql_mode=''; 를 해주던가
my.cnf 파일 mysqld 부분에 sql_mode='' 를 추가해준다.
아니면 default값 다 넣어주시던가...


2015/04/22 19:05 2015/04/22 19:05
Posted
Filed under 프로그래밍

더이상 apt-get 지원을 안하는 구버전의 경우는 apt-get을 사용할수가 없다.
아래와같이 해결하자

cd /etc/apt
cp sources.list sources.list.old
sed -i 's,http://.*ubuntu.com,http://old-releases.ubuntu.com,g' sources.list
sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sed -i 's,http://.*ftp.daum.net,http://old-releases.ubuntu.com,g' sources.list

apt-get update
apt-get install update-manager-core
do-release-upgrade


2015/04/22 12:51 2015/04/22 12:51
Posted
Filed under 프로그래밍
Get Users:
curl –i –X GET http://localhost/rest/api/users

Post (create new) User:
curl –i –X POST –d '{"name":"John Doe","email":"anemail@gmail.com","age":28}' http://localhost/rest/api/user

Put (update) User:
curl –i –X PUT –d '{"email":"jdoe@yahoo.com","age":38}' http://localhost/rest/api/user/8

Delete User:
curl –i –X DELETE http://localhost/rest/api/user/8
2015/03/24 12:32 2015/03/24 12:32
Posted
Filed under 프로그래밍/PHP
오호~ slimframework 이 좋아지고 있다.
언제부턴인가 싱글톤도 지원을 하네..ㅋㅋ

class TestTest {
 public function test() {
  echo "a";
 }
}
$app->container->singleton('test', function () {
 return new TestTest();
});
print_r($app->test->test());
exit;


편리하도다~

2015/03/24 11:29 2015/03/24 11:29
Posted
Filed under 프로그래밍
파일을 올리면 기본으로 700퍼미션이 들어간다.
외부에서 불러오지도 못하게 되는데 아래 내용을 수정또는 추가하도록 하자.

vsftpd.conf
local_umask = 022
file_open_mode = 0644 


2015/03/12 12:33 2015/03/12 12:33
Posted
Filed under 프로그래밍/PHP
php5 .5대를 사용하고 있는데도 json_decode에서 JSON_BIGINT_AS_STRING을 사용했는데 아래와 같은 오류가 나온다면?

option JSON_BIGINT_AS_STRING not implemented


설치해주자.

pecl install jsonc 

그럼 해결~

2015/03/05 12:09 2015/03/05 12:09