Upgrading PHP and INTL

Mitch

Verified User
Joined
Apr 16, 2013
Messages
75
Update PHP and INTL

Hi There,

Well, the time has come and I have to update.
I don't know but its always scared to update things with DirectAdmin (to unfamiliar with).

So I have a few questions.
ALWAYS backup before you start the custombuild (custumbuild-backup-yyyymmdd) folder... right?

- What to do if something goes wrong? (so how to get it back to the original state before the update)

- How to update php to the lastest version

- How to update the php-intl extension


Regards Mitch
 
Last edited:
Is there somebody who can help me at all with the custombuild?

What I want:

php (newest version)
apache (newest version)
php 5 (newest version
- intl extension
roundcube
- spamassin

But then everything up to date.

And how can I see my current build?
 
Code:
cd /usr/local/directadmin/custombuild
./build versions

Code:
cd /usr/local/directadmin/custombuild
./build update
./build update_versions

Edit options.conf to make changes.
 
Well, check my error:

Code:
[user@server custombuild]# ./build php n
mail-header-patch=yes is set in the options.conf, but is not required with this php version.
To enable the X-Mail header, set mail.add_x_header to 1 in your php.ini
File already exists:    php-5.4.24.tar.gz
MD5 Checksum on php-5.4.24.tar.gz passed.
Found /usr/local/directadmin/custombuild/php-5.4.24.tar.gz
Extracting ...
Done.
Disabling asm/atomic in /usr/include/mysql/my_global.h
Configuring php-5.4.24...
configure: WARNING: unrecognized options: --with-ttf, --enable-safe-mode
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for gawk... gawk
checking for bison... bison -y
checking for bison version... 2.4 (ok)
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking whether to enable computed goto gcc extension with re2c... no
checking whether to force non-PIC code in shared modules... no
checking whether /dev/urandom exists... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib... 

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... yes
checking for Apache 1.x (hooks) module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support... no
checking whether to enable Apache charset compatibility option... no
checking for Caudium support... no
checking for CLI build... yes
checking for Continuity support... no
checking for embedded SAPI library support... no
checking for FPM build... no
checking for Zeus ISAPI support... no
checking for LiteSpeed support... no
checking for Milter support... no
checking for NSAPI support... no
checking for PHTTPD support... no
checking for Pi3Web support... no
checking whether Roxen module is build using ZTS... no
checking for Roxen/Pike support... 
checking for thttpd... no
checking for TUX... no
checking for webjames... no
checking for CGI build... yes
checking for socklen_t in sys/socket.h... yes
checking for sun_len in sys/un.h... no
checking whether cross-process locking is required by accept()... no
checking for chosen SAPI module... apache2handler
checking for executable SAPI binaries...  cli cgi

Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... no
checking whether writing to stdout works... This is the test message -- yes
checking for socket... yes
checking for socketpair... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for yp_get_default_domain... no
checking for __yp_get_default_domain... no
checking for yp_get_default_domain in -lnsl... yes
checking for dlopen... no
checking for __dlopen... no
checking for dlopen in -ldl... yes
checking for sin in -lm... yes
checking for inet_aton... yes
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for dirent.h... yes
checking for ApplicationServices/ApplicationServices.h... no
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for netinet/in.h... yes
checking for alloca.h... yes
checking for arpa/inet.h... yes
checking for arpa/nameser.h... yes
checking for assert.h... yes
checking for crypt.h... yes
checking for dns.h... no
checking for fcntl.h... yes
checking for grp.h... yes
checking for ieeefp.h... no
checking for langinfo.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for monetary.h... yes
checking for netdb.h... yes
checking for pwd.h... yes
checking for resolv.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for syslog.h... yes
checking for sysexits.h... yes
checking for sys/ioctl.h... yes
checking for sys/file.h... yes
checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/sysexits.h... no
checking for sys/varargs.h... no
checking for sys/wait.h... yes
checking for sys/loadavg.h... no
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for unix.h... no
checking for utime.h... yes
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for dlfcn.h... yes
checking for assert.h... (cached) yes
checking for fopencookie... yes
checking for broken getcwd... no
checking for broken libc stdio... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for missing declarations of reentrant functions... done
checking for fclose declaration... ok
checking for tm_gmtoff in struct tm... yes
checking for struct flock... yes
checking for socklen_t... yes
checking size of size_t... 8
checking size of long long... 8
checking size of long long int... 8
checking size of long... 8
checking size of int... 4
checking size of intmax_t... 8
checking size of ssize_t... 8
checking size of ptrdiff_t... 8
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for struct stat.st_rdev... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for struct sockaddr_storage... yes
checking for field sa_len in struct sockaddr... no
checking for IPv6 support... yes
checking for vprintf... yes
checking for _doprnt... no
checking for alphasort... yes
checking for asctime_r... yes
checking for chroot... yes
checking for ctime_r... yes
checking for cuserid... yes
checking for crypt... no
checking for flock... yes
checking for ftok... yes
checking for funopen... no
checking for gai_strerror... yes
checking for gcvt... yes
checking for getloadavg... yes
checking for getlogin... yes
checking for getprotobyname... yes
checking for getprotobynumber... yes
checking for getservbyname... yes
checking for getservbyport... yes
checking for gethostname... (cached) yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for getpwnam_r... yes
checking for getgrnam_r... yes
checking for getpwuid_r... yes
checking for grantpt... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for isascii... yes
checking for link... yes
checking for localtime_r... yes
checking for lockf... yes
checking for lchown... yes
checking for lrand48... yes
checking for memcpy... yes
checking for memmove... yes
checking for mkstemp... yes
checking for mmap... yes
checking for nl_langinfo... yes
checking for perror... yes
checking for poll... yes
checking for ptsname... yes
checking for putenv... yes
checking for realpath... yes
checking for random... yes
checking for rand_r... yes
checking for scandir... yes
checking for setitimer... yes
checking for setlocale... yes
checking for localeconv... yes
checking for setenv... yes
checking for setpgid... yes
checking for setsockopt... yes
checking for setvbuf... yes
checking for shutdown... yes
checking for sin... yes
checking for snprintf... yes
checking for srand48... yes
checking for srandom... yes
checking for statfs... yes
checking for statvfs... yes
checking for std_syslog... no
checking for strcasecmp... yes
checking for strcoll... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for strnlen... yes
checking for strptime... yes
checking for strstr... yes
checking for strtok_r... yes
checking for symlink... yes
checking for tempnam... yes
checking for tzset... yes
checking for unlockpt... yes
checking for unsetenv... yes
checking for usleep... yes
checking for utime... yes
checking for vsnprintf... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for nanosleep... yes
checking for nanosleep in -lrt... yes
checking for getaddrinfo... yes
checking for __sync_fetch_and_add... yes
checking for strlcat... no
checking for strlcpy... no
checking for getopt... yes
checking for utime.h... (cached) yes
checking whether utime accepts a null argument... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for declared timezone... yes
checking for type of reentrant time-related functions... POSIX
checking for readdir_r... yes
checking for type of readdir_r... POSIX
checking for in_addr_t... yes
checking for crypt_r... no

General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking layout of installed files... PHP
checking path to configuration file... DEFAULT
checking where to scan for configuration files... 
checking whether to enable PHP's own SIGCHLD handler... no
checking whether to explicitly link against libgcc... no
checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking whether to enable DTrace support... no
checking how big to make fd sets... using system default

Configuring extensions
checking size of long... (cached) 8
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking which regex library to use... php
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... yes
checking for krb5-config... /usr/bin/krb5-config
checking for DSA_get_default_method in -lssl... yes
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
checking for PCRE headers location... /usr/local/include
checking for PCRE library location... /usr/local/lib
checking whether to enable the SQLite3 extension... yes
checking bundled sqlite3 library... yes
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... /usr/local/lib
checking for zlib version >= 1.2.0.4... 1.2.3
checking for gzgets in -lz... yes
checking whether to enable bc style precision math functions... yes
checking for BZip2 support... no
checking whether to enable calendar conversion support... yes
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.30.0
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... cc -E
checking for openssl support in libcurl... yes
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... yes
checking for curl_version_info in -lcurl... yes
checking for curl_easy_strerror in -lcurl... yes
checking for curl_multi_strerror in -lcurl... yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for TCADB support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for ENCHANT support... no
checking whether to enable EXIF (metadata from images) support... yes
checking for fileinfo support... yes
checking for utimes... yes
checking for strndup... yes
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... yes
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libvpx... no
checking for the location of libjpeg... /usr/local/lib
checking for the location of libpng... /usr/local/lib
checking for the location of libXpm... no
checking for FreeType 2... /usr/local/lib
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
checking for GNU gettext support... yes
checking for bindtextdomain in -lintl... no
checking for bindtextdomain in -lc... yes
checking for ngettext in -lc... yes
checking for dngettext in -lc... yes
checking for dcngettext in -lc... yes
checking for bind_textdomain_codeset in -lc... yes
checking for GNU MP support... no
checking for mhash support... yes
checking whether to enable hash support... yes
checking whether byte ordering is bigendian... (cached) no
checking size of short... 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking for iconv support... yes
checking for libiconv in -liconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... yes
checking if your cpp allows macro usage in include lines... yes
checking for IMAP support... no
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... no
checking for InterBase support... no
checking whether to enable internationalization support... yes
checking for icu-config... /usr/bin/icu-config
checking for location of ICU headers and libraries... /usr
checking for ICU 3.4 or greater... found 4.2.1
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether to enable JavaScript Object Serialization support... yes
checking for ANSI C header files... (cached) yes
checking for LDAP support... no
checking for LDAP Cyrus SASL support... no
checking whether to enable multibyte string support... yes
checking whether to enable multibyte regex support... yes
checking whether to check multibyte regex backtrack... yes
checking for external libmbfl... no
checking for external oniguruma... no
checking for variable length prototypes and stdarg.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/time.h... (cached) yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for stdarg.h... (cached) yes
checking size of int... (cached) 4
checking size of short... (cached) 2
checking size of long... (cached) 8
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for working memcmp... yes
checking for stdarg.h... (cached) yes
checking for mcrypt support... yes
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... yes
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for mysql_close in -lmysqlclient... yes
checking for MySQL UNIX socket location... no
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.

*** There was an error while trying to configure php. Check the custom/ap2/configure.php5 file



[user@server custombuild]# rpm -qa |grep MySQL
MySQL-server-5.5.27-1.linux2.6.x86_64
MySQL-devel-5.5.27-1.linux2.6.x86_64
MySQL-client-5.5.27-1.linux2.6.x86_64
MySQL-shared-5.5.27-1.linux2.6.x86_64

Code:
configure.php5:
#!/bin/sh
./configure \
    --with-apxs2 \
        --with-curl=/usr/local/lib \
        --with-gd \
        --with-ttf \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-freetype-dir=/usr/local/lib \
        --with-kerberos \
        --with-openssl \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr \
        --with-mysqli=/usr/bin/mysql_config \
        --with-pdo-mysql=/usr \
        --with-pcre-regex=/usr/local \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xsl \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --with-iconv=/usr/local \
        --enable-bcmath \
        --enable-calendar \
        --enable-exif \
        --enable-ftp \
        --enable-gd-native-ttf \
        --enable-safe-mode \
        --enable-soap \
        --enable-sockets \
        --enable-mbstring \
        --enable-zip \
        --enable-wddx \
        --enable-intl


I found this forum post:
http://forum.directadmin.com/showthread.php?t=43000

What I did:

Code:
cd /usr/local/directadmin/custombuild
perl -pi -e 's/libxml2:2.7.8:.*/libxml2:2.7.6:/' versions.txt
perl -pi -e 's/zlib:1.2.6:.*/zlib:1.2.3:/' versions.txt
rm -f /usr/local/lib/libz.so*
rm -f /usr/local/lib/libxml2.so*
ldconfig
./build zlib
./build libxml2
./build php n

output:

Code:
Generating phar.php
/usr/local/directadmin/custombuild/php-5.4.24/sapi/cli/php: /usr/local/lib/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /usr/local/lib/libxslt.so.1)
make: *** [ext/phar/phar.php] Error 1
 
Last edited:
@Mitch, I have replied to you in the other forum thread.

I would advice against doing ./build update_versions , because you have no control. It is much better to upgrade one application at the time in custombuild, then you can manage/fix the errors as they come, and not let custombuild attempt to upgrade everything at once. Always run ./build update and then ./build versions to see what upgrades is available, and the run ./build NameOfApp to upgrade one at the time.

To see a list of all available commands, run "./build" - also see the custombuild faq, here is the faq for cb 1.1 and 1.2 http://forum.directadmin.com/showthread.php?t=29824 and here is the faq for cb 2.0 http://forum.directadmin.com/showthread.php?t=44743
 
Last edited:
I don't use APC, so I don't know about that problem. Hopefully someone else can answer your new post about it.
 
Back
Top