Unable to install php5.6

hxt57

New member
Joined
Nov 18, 2023
Messages
5
Hello,
I have installed multiple php on the server running DirectAdmin. But I got an error when installing php5.6.
Log displays as follows:
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp: In function 'int intl_stringFromChar(icu_66::UnicodeString&, char*, int32_t, UErrorCode*)':
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp:35:2: error: 'UChar' was not declared in this scope
UChar *utf16 = ret.getBuffer(capacity);
^
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp:35:9: error: 'utf16' was not declared in this scope
UChar *utf16 = ret.getBuffer(capacity);
^
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp:35:21: error: 'class icu_66::UnicodeString' has no member named 'getBuffer'
UChar *utf16 = ret.getBuffer(capacity);
^
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp:40:9: error: 'u_strFromUTF8WithSub_66' was not declared in this scope
status);
^
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp: In function 'int intl_charFromString(const icu_66::UnicodeString&, char**, int*, UErrorCode*)':
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp:74:8: error: 'UChar' does not name a type
const UChar *utf16buf = from.getBuffer();
^
/usr/local/directadmin/custombuild/tmp/tmp.2owsYaOBHt.php-5.6.40.tar.gz/ext/intl/intl_convertcpp.cpp:76:54: error: 'utf16buf' was not declared in this scope
u_strToUTF8WithSub(*res, capacity - 1, &actual_len, utf16buf, from.length(),
^
make: *** [ext/intl/intl_convertcpp.lo] Error 1
make: *** Waiting for unfinished jobs....
*** The make has failed. Exiting...

I installed according to the following instructions:
cd /usr/local/directadmin/custombuild
./build update
./build set php1_release 7.4
./build set php2_release 7.3
./build set php3_release 7.2
./build set php4_release 5.6
cd /usr/local/directadmin/custombuild
./build php n

2023-11-18_17-35-46.jpg


My server information:
CentOS Linux release 7.9.2009 (Core)
DirectAdmin v.1.656
Custombuild 2.0.0

Please help me reinstall php5.6. Thanks.
 
I have the same problem.
V 1.656 removed old php 5.x support completely.
I have encountered the Exim error during upgrade and I followed this advice, https://forum.directadmin.com/threads/exim-fails-to-build.69472/
After removing 'libiconv' , many services went down, including PHP x.x

When sending command, 'da build all', services gradually started up, except PHP 5.6 and PHP 7.2 .
Things begin to go crazy with this v.1.656 when I found that this NOTE on https://docs.directadmin.com/changelog/version-1.656.html :

Note:

Library libiconv is a special exception. There is no system library for libiconv because all its functionality is embedded in the modern libc library. This means that any library or binary linked against libiconv needs to be rebuilt to remove the no longer necessary link against external library and start relying on the built-in functionality.

After local version of libiconv is removed from /usr/local all CustomBuild managed software needs to be rebuilt using command da build all.

Now randomly trying to re-install PHP 5.6 but failed to work with all advices on the web. I have to halt all updates of DirectAdmin from now until the problem has been solved. I am waiting for a solution from somebody who might be able to help too.
 

Attachments

  • ภาพถ่ายหน้าจอ 2566-11-19 เวลา 09.57.34.png
    ภาพถ่ายหน้าจอ 2566-11-19 เวลา 09.57.34.png
    136.2 KB · Views: 119
V 1.656 removed old php 5.x support completely.
That's not what I'm reading.

CustomBuild will no longer support building old PHP versions:
  • PHP version 5.3 - no new releases since 2014-08-14
  • PHP version 5.4 - no new releases since 2015-09-03
  • PHP version 5.5 - no new releases since 2016-07-21
I don't see php 5.6 between them, so that still should work. You might want to send in a ticket as this might be considered a bug. Or they have to add 5.6 in this list or change this to 5.x.
 
Now randomly trying to re-install PHP 5.6 but failed to work with all advices on the web. I have to halt all updates of DirectAdmin from now until the problem has been solved. I am waiting for a solution from somebody who might be able to help too.

Can you try to install pcre-devel then compile again? I just removed old libs, reinstalled and php 5.6 is still working with DA 1.656
 
Can you try to install pcre-devel then compile again? I just removed old libs, reinstalled and php 5.6 is still working with DA 1.656
Can you guide me through the pcre-devel installation command? I used the command ./build pcre and it didn't produce any results.
2023-11-20_09-30-24.jpg
 
from your logs build error.
maybe you have customize configuration of php56


check with this
Code:
da build used_configs | grep configure.php
if there have any "/custom/", try delete or move it to other place.
 
from your logs build error.
maybe you have customize configuration of php56


check with this
Code:
da build used_configs | grep configure.php
if there have any "/custom/", try delete or move it to other place.
Here is the result when I run the grep command:
2023-11-20_10-08-26.jpg


@ccto: Tried and still failed to build.
 
ok, maybe you have garbage manual compiler pcre libs inside "/usr/local/"

this could be checking with
Code:
ldconfig -p | grep pcre
 
try move all "libpcre2*" inside "/usr/local/lib/ to other place and rebuild again

Code:
ldconfig
da build php_expert 5.6 php-fpm
 
Just removing .so files will not help, because most likely you will have headers in /usr/local/include for the removed libraries, which shadow the include files from system packages in /usr/include.

Best way forward is to remove all CB customizations, then remove the old libraries using DA library removal commands and rebuild all CB managed software components:
  1. rm -rf /usr/local/directadmin/custombuild/custom - removes all CB customizations, you can disable them instead of removing by just renaming the directory with mv /usr/local/directadmin/custombuild/custom /usr/local/directadmin/custombuild/custom_backup.
  2. da build remove_items - removes all libraries except libiconv.
  3. da build remove_old_local libiconv - removes libiconv.
  4. da build all - rebuilds all CustomBuild managed software components.
 
Just removing .so files will not help, because most likely you will have headers in /usr/local/include for the removed libraries, which shadow the include files from system packages in /usr/include.

Best way forward is to remove all CB customizations, then remove the old libraries using DA library removal commands and rebuild all CB managed software components:
  1. rm -rf /usr/local/directadmin/custombuild/custom - removes all CB customizations, you can disable them instead of removing by just renaming the directory with mv /usr/local/directadmin/custombuild/custom /usr/local/directadmin/custombuild/custom_backup.
  2. da build remove_items - removes all libraries except libiconv.
  3. da build remove_old_local libiconv - removes libiconv.
  4. da build all - rebuilds all CustomBuild managed software components.
Great! I fixed the problem using your instructions. Thanks for your support. I would like to share this guide with everyone.
 
Back
Top