반응형

전체 글 162

[PHP][암호화] AES 128bit 암호화(CBC)

* 인터넷에서 떠돌아 다니는 소스들 도움을 많이 받았습니다. * 다음과 같이 사용하시면 됩니다. mcrypt_module 설치가 되어야 함 yum install php-mcrypt 로 설치 ------------------------------------------------------------------------------------------------------- * 대칭키 AES256 = C# + Objective C(ios) + PHP + JAVA(Android) + Perl + Javascript http://www.imcore.net/encrypt-decrypt-aes256-c-objective-ios-iphone-ipad-php-java-android-perl-javascript/

PHP 2015.04.07

Ajax 통신 중 Loading bar 구현 (ajaxStart, ajaxStop 이벤트)

// loading bar 태그 // iframe 위에 로딩 바 이미지를 얹혀 띄우는 방식 // document onload function !! $(document).ready(function(){ // 페에지 로딩 즉시 로딩바 태그 활성화 var divLoading = document.all.hiddenDivLoading; divLoading.style.visibility = "visible"; // ajax 통신 중 로딩 바 // 현재 페이지에서 ajax 통신이 시작될 경우 실행될 이벤트 $(document).ajaxStart(function() { // 로딩 바 이미지를 띄우고 $('#load').show(); // 화면의 중앙에 위치하도록 top, left 조정 (화면에 따라 조정 필요) $("..

jQuery 2014.02.28

mail() 함수가 오류없이 작동하지 않을 경우(sendmail 설정확인)

[php] mail() 함수가 오류없이 작동하지 않을 경우(sendmail 설정확인) php 여러가지 원인이 있겠지만리눅스에 서툰 내가 3,4시간 삽질하면서 이것저것 웹서핑이나 책을 찾아보면서queue 디렉토리를 보니 메일이 엄청나게 쌓여있더라는..거두절미하고;; /etc/mail/local-host-names 에 도메인을 등록이 되어 있는지 확인 후 등록되지 않았다면 도메인을 등록 후 sendmail 재시작 /etc/init.d/sendmail restart 재시작 /var/spool/mqueu/ 에 쌓여있던 메일이 전부 전송되었다~ 알면 간단한 부분인데 모르면 개고생 ㅠㅠ

PHP 2014.02.04

Linux 환경의 PHP MSSQL 연동

● Linux 환경의 PHP에서 Windows의 MSSQL과 연동해야하는 이슈가 있었음. ● 테스트 환경 - Linux OS : CentOS 6.4 64bit - Windows OS : Windows 2008 R2 - Mssql 2008 R2 ● 패키지 설치 - rpm -ivh http://ftp.neowiz.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm - yum install php-mssql freetds - 끝. 정말 쉽다. ● SELinux 작업 (*중요) - 이작업을 진행해야 나중에 실제적으로 웹화면에 php로 작성된걸 뿌릴수있다. - /etc/sysconfig/selinux에서 enforcing (ON) 시켜준다. - 자세한 내용은 다음 링크 ..

서버 Server 2013.12.05

PHP Warning: mysql_connect(): Can’t connect to MySQL server on… (13)

방화벽 세팅까지 모두 풀어준 상태로 php에서 mysql 외부 접속이 안됨 ㅠㅠ localhost는 된다 젠장 터미널에서 mysql -u testuser -p -h mysql.host.com testdb 접속시 된다 ㅠㅠ 댄장 뭘 잘못했단말인가 이것 저것 찾아봤다... had exactly the same problem. Found this website: http://www.beginlinux.com/server_training/web-server/976-apache-and-selinux I issued “setsebool -P httpd_can_network_connect 1″ as root and httpd was able to connect to mysql 친절한 외쿡인이 저리 써놓았다.. htt..

mysql 2013.10.06

리눅스 서버 시간 설정

[리눅스] 서버 시간 설정하기 : 카페24 서버호스팅 Guide 1. date 명령어를 통한 시간 설정 - date 명령어는 현재 시간을 원하는 포맷으로 보여 주는 명령어이며, 시간을 설정 하는 것도 가능하다. 아무런 옵션 없이 date 명령만 입력하면 현재 서버의 시간을 보여주며, 옵션에 따라 여러가지 형태의 포맷으로 출력이 가능하다. [root@localhost ~]# date Thu Jan 24 13:05:55 KST 2013 - date 명령뒤에 시간을 입력하여 서버의 시간을 설정 할 수 있으며, 시간을 입력할 때는 두자리 단위의 숫자로 "월일시분년" 순서로 입력하면 된다. 아래와 같이 맨마지막을 "년"은 생략 가능하다. [root@localhost ~]# date 0122000112 Sun Ja..

서버 Server 2013.10.04

[PHP] MSSQL 패키지 사용시 에러 - Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16)

Error Message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16) 1. /etc/php.ini에 mssql.charset = "UTF-8" 첨가 2. /etc/freetds.conf 에서 [global] ;tds version = 4.2 tds version=8.0 client charset = UTF-8 3. select * 의 사용을 줄이고 되도록이면 Select Cast(FIELD as text) as FIELD from...식으로 해준다.

mssql 2013.10.02

Fatal error: Allowed memory size of 41943040 bytes exhausted 에러시

워드프레스에서 Fatal error: Allowed memory size of 41943040 bytes exhausted 이런 에러가 발생시 Solutions: 1) It may be possible to raise your memory limit, as in the thread that mbrsolution links to - add this to your wp-config.php file: define('WP_MEMORY_LIMIT', '64M'); 2) You could ask your web hosting company to either raise the limit, or justify it. There's really no justification for it though - as I say,..

wordpress 2013.09.24

리눅스에서 apm설치

리눅스에서 apm설치 해보자 root 접속해서 아파치를 설치해보자 명령어는 다음과 같다 yum -y install httpd 다음으로 mysql을 설치해보자 yum -y install mysql 다음으로 php를 철치하여 apm을 완성해보자 yum -y install php 다음은 라이브러리 설치 명령어이다 설치해보자 yum -y install gd gd-devel yum -y install libpng libpng-devel yum -y install libjpeg libjpeg-devel yum -y install freetype freetype-devel yum -y install frontconfig frontconfig-devel yum -y install libxml12 libxml12-dev..

서버 Server 2013.09.05

#1194 - Table is marked as crashed and should be repaired

select * from baptinfo; 했을 때 아래와 같은 테이블 손상메세지가 나타난다면 #1194 - Table 'baptinfo' is marked as crashed and should be repaired # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 30183 Server version: 5.0.37-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> mysql> use realDB; Database change..

mysql 2013.09.02

‘워드프레스는 만능인가?’ 씨넷코리아 도입기

* 본 글은 2013년 8월 15일 씨넷코리아에 기고한 칼럼입니다. 씨넷코리아 창간 기획을 진행하면서 핵심 화두는 ‘워드프레스(WordPress)’였습니다. 워드프레스로 언론사 뉴스 사이트를 어떻게 만들 것인가?라는 것이 고민의 출발점이자 목표였죠. 씨넷코리아 창간이 무사히 마무리된 지금 그간의 경험과 결과의 일부를 공유하고자 합니다. 워드프레스 활용에 있어 참고가 될 수 있기를 바랍니다. 워드프레스를 기반으로 구축한 씨넷코리아(www.cnet.co.kr) 결론부터 밝히자면, 씨넷코리아는 워드프레스 기반으로 만들어졌다. 이는 워드프레스가 근간이 됐지만 100% 워드프레스로 만들어지지는 않았다는 뜻이다. 기사 편집기(CMS) 부분만 워드프레스를 활용했으며 웹사이트 자체는 별도로 구축했다. 좋게 말하면 하이..

wordpress 2013.08.26
반응형