socket 접속 테스트 소스
'리눅스 > PHP' 카테고리의 다른 글
php 설치시 만나는 각종에러 (0) | 2016.12.12 |
---|---|
php로 xinetd 데몬 만들기 (0) | 2015.01.16 |
ssh2 를 이용해 서버에 접속하기 (0) | 2015.01.16 |
ChartDirector for PHP 오류 (0) | 2015.01.16 |
PHP에서 SNMP 사용 (0) | 2015.01.16 |
php 설치시 만나는 각종에러 (0) | 2016.12.12 |
---|---|
php로 xinetd 데몬 만들기 (0) | 2015.01.16 |
ssh2 를 이용해 서버에 접속하기 (0) | 2015.01.16 |
ChartDirector for PHP 오류 (0) | 2015.01.16 |
PHP에서 SNMP 사용 (0) | 2015.01.16 |
<? if(!function_exists("ssh2_connect")) die("서버 연결 실패"); if (!($con = ssh2_connect("system.neulwon.com", 22))) { echo "서버 접속 불가"; } else { if (!($login = ssh2_auth_password($con, "root", "1q2w3e4r"))) { echo "서버 로그인 불가"; } else { if (!($cmd = ssh2_exec($con, "ls -al"))) { echo "명령어 실행 불가"; } else { echo "명령 실행 완료"; } } } ?> |
php로 xinetd 데몬 만들기 (0) | 2015.01.16 |
---|---|
socket 접속 테스트 소스 (0) | 2015.01.16 |
ChartDirector for PHP 오류 (0) | 2015.01.16 |
PHP에서 SNMP 사용 (0) | 2015.01.16 |
pdo_mysql 확장 모듈 설치 (0) | 2015.01.16 |
Trying to load "phpchartdir530.dll" from the PHP extension directory "/usr/lib/php5/20090626".
위 메세지와 유사한 오류메세지가 출력이 된다면..
1. ChartDirector 를 운영체제 bit 수와 맞는것으로 설치했는지 확인해보세요.
다운로드 URL : http://www.advsofteng.com/download.html
설치 안내 URL : http://www.advsofteng.com/doc/cdphpdoc/phpinstall.htm
2. 위 파일을 다운로드 후 압축을 풀고, ChartDirector/lib 디렉토리 내의 모든 파일을 복사해주어야 합니다.
socket 접속 테스트 소스 (0) | 2015.01.16 |
---|---|
ssh2 를 이용해 서버에 접속하기 (0) | 2015.01.16 |
PHP에서 SNMP 사용 (0) | 2015.01.16 |
pdo_mysql 확장 모듈 설치 (0) | 2015.01.16 |
php mssql 연동 소스 (0) | 2015.01.16 |
PHP 는 SNMP 관련 함수를 제공한다.
그러나 내장함수가 아니고 net-snmp 라이브러리를 이용하는 형식이므로,
몇가지 사전 작업이 필요하다.
1. net-snmp 를 yum 으로 설치한다.
2. php 를 컴파일 할때 --with-snmp 옵션을 추가한다.
< PHP 컴파일 옵션 >
# ./configure --with-snmp 를 추가한다.
3. 이제 PHP 에서 제공하는 함수를 이용해서 snmp 값을 가져오는지 확인한다.
$sysdescr = snmpget ("myhost", "public", "SNMPv2-MIB::sysDescr.0");
echo $sysdescr;
?>
[출처] http://seroot.com
ssh2 를 이용해 서버에 접속하기 (0) | 2015.01.16 |
---|---|
ChartDirector for PHP 오류 (0) | 2015.01.16 |
pdo_mysql 확장 모듈 설치 (0) | 2015.01.16 |
php mssql 연동 소스 (0) | 2015.01.16 |
mbstring 설치하기 (0) | 2015.01.16 |
# cd /usr/local/src/php-5.2.17/ext/pdo_mysql
# /usr/local/php/bin/phpize
# .
/configure
--with-php-config=
/usr/local/php/bin/php-config
--with-pdo-mysql=
/usr/local/mysql
# make
# make install
# vi /usr/local/apache/conf/php.ini
[PHP] 항목 내에 아래 내용 추가 extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20060613/" extension=pdo_mysql.so |
ChartDirector for PHP 오류 (0) | 2015.01.16 |
---|---|
PHP에서 SNMP 사용 (0) | 2015.01.16 |
php mssql 연동 소스 (0) | 2015.01.16 |
mbstring 설치하기 (0) | 2015.01.16 |
configure: error: Kerberos libraries not found. (0) | 2015.01.16 |
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<?
$mssql_host = 'HOST';
$mssql_user = 'ID';
$mssql_password = 'PASSWORD';
$mssql_db = 'DBNAME';
$conn = mssql_connect($mssql_host,$mssql_user,$mssql_password);
mssql_select_db($mssql_db, $conn);
$result1 = mssql_query("insert into testhan values('한글')");
$result = mssql_query("SELECT t1 FROM testhan");
while ($row = mssql_fetch_row($result)) {
echo $row[0]."<br>";
}
mssql_close($conn);
?>
[출처] BoyoYa Blog (http://blog.boyo.kr/entry/mssql-%EC%97%B0%EB%8F%99-%EC%86%8C%EC%8A%A4)
PHP에서 SNMP 사용 (0) | 2015.01.16 |
---|---|
pdo_mysql 확장 모듈 설치 (0) | 2015.01.16 |
mbstring 설치하기 (0) | 2015.01.16 |
configure: error: Kerberos libraries not found. (0) | 2015.01.16 |
URL file-access is desabled in the server configureation (0) | 2015.01.16 |
php source 디렉토리에 ext/mbstring으로 이동
# cd $PHP_HOME/ext/mbstring
php 홈디렉토리의 bin에 phpize 실행, phpize를 실행하면 configure 파일이 생성된다.
# $PHP_HOME/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-mbstring
# make
# make install
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20020429/
다음 구문을 php.ini에서 수정한다.
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20020429/"
그리고 다음 구문을 php.ini에 추가한다.
extension=mbstring.so
PS.
혹시 phpize시 perl: warning: Setting locale failed 라는 메세지 출력시에는 다음과 같이
locale 설정후에 다시 시도한다.
export LANG=en_US.UTF-8
export LANG=ko_KR.eucKR
[출처] 가츠형 (http://blog.naver.com/getpax/20057603602)
pdo_mysql 확장 모듈 설치 (0) | 2015.01.16 |
---|---|
php mssql 연동 소스 (0) | 2015.01.16 |
configure: error: Kerberos libraries not found. (0) | 2015.01.16 |
URL file-access is desabled in the server configureation (0) | 2015.01.16 |
configure: error: libjpeg.(a|so) not found (0) | 2015.01.16 |
configure: error: Kerberos libraries not found.
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
php configure 실행시 위와 같은 에러메세지가 출력된다면
아래와 같이 해당 패키지를 설치합니다.
# yum install krb5-devel
64bit 시스템의 경우 아래처럼 심볼릭 파일을 한개 더 만들어줘야 합니다.
# ln -s /usr/lib64 /usr/kerberos/lib
php mssql 연동 소스 (0) | 2015.01.16 |
---|---|
mbstring 설치하기 (0) | 2015.01.16 |
URL file-access is desabled in the server configureation (0) | 2015.01.16 |
configure: error: libjpeg.(a|so) not found (0) | 2015.01.16 |
soap 추가 설치 (0) | 2015.01.16 |
웹페이지에서 아래와 같은 오류메세지가 출력될 경우 php.ini 파일을 수정합니다.
에러 메세지 : URL file-access is desabled in the server configureation /home/sysdocu/public_html/head.php on line 3
php.ini 파일 수정
allow_url_fopen = On allow_url_include = On |
* 단 서버내 파일이 아니고 외부 http:// 로 입력된 URL의 파일을 로딩하는거라
보안상 취약한 부분이 될 수 있습니다.
mbstring 설치하기 (0) | 2015.01.16 |
---|---|
configure: error: Kerberos libraries not found. (0) | 2015.01.16 |
configure: error: libjpeg.(a|so) not found (0) | 2015.01.16 |
soap 추가 설치 (0) | 2015.01.16 |
php 에서 mysql 접속 테스트 소스 (0) | 2015.01.16 |
아래 처럼 libjpeg 관련 패키지를 설치하면 됩니다.
# yum install libjpeg-devel
위처럼 해도 해결이 되지 않을 경우 아래처럼 해주세요.
64비트 운영체제에서 해결이 됩니다.
# ln -s /usr/lib64/libjpeg.so /usr/lib/
# ln -s /usr/lib64/libpng.so /usr/lib/
configure: error: Kerberos libraries not found. (0) | 2015.01.16 |
---|---|
URL file-access is desabled in the server configureation (0) | 2015.01.16 |
soap 추가 설치 (0) | 2015.01.16 |
php 에서 mysql 접속 테스트 소스 (0) | 2015.01.16 |
PHP 가속프로그램 eaccelerator (0) | 2015.01.16 |
1. 설치
# cd /usr/local/src/php-5.2.9/ext/soap // php 소스 폴더의 ext/soap 디렉토리로 이동
# /usr/local/php/bin/phpize
# ./configure --enable-soap --with-php-config=/usr/local/php/bin/php-config
# make
# cp -arp modules/soap.so /usr/local/php/lib
2. 연동
php.ini 파일을 열어서 [soap] 항목에 아래와 같이 soap.so 파일을 추가해줍니다.
# vi /usr/local/apache/conf/php.ini
extension=/usr/local/php/lib/soap.so
그리고 아파치를 재시작 해주면 적용이 완료됩니다.
# /usr/local/apache/bin/apachectl restart
URL file-access is desabled in the server configureation (0) | 2015.01.16 |
---|---|
configure: error: libjpeg.(a|so) not found (0) | 2015.01.16 |
php 에서 mysql 접속 테스트 소스 (0) | 2015.01.16 |
PHP 가속프로그램 eaccelerator (0) | 2015.01.16 |
PHP 소스 암호화 (0) | 2015.01.16 |