Discuz Thai

 ลืมรหัสผ่าน
 สมัครสมาชิก

ข้อตกลงการใช้งานกระดานข่าวดิสคัสไทย DiscuzThai Agreement (English Version) ประกาศดิสคัสไทย - ทำเนียบดิสคัสภาษาไทย

Discuz! X3.5 Thai R20231001 Rev.8 (NEW) [วิดีโอช่วยสอน] อัปเกรด Discuz! X3.4 เป็น X3.5 Discord ของ Discuz! Thai Community อย่างเป็นทางการ

Discuz! X3.4 Thai R20220811 (REV.75) สิ้นสุดการสนับสนุน Discuz! X3.4 ภาษาไทยตั้งแต่วันนี้เป็นต้นไป (ขอแนะนำให้อัปเกรดเป็น X3.5 แทน)

ค้นหา
แท็กยอดนิยม: ดิสคัสภาษาไทย Discuz Thai
ดู: 1488|ตอบกลับ: 3

[แก้ไขแล้ว] ฐานข้อมูลไม่ซัพพอร์ท php 5.3,5.4 ครับแก้อย่างไรดี

[คัดลอกลิงก์]
bomlovesom โพสต์ 2015-11-8 08:29:26 |โหมดอ่าน
ปัญหาจากกระทู็นี้ มีปัญหาอยู่ดีๆ เพิ่มหมวดหมู่ใหม่,เพิ่มบอร์ดใหม่,เพิ่มบอร์ดย่อย ไม่ได้ครับ

ตอนนี้เจอสาเหตุแล้ว คือ ไม่ซัพพอร์ท php 5.3 อาการจะเป็นแบบกระทู้ข้างต้น คือกดสร้างฟอรั่มแล้วฟอรั่มไม่ขึ้น

ส่วน php 5.4 จะขึ้น Error ข้อความด้านล่าง ไม่สามารถสร้างบอร์ดได้เช่นกัน
Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
แต่พอดีโฮสที่ผมเช่าอยู่ซัพพอร์ทแค่ 5.3

จากนั้นก็เลือก php 5.2 ก็สามารถสร้างฟอรั่มได้ ใช้งานได้ปรกติ

ตัวไฟล์บอร์ดของ Discuz ไม่ได้มีปัญหาครับ เพราะลองติดตั้งใหม่ php 5.2 , 5.3 , 5.4 สามารถใช้งานได้ปรกติหมด แต่พอ import ฐานข้อมูลของตัวเองเข้าไปอาการสร้างฟอรั่มไม่ได้ออกเลยครับ แต่เป็นกับ php 5.3 และ 5.4

ตอนนี้ทีคิดไว้
1. import ทีล่ะฐานข้อมูล หาว่าอันไหน มีปัญหา
2. หักดิบสร้างบอร์ดใหม่มันในฐานข้อมูลนั่นแหละ
3. แจ้งดาวเกรด php เป็น 5.2 กับโฮส


ไม่อยากไปยุ่งฐานข้อมูลเลย หรือถ้าจำเป็นต้องยุ่งก็อยากให้มันเจาะจง หว่านแหหากลัวจะพังซะก่อนครับ
ดาวเกรด php เห็นว่า 5.2 มีช่องโหว่ ไม่ซัพพอร์ทแล้ว

ใครพอนึกวิธีอื่นออกบ้างรบกวนแนะนำด้วยครับ
 เจ้าของ| bomlovesom โพสต์ 2015-11-8 11:24:16
แก้ได้แล้วนะครับ สรุป php 5.2 ใช้ได้ปรกติ php5.3 ไม่แจ้ง Error เลยไม่รุ้ว่าเป็นอะไร พอมาดู 5.4 Error ที่ขึ้นด้านบน
เลยไปหา ใน Google ได้วิธีตามนี้

Then I found out that there is a PHP setting “max_input_vars” (available since PHP 5.3.9) which limits the number of variables that PHP will process. If this value is 1000 (default is 1000) PHP will process first 1000 variables and drop the remaining. This was the reason why some menu items were saved and some not.

To solve this issue we need to increase the “max_input_vars” to a bigger number. I changed it to 2000 and it solved my problem. You might need less or more depending on your requirements.

How can we change this value? There are 2 ways. Either by changing the variable in .htaccess file or php.ini file. I will show how to change it using both the methods.

1. Change max_input_vars using .htaccess file.
If you want to change the “max_input_vars” using .htaccess file then add the following code in you .htaccess file.
1
       
php_value max_input_vars 2000

2. Change max_input_vars using php.ini file
Note: If you make any error in your php.ini file you site may not function properly. So make sure you know how to change it, else have someone who can do this change.

Edit your php.ini file and search for “max_input_vars“. this might look something similar to following:
1
       
; max_input_vars = 1000

The above line is commented, that means it will take PHP’s default value which is 1000. To change it to 2000 change that line to be:
1
       
max_input_vars = 2000

After this change you will have to restart your apache.

ถ้าหากว่าใส่ 2000 แล้วยังขึ้นอยู่ก็ให้เพิ่มเป็น 3000

คะแนน

จำนวนผู้เข้าร่วม 1จิตพิศัย +10 Money +10 Gold +10 ย่อ เหตุผล
jaideejung007 + 10 + 10 + 10 ถูกใจ

ดูบันทึกคะแนน

 เจ้าของ| bomlovesom โพสต์ 2015-11-8 11:26:22
แจ่มถามเอง ตอบเอง แก้เอง 5555+
submark โพสต์ 2015-11-8 14:05:36
เป็นแบบนี้แหละครับ ถ้าจะรอคำตอบคงนาน เลยแก้เองไปพลางฟ พอได้ลองแก้เอง มันก็ได้ขึ้นมาซะงั้น
แล้วก็จะมาตอบไว้แบบนี้ เผื่อคนที่เจอปัญหาทีหลังเขาจะได้แก้ถูก
//ผมก็เคยเป็นช่วงแรกๆ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

รายชื่อผู้กระทำผิด|Archiver|ดิสคัส ไทย Follow us: Become a fan on facebook. Follow us on Twitter.

GMT+7, 2024-4-28 12:27

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้