php 5와 mysql 5 연동 불가능
일단 아파치 에러로그 입니다(표시 된 부분이 문제가 되는 부분)
[Sat May 26 10:04:09 2007] [notice] Child 3172: Child process is running
[Sat May 26 10:04:10 2007] [notice] Child 3776: Released the start mutex
[Sat May 26 10:04:10 2007] [notice] Child 3172: Acquired the start mutex.
[Sat May 26 10:04:10 2007] [notice] Child 3172: Starting 250 worker threads.
[Sat May 26 10:04:11 2007] [notice] Child 3776: Waiting for 250 worker threads to exit.
[Sat May 26 10:04:11 2007] [notice] Child 3776: All worker threads have exited.
[Sat May 26 10:04:11 2007] [notice] Child 3776: Child process is exiting
[Sat May 26 10:04:11 2007] [notice] Child 3172: Starting thread to listen on port 80.
[Sat May 26 10:04:24 2007] [notice] Parent: Received restart signal -- Restarting the server.
[Sat May 26 10:04:24 2007] [notice] Child 3172: Exit event signaled. Child process is ending.
[Sat May 26 10:04:24 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.2 configured -- resuming normal operations
[Sat May 26 10:04:24 2007] [notice] Server built: Jan 9 2007 23:17:20
[Sat May 26 10:04:24 2007] [notice] Parent: Created child process 3292
PHP Warning: PHP Startup: Unable to load dynamic library 'G:\\php\\ext\\php_mysql.dll' - \xc0\xdf\xb8\xf8\xb5\xc8 \xb8\xde\xb8\xf0\xb8\xae \xc0\xa7\xc4\xa1\xb8\xa6 \xbe\xd7\xbc\xbc\xbd\xba\xc7\xcf\xb7\xc1\xb0\xed \xc7\xdf\xbd\xc0\xb4\xcf\xb4\xd9.\r\n in Unknown on line 0
[Sat May 26 10:04:24 2007] [notice] Child 3292: Child process is running
[Sat May 26 10:04:25 2007] [notice] Child 3172: Released the start mutex
[Sat May 26 10:04:25 2007] [notice] Child 3292: Acquired the start mutex.
[Sat May 26 10:04:25 2007] [notice] Child 3292: Starting 250 worker threads.
[Sat May 26 10:04:25 2007] [notice] Child 3292: Starting thread to listen on port 80.
[Sat May 26 10:04:26 2007] [notice] Child 3172: Waiting for 250 worker threads to exit.
[Sat May 26 10:04:26 2007] [notice] Child 3172: All worker threads have exited.
[Sat May 26 10:04:26 2007] [notice] Child 3172: Child process is exiting
보시면 아시겠지만 mysql dll을 읽어들이는데 문제가 발생합니다.
그리고 phpinfo에서도 mysql이 안 나타나요...
php 설정에 extension_dir = "G:\php\ext"를 해주고 php_mysql.dll 익스텐션 앞에 ; 빼줬는데도 그러네요
(이상한 점은 같이 빼준 php_gd2.dll은 오류 안 나고 phpinfo에서도 제대로 표시됩니다.)
mysql-apache-php 순서대로도 깔아보고 mysql-php-apache, apache-php-mysql 순서대로 설치해봐도 그럽니다.
php5ts를 system32 폴더에 넣어줬고, 당연히 ext 폴더에는 모든 dll이 존재하는 등 기본 설정을 완벽히 해준 것 같은데도 이러군요... 뭐죠;;
p.s.
Apache : 2.2.x
MySQL : 5.0.x
PHP : 5.2.x
환경변수는 모두 추가하였습니다.
php 폴더에 있는 libmysql.dll 이라는 파일 있을 겁니다.. 맞는지 모르지만.
php 폴더에 있는 하여튼 php.exe 파일과 같이 있는 *mysql.* 관련 파일들이 있을 겁니다..
제 기억으로는 libmysql.lib 혹은 libmysql.dll 파일 같은데.. 이 파일을 system32 혹은 system 폴더에 복사보십시오..
만일.. 덮여 씌우라는 메시지가 나오면 일단, 취소하셨다가.. 해당 파일을 혹시 모를 만일의 사태(?)에 대비하기 위해서 미리 백업해두시고요..
그리고, 다시 재시작하거나 아파치 재기동하시면 될 겁니다.. 언제부터인가.. mysql 설치하고, mysql 모듈 활성화 시켜도 mysql 이 PHP 와 연동이 되지 않은 것 같더군요.. 그래서 PHP에서는 PHP 폴더에 있는 libmysql 파일을 별도로 만들어서 배포하는 듯 싶네요.. 아마 GPL 문제로 .. 그런 것 같습니다..
윈도우 xp sp2 에서 php 하시는 것 보다 우분투 리눅스에서 해보세요.. 조금만 노력하면 쉽게 설치할 수 있고, 오히려 윈도우보다 더 쉽습니다.. 더욱 좋은 것은 최신 버전은 알아서 자동 업데이트 됩니다.. 윈도우는 일일히 지우고 다시 해야 하지만.. 리눅스에서 배우시는 것이 더욱 확실하고 더 좋죠.. 요새 리눅스 진짜 좋습니다.. 저는 우분투 3달 쟁이 입니다.. 지금은 우분투 베릴 환경에서 PHP 학습하고 있지요.. 이따끔 베릴 가지고 놀면서.. ㅋㅋㅋㅋ 잠시 머리(?)에도 휴식기도 주고요..ㅋㅋㅋ
============================================
이제는 미드로 영어 공부를.. 리눅스는 우분투로..
http://movieinfo.blogi.kr
우와!! 사랑해요
우와!! 사랑해요 ♡
그 문제였군요 ㅠㅠ GPL 때문이라....정말 감사드립니다!
P.S. 멀티부팅하던 우분투 그저께 지우고; 윈도우에서 좀 실험할게 있어서 이러고 있습니다 ㅋㅋ
#include <stdio.h>
int main()
{
while(1)
printf("0");
return 0;
}
댓글 달기