
Admin
Well-Known Member
Staff member
Administrator
Thường thì vbb 5 sẽ chạy trên nền php 5.3.x trở lên. Nhưng có một số nhà cung cấp hosting vẫn đang chạy php 5.2.x. Hôm nay mình sẽ hướng dẫn các bạn sửa đổi 1 tí để có thể cài đặt nó trên php 5.2.x.
1. Mở file core\install\includes\class_upgrade.php
và tìm đến dòng 930 :
Tùy thuộc vào php mà bạn đang dùng là version bao nhiêu.
2. Mở tiếp file core\libraries\log4php\src\test\php\appenders\LoggerAppenderMongoDBTest.php
Tìm dòng 145 :
3. Tương tự cho các file sau:
- core\libraries\log4php\src\test\php\LoggerThrowableInformationTest.php : dòng 57
- core\libraries\log4php\src\test\php\renderers\LoggerRendererExceptionTest.php : dòng 57
- core\vb\image\imagemagick.php : dòng 149
4. Các bạn chạy install bình thường: http://yourdomain.com/core/install/install.php
1. Mở file core\install\includes\class_upgrade.php
và tìm đến dòng 930 :
Sửa thànhif (version_compare(PHP_VERSION, '5.3.0', '<'))
if (version_compare(PHP_VERSION, '5.2.17', '<'))
Tùy thuộc vào php mà bạn đang dùng là version bao nhiêu.
2. Mở tiếp file core\libraries\log4php\src\test\php\appenders\LoggerAppenderMongoDBTest.php
Tìm dòng 145 :
Sửa thành:if (version_compare(PHP_VERSION, '5.3.0') < 0) {
if (version_compare(PHP_VERSION, '5.2.17') < 0) {
3. Tương tự cho các file sau:
- core\libraries\log4php\src\test\php\LoggerThrowableInformationTest.php : dòng 57
- core\libraries\log4php\src\test\php\renderers\LoggerRendererExceptionTest.php : dòng 57
- core\vb\image\imagemagick.php : dòng 149
4. Các bạn chạy install bình thường: http://yourdomain.com/core/install/install.php