แก้ปัญหา undefined reference to SSLv2_server_method ของ PHP 5.2 บน Debian และ Ubuntu เขียนเมื่อ 2013.05.21 โดย

เมื่อ compile PHP 5.2 บน Debian / Ubuntu ถ้าพบ
ext/openssl/.libs/xp_ssl.o: In function 'php_openssl_setup_crypto':
ext/openssl/xp_ssl.c:357: undefined reference to 'SSLv2_server_method'
ext/openssl/xp_ssl.c:337: undefined reference to 'SSLv2_client_method' 

ให้ทำการ download patch ที่ https://bugs.php.net/patch-display.php?bug_id=54736&patch=debian_patches_disable_SSLv2_for_openssl_1_0_0.patch&revision=latest เอาไปไว้ใน directory เดียวกับ PHP ที่แตกไฟล์ไว้

wget -o debian_patches_disable_SSLv2_for_openssl_1_0_0.patch "https://bugs.php.net/patch-display.php?bug_id=54736&patch=debian_patches_disable_SSLv2_for_openssl_1_0_0.patch&revision=1305414559&download=1"

สั่งติดตั้ง patch source
patch -p1 < debian_patches_disable_SSLv2_for_openssl_1_0_0.patch

จะได้
patching file ext/openssl/xp_ssl.c
Hunk #1 succeeded at 332 (offset 4 lines).
Hunk #2 succeeded at 354 (offset 4 lines).
Hunk #3 succeeded at 583 (offset -50 lines).
Hunk #4 succeeded at 819 (offset -98 lines).

จากนั้นก็ configure และ make ตามปกติ



คำเตือนคำเตือน เนื้อหาต่างๆ ในบทความ รวมถึงรูปภาพทั้งหมดในบทความนี้ เป็นความเห็นส่วนตัวของผู้เขียนแต่ละคน ซึ่งแต่ละคนได้ทำการลงทะเบียน และเขียนบทความลงใน Modoeye Articles นี้โดยไม่มีค่าธรรมเนียมใดๆ บทความเหล่านี้เป้าหมายเพื่อการศึกษา และความบันเทิงเท่านั้น การนำส่วนหนึ่งส่วนใดของบทความไปใช้งาน ควรทำการอ้างอิงถึงผู้เขียนและแหล่งที่มาด้วย