Email:   Password:
Blog :: Technical Learning by Thomas Riemer
RSS 2.0   RSS 1.0   Atom
Upgrading Servers   (PDF)
Posted March 1st, 2024

Notes on upgrading to apache2.4.58/ php-8.3.1
Jan 11, 2024
============
- need to have knowledge
   a) laravel
   b) symphony
   c) codeigniter
   d) nosql
   e) reactjs
- these are good blog topics
- more topics
    a) postgresql
    b) mongodb
    c) git

5:30pm - look at codeigniter

       Php Configuration:
        https://www.codeigniter.com/user_guide/intro/requirements.html
    
        codeigniter requires a number of php extensions
     a) intl   = php configure --enable-intl
     b) mbstring = php configure --enable-mbstring
     c) json   = included by default
     d) mysqlnd = php configure --with-msqli=mysqlnd
     e) curl  = php configure --with-curl
     f) imagick = pecl install imagick
     g) gd = php configure --with-gd
           = php8 configure --enable-gd
     h) simplexml = enabled by default
     i) memcache = installed via pecl
     j) memcached = installed via pecl
     k) redis = installed via pecl
     l) dom   = enabled by default
     m) libxml = enabled by default
     n) xdebug = pecl install xdebug
    
    
5:33pm - need to upgrade dev2 to php 8
       I build php from source
       Latest php version is 8.3.1
       downloadable from http://php.net
       
       pecl has a problem due to cacert.pem
       configure php.ini
       openssl.cafile=/usr/local/ssl/cacert.pem
       cd /usr/local/ssl
       wget http://curl.haxx.se/ca/cacert.pem
       This will download the cacert.pem with the update ca certs
       To see the cacert locations:
       php -r "print_r(openssl_get_cert_locations());"

6:30pm - apache is out of data.   Latest version is apache-2.4.58

7:11pm - so upgrade of php impacts the pearpkgs included
       by the software.
       Had to modify pearpkgs/Pear.pm
       Found bug in pearpkgs/MDB2/Mysqli.php
       

10:18pm - so it turns out that you can configure the php.ini to format
       the error outputs so its a little nicer in php.ini
       
       html_errors=On
       error_prepend_string="
"
       error_append_string = "
";

12:32am - so since I upgraded mariadb when I switched servers
       the database will not accept a blank string into an integer.
       This turns out to be a configuration set mariadb
       (mariadb is a version of mysql)
       select @@sql_mode
       edit /etc/my.cnf.d/mariadb-server.cnf
       add
       sql_mode=""

2:41am - recompiling php to include zlib
      ./configure --with-zlib

3:56am - added browscap ini item in php.ini
      browscap=/usr/local/lib/php/php_browscap.ini
      
4:09am - build apache 2.4.58 and of course rebuild php-8.3.1


       
Jan 12, 2024
============
2:00pm - going to upgrade groupcorners to apache-2.4.58,php-8.3.1

2:42pm - php upgrade fails because its missing oniguruma-devel package.
       which apparently does not exist on redhat os 8.2

       to get it:
       https://github.com/kkos/oniguruma
       download zip, and unzip it.  Probably ignore the INSTALL
       read file.

       to build it:
       yum install automake
       yum install autoconf
       autoreconf -fi
       ./configure
       make
       make install

       then  modify your build script for php-8.3.1
       add before configure
       export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

6:41pm - got php-8.3.1 to compile without mbstring
       had to add CFLAGS=-fPIC to configure statement
       and remove -enable-mbstring
       need to enable zip and imagick -*-*+90

Jan 13, 2024
============
4:33 pm  added zip to php
       pecl install zip

4:53pm   install imagick on groupcorners.com
       so the standard install
       pecl install imagick - fails in php 8.3.0
       So get the source from http://github.com/imagick
       unzip imagick-master
       cd imagick-master
       phpize
       ./configure
       make
       make install
       copy imagick.so from no-debug* under /usr/local/lib/php/extensions
       to /usr/local/lib/php/extensions
       
10:06pm - so mbstring fails to compile in php.
        a) the LDFLAGS in configure is not honored, so you
       need to add any thing in CFLAGS
    b) gcc is used to compile php, gcc uses binutils to
       link the objecs. Apparently the binutils on
       redhat 8.9, which groupcorners is running is not
       high enough version.  Apparently I need a version
       higher that 2.32 (groupcorners is running 2.30)

       So.. the answer is recompile binutils, and recompile
       gcc - and use the new gcc to compile php.

11:54pm   rebuilt php-8.3.1 with new gcc successfully.
        mbstring now compiles.



Copyright © 2024 Mind Contract, Inc.   All Rights Reserved
For more information call thomasriemer49@gmail.com or email 720-883-1866
Powered By: Build a Member