Mysql 5가 PHP 5와 연동이 안됩니다

stargt의 이미지


http://blog.naver.com/jjeowl?Redirect=Log&logNo=40025454157

APM를 이 블로그 글을 참고하여 설치하였습니다.(php2apache2.dll을 php2apache2_2.dll로 바꿨어요)

OS : Win xp sp2

이름 (설치 방법)
-----------------------------------
Apache 2.2.4 (바이너리)
PHP 5.2.2 (파일복사(zip설치))
Mysql 5.1.18-beta (바이너리)

※ 디렉토리 오류는 절대 없습니다.

위의 블로그 순서대로 설치하였는데...

phpinfo를 보면 mysql이 없습니다...

당연히 테스트를 하면 Fatal error: Call to undefined function mysql_connect() in G:\Apache\htdocs\test.php on line 6

이런식으로 나오고요...

당연히 restart도 여러번해보고 G:\php5\ext에 dll도 다 정상적으로 있고 그런데...

왜 이러는 걸까요...

danskesb의 이미지

개인적으로 실험만 해 보실 거 같으면 RWAPM을 추천합니다.
http://kldp.net/projects/rwapm/
---- 절취선 ----
http://blog.peremen.name

7339989b62a014c4ce6e31b3540bc7b5f06455024f22753f6235c935e8e5의 이미지

php.ini를 열어서 mysql 익스텐션을 활성화 시켜야 합니다. 파일 내에서 mysql로 찾아보세요. (그리고 libmysql.dll인가를 system32이나 httpd.exe(apache.exe?)가 있는 디렉토리로 복사해야됩니다.

stargt의 이미지

당연히 활성화 시키고 복사도 해봤지만 안 됩니다...

#include <stdio.h>

int main()
{
while(1)
printf("0");
return 0;
}

stargt의 이미지

PHP Warning: PHP Startup: Unable to load dynamic library 'G:\\php5\\ext\\php_mysql.dll' - \xc1\xf6\xc1\xa4\xb5\xc8 \xb8\xf0\xb5\xe2\xc0\xbb \xc3\xa3\xc0\xbb \xbc\xf6 \xbe\xf8\xbd\xc0\xb4\xcf\xb4\xd9.\r\n in Unknown on line 0

아파치 에러 로그에서 위와 같은 메세지를 포착했는데... 어떻게 해석해야하죠; \\는 왜 중복되는지;; 쩝...

#include <stdio.h>

int main()
{
while(1)
printf("0");
return 0;
}

jachin의 이미지

\(역슬래시)가 중복되는 이유는 윈도우즈 디렉터리 구분 문자 때문입니다. 예외문자(Escaped Character)라서 그런 것이고요... G:\php5\ext\php_mysql.dll 파일을 불러올 수 없다는데, 뒤의 메시지가 'UTF-8' 인코딩 메시지인지... 에러 내용은 모르겠군요. mysql과 연동되지 않는 이유가 될 듯 싶습니다.
====
( - -)a 이제는 학생으로 가장한 백수가 아닌 진짜 백수가 되어야겠다.

Arcy의 이미지

>>> print '\xc1\xf6\xc1\xa4\xb5\xc8 \xb8\xf0\xb5\xe2\xc0\xbb \xc3\xa3\xc0\xbb \xbc\xf6 \xbe\xf8\xbd\xc0\xb4\xcf\xb4\xd9'.decode('cp949')
지정된 모듈을 찾을 수 없습니다

세이군의 이미지

Quote:

PHP Warning: PHP Startup: Unable to load dynamic library 'G:\\php5\\ext\\php_mysql.dll' - \xc1\xf6\xc1\xa4\xb5\xc8 \xb8\xf0\xb5\xe2\xc0\xbb \xc3\xa3\xc0\xbb \xbc\xf6 \xbe\xf8\xbd\xc0\xb4\xcf\xb4\xd9.\r\n in Unknown on line 0

번역 결과
Quote:

PHP Warning: PHP Startup: Unable to load dynamic library 'G:\\php5\\ext\\php_mysql.dll' - 지정된 모듈을 찾을 수 없습니다.\r\n in Unknown on line 0

해당 위치에 파일이 존재하는지를 먼저 확인해주세요.

한 걸음 더 가까이

stargt의 이미지

ㅡ_....

당연히 없을리가 없습니다; 디렉토리에 완벽히 파일이 존재합니다... 혹시 몰라서 복사해다가 아파치 bin하고 system32에도 넣어보고 했지만 안되네요;;

#include <stdio.h>

int main()
{
while(1)
printf("0");
return 0;
}

7339989b62a014c4ce6e31b3540bc7b5f06455024f22753f6235c935e8e5의 이미지

그렇다면 윈도우 + Pause 키를 눌러서 시스템 등록 정보 창을 띄운 후에, 고급 - 환경 변수에서 Path 변수에 PHP가 설치되어 있는 디렉토리를 추가해보세요.

stargt의 이미지

그건 제일먼저 한 작업입니다...

#include <stdio.h>

int main()
{
while(1)
printf("0");
return 0;
}

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.