Category Archives: WAS

Home »  WAS

php pear 관련

 출처 : http://inderpreetsingh.com/2011/02/10/fix-pearmail-due-to-centos-repos-using-old-pear/
Fix Pear/Mail due to CentOS/RHEL repos using old pear
February 10, 2011 by Inder

I couldn’t install the Mail PEAR package because the pear version shipped with the current CentOS/RHEL is 1.4.9, whereas the required version is 1.5.6 or above. The following is the error that you may see.

1
2
3
4
5
6
7

# pear install Mail
WARNING: channel “pear.php.net” has updated its protocols, use “channel-update pear.php.net” to update
Did not download optional dependencies: pear/Net_SMTP, use –alldeps to download automatically
pear/Mail requires PEAR Installer (version >= 1.5.6), installed version is 1.4.9
pear/Mail can optionally use package “pear/Net_SMTP” (version >= 1.4.1)
No valid packages found
install failed

There are three problems above:

WARNING: channel “pear.php.net” has updated its protocols, use “channel-update pear.php.net” to update
Did not download optional dependencies: pear/Net_SMTP, use –alldeps to download automatically
Main problem: pear/Mail requires PEAR Installer (version >= 1.5.6), installed version is 1.4.9

To fix problem #1 (update channel pear.php.net):

1
2
3

# pear channel-update pear.php.net
Retrieving channel.xml from remote server
Update of Channel “pear.php.net” succeeded

To fix problem #2 (Net_SMTP […]

mkdir() in php is setting folder permission to 755 But I Need 777?

http://stackoverflow.com/questions/4134702/mkdir-in-php-is-setting-folder-permission-to-755-but-i-need-777

php 동적 모듈추가 ssh2

yum install libssh2 libssh2-devel
wget http://pecl.php.net/get/ssh2-0.11.3.tgz
tar zxvf ssh2-0.11.3.tgz
cd ssh2-0.11.3
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config –with-ssh2=/usr/lib64 ( 32bit는 뒤에 옵션제외 )
make
make install
/usr/local/php/lib/php/extensions/no-debug-zts-20090626/

windows php 추가 모듈설치

설치에 따라다르겠지만 C:\Program Files (x86)\PHP\v5.4\ext 여기여기가면 dll파일들이있다 .
리눅스로 치면 so파일정도로 생각하시면될듯
php.ini에서 리눅스와 동일하게 해당 모듈 올린후 extension 해주면 된다!
 
예를들어 com 모듈 추가설치시
 
[COM]
com.allow_dcom = true // 해주시공
extension=php_com_dotnet.dll // 해주시면되겠다.
물론 extension_dir 위치에 해당 dll파일이 존재해야된다
 
-> 여담으로 com사용시
register_globals = Off 해주시기바란다

node.js

note.js 설치
1) 소스파일
http://nodejs.org/download/
wget http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
2) 설치전 사전 페키지 설치
yum install python*
2-1) python 2.7 설치
> nodejs make 시 에러 발생 python 2.6 이상필요
http://www.python.org/download/
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
./configure
make
make install
3) 설치
어디설치된지 모른게 –prefix=/usr/local/nodejs 잡아줍시당 -0-
tar zxvf node-v0.10.13.tar.gz
cd node-v0.10.13
./configure –prefix=/usr/local/nodejs
make
make install
4) npm 사용하여 모듈추가!
– global 설치!
/usr/local/nodejs/bin/npm install -g express
express@3.3.4 /usr/local/nodejs/lib/node_modules/express
?쒋??€ methods@0.0.1
?쒋??€ fresh@0.1.0
?쒋??€ cookie-signature@1.0.1
?쒋??€ range-parser@0.0.4
?쒋??€ buffer-crc32@0.2.1
?쒋??€ mkdirp@0.3.5
?쒋??€ cookie@0.1.0
?쒋??€ debug@0.7.2
?쒋??€ send@0.1.3 (mime@1.2.9)
?쒋??€ commander@1.2.0 (keypress@0.1.0)
?붴??€ connect@2.8.4 (uid2@0.0.2, pause@0.0.1, qs@0.6.5, bytes@0.2.0, formidable@1.0.14)
/usr/local/nodejs/bin/npm install -g socket.io
> ws@0.4.27 install /usr/local/nodejs/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/usr/local/nodejs/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build’
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/usr/local/nodejs/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build’
socket.io@0.9.16 /usr/local/nodejs/lib/node_modules/socket.io
?쒋??€ base64id@0.1.0
?쒋??€ policyfile@0.0.4
?쒋??€ redis@0.7.3
?붴??€ socket.io-client@0.9.16 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obfuscator@0.0.1, ws@0.4.27)
이런식으로 완료된 프롬프트를 볼수있다
자자 개발자분들 이제 쓰세요~
make까지 잘 됐는데 make install에서
python tools/install.py install
File “tools/install.py”, line 219
cmd = args[1] if len(args) > 1 else ‘install’
에러가 발생할 수 있다(필자는 발생했다)
이럴땐 파이선 버전이 2.6 이상이라면
# sudo python tools/install.py install
[출처] [CentOS] node.js 설치하기|작성자 제노하트
http://nodejs-kr.org/insidejs/archives/704 조흔싸이트

php libmysqlclient.so.18 error

/usr/local/src/nginx/php-5.2.17/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
make[1]: *** [install-pear-installer] 오류 127
make: *** [install-pear] 오류 2
 
locate libmysqlclient.so.18  // 모듈 위치확인
/usr/local/mysql/lib/libmysqlclient.so.18  // 이런경로에 나오면!!
 
vi /etc/ld.so.conf
/usr/local/mysql/lib 추가
ldconfig
 
 

php 동적모듈추가

소스설치시 소스디렉토리이동
 
/php-5.2.17/ext/soap
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make
 
/usr/local/apache/conf/php.ini 여기에서 extension_dir= 경로로 .so 파일을 복사
 
 
extension=”모듈이름”
 
에효..

zend_exception_get_defaul erro..

맨붕당하지말자 -0-;
 
/usr/local/src/imagick-3.0.1/imagick.c:2607: error: too many arguments to function ‘zend_exception_get_default’
/usr/local/src/imagick-3.0.1/imagick.c:2614: error: too many arguments to function ‘zend_exception_get_default’
/usr/local/src/imagick-3.0.1/imagick.c:2621: error: too many arguments to function ‘zend_exception_get_default’
/usr/local/src/imagick-3.0.1/imagick.c:2628: error: too many arguments to function ‘zend_exception_get_default’
 
 
vi imagick.c
// php_imagickdraw_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
php_imagickdraw_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);

ImageMagick

ImageMagick
필수페키지..
yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.8.5-6.tar.gz << 여기는 소스이긴하나..
그냥 아래 페키지들 yum으로 설치!
ImageMagick-devel-6.2.8.0-15.el5_8
ImageMagick-6.2.8.0-15.el5_8
ImageMagick-6.2.8.0-15.el5_8
ImageMagick-c++-6.2.8.0-15.el5_8
ImageMagick-devel-6.2.8.0-15.el5_8
ImageMagick-c++-devel-6.2.8.0-15.el5_8
 
 
2013-09-13 추가네용
 
http://pecl.php.net/package/imagick   // 최신페키지 다운로드
> 압축풀고 디렉토리이동후
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make && make install
> 경로확인
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20050922/
Installing header files: /usr/local/php/include/php/
> php.ini 설정
extension_dir = “/usr/local/php/lib/php/extensions/no-debug-zts-20050922/”
extension=”imagick.so”
enable_dl = On
수고용
 

extension_dir=

php.ini 파일에서 extension_dir= 구문의 경로가 들어가있으면,,
순차적실행이아닌 전체 적용되는거라서,, 모듈들이 그경로에 다들어가있는지확인!!