Server-Side/Linux2010. 10. 15. 15:46
php 에서 mysqli extension을 잘 쓰고 있다가 mysql을 쓸 일이 생겨서 작업을 하다가

call to undefined function mysql_connect

이런 에러를 발견했다.

php와 mysql 사이의 연동이 안된거 같아서 검색해보니

# yum install php-mysql

이거 한방에 해결했다.

'Server-Side > Linux' 카테고리의 다른 글

linux mount  (0) 2010.12.01
how to check memory usage of memcached  (0) 2010.11.22
[CentOS] how to install memcached in 64bit centos  (0) 2010.10.11
[CentOS] php에서 memcache 설치하기  (0) 2010.10.11
[CentOS] php version update 5.1 to 5.2  (0) 2010.10.09
Posted by 준피
Server-Side/Linux2010. 10. 11. 18:00
# wget http://pecl.php.net/get/memcache-2.2.4.tgz
# tar xzfv memcache-2.2.4.tgz
# cd memcache-2.2.4
# phpize
# ./configure --enable-memcache
# make
# cp modules/*.* /usr/lib64/extensions/no-debug-non-zts-20060613/
# vi /usr/local/apache/conf/php.ini

extension=memcache.so

mongo 설치하는거때문에 신경 많이 쓰였는데 의외로 쉽게 설치가 되었군요.

Posted by 준피
Server-Side/Linux2010. 10. 9. 14:53
1. 현재 설치된 버전 확인
# rpm -qa |grep php
 php-common-5.1.6-15.el5.i386
 php-cli-5.1.6-15.el5.i386
 php-5.1.6-15.el5.i386
 php-pdo-5.1.6-15.el5.i386
 php-bcmath-5.1.6-15.el5.i386
 php-ldap-5.1.6-15.el5.i386
 php-devel-5.1.6-15.el5.i386
 php-gd-5.1.6-15.el5.i386
 php-xml-5.1.6-15.el5.i386
 php-mbstring-5.1.6-15.el5.i386
 php-mysql-5.1.6-15.el5.i386
 php-dba-5.1.6-15.el5.i386
2. update 하기 위해 파일 생성
# vi /etc/yum.repos.d/CentOS-Testing.repo
--------------------------------------------------------------------------
# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to
# functionality and stability. Packages in this repository will come and go during the
# development period, so it should not be left enabled or used on production systems without due
# consideration.
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*
--------------------------------------------------------------------------
3. 업데이트 하기
 # rpm -qa |grep php
 # yum update
 # service httpd restart


Posted by 준피
Server-Side/Linux2010. 10. 9. 14:17
CentOS 64bit, php-5.2.5에서 mysqli를 설치해봤다.
apm 설치할때 보니까 mysqli가 빠져있길래 추가로 설치를 해봤다.
예전에는 애좀 먹었는데 간만에 하니까 술술 잘되는구나

# cd /usr/local/src/apm/php-5.2.5/ext/mysqli
# phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config
# make

# mkdir -p /usr/lib64/extension/no-debug-non-zts-20060613
# cp modules/*.* /usr/lib64/extension/no-debug-non-zts-20060613/
# vi /usr/local/apache/conf/php.ini

extension_dir = "/usr/lib64/extensions/no-debug-non-zts-20060613/"
.
.
.
extension=mysqli.so

# /etc/init.d/http restart


'Server-Side > Linux' 카테고리의 다른 글

[CentOS] php에서 memcache 설치하기  (0) 2010.10.11
[CentOS] php version update 5.1 to 5.2  (0) 2010.10.09
[CentOS] 아파치 2개 이상 설치한 경우 해결책  (0) 2010.09.20
netstat 사용법  (0) 2010.09.20
서버 상태 확인  (0) 2010.08.28
Posted by 준피
Server-Side/Linux2010. 9. 20. 19:04
(98) address already in use make_sock could not bind to address 80

아파치를 중복 설치 했을 때 이런 에러가 나기도 한다.

이런 경우 원상복구를 하기 위해서 다음과 같은 조치를 해주자.

# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

소스 디렉토리의 apachectl을 httpd로 파일명을 변경해서 복사하면 된다.

'Server-Side > Linux' 카테고리의 다른 글

[CentOS] php version update 5.1 to 5.2  (0) 2010.10.09
[CentOS] mysqli 설치  (0) 2010.10.09
netstat 사용법  (0) 2010.09.20
서버 상태 확인  (0) 2010.08.28
[CentOS] apache tomcat mod_jk 이용해서 연동하기  (0) 2010.08.27
Posted by 준피