Originally posted by: Gusb
Hello Team,
I need to use a LAMP environment on AIX using packages downloaded from AIX toolbox. Then to use dynamic pages content we are using php and connection to a db. Also I downloaded mariadb from AIX toolbox
I need connection from php to mariadb, The mysqli.so
to connect to mariadb is not available on the binary.
I ran
php -m
and the result is:
php -m
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
ftp
hash
iconv
json
ldap
libxml
openssl
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
[Zend Modules]
no mysqli module on php package downloaded from AIX toolbox.
Alternatively I tried to compile the sources that are available on AIX toolbox but the compilation fails.
I downloaded php source code from:
https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SRPMS/php/php-7.2.19-2.src.rpm
by adding "--with-mysql=/opt/freeware/bin/mysql_config \ " in the .spec file
The following is the output:
root@c01:/opt/freeware/src/packages/SPECS>rpmbuild -ba php-7.2.19-2.spec
warning: Macro %dotests defined but not used within scope
warning: bogus date in %changelog: Thu Aug 31 2018 Reshma V Kumar <reskumar@in.ibm.com> 7.0.31-1
warning: bogus date in %changelog: Thu Nov 25 2016 Nitish K Mishra <nitismis@in.ibm.com> 7.0.13-1
warning: bogus date in %changelog: Thu Nov 26 2008 Michael Perzl <michael@perzl.org> - 5.2.8-1
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.q8wMea
+ umask 022
+ cd /opt/freeware/src/packages/BUILD
+ cd /opt/freeware/src/packages/BUILD
+ rm -rf php-7.2.19
+ /bin/gzip -dc /opt/freeware/src/packages/SOURCES/php-7.2.19.tar.gz
+ /bin/tar -xof -
+ STATUS=0
+ [ 0 -ne 0 ]
+ cd php-7.2.19
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo Patch #0 (php-7.2.19-aixconfig.patch):
Patch #0 (php-7.2.19-aixconfig.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p1 -b --suffix .aixconfig --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-aixconfig.patch
patching file ext/mysqlnd/mysqlnd_result.c
+ echo Patch #2 (php-7.2.19-aix-build.patch):
Patch #2 (php-7.2.19-aix-build.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p1 -b --suffix .build --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-aix-build.patch
patching file Makefile.global
patching file configure
Hunk #1 succeeded at 7237 (offset 146 lines).
Hunk #2 succeeded at 10204 (offset 1 line).
patching file sapi/cgi/config9.m4
patching file sapi/cli/config.m4
+ echo Patch #3 (php-7.2.19-aix-network.patch):
Patch #3 (php-7.2.19-aix-network.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p1 -b --suffix .network --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-aix-network.patch
patching file ext/standard/basic_functions.c
Hunk #1 succeeded at 3986 (offset 31 lines).
+ echo Patch #4 (php-7.2.19-aix-setrlimit.patch):
Patch #4 (php-7.2.19-aix-setrlimit.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p1 -b --suffix .setrlimit --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-aix-setrlimit.patch
patching file ext/posix/posix.c
+ echo Patch #6 (php-7.2.19-aix-tests.patch):
Patch #6 (php-7.2.19-aix-tests.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p1 -b --suffix .tests --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-aix-tests.patch
patching file ext/soap/tests/bugs/bug29109.wsdl
+ echo Patch #7 (php-7.2.19-aix-trailing-slash.patch):
Patch #7 (php-7.2.19-aix-trailing-slash.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p1 -b --suffix .trailing-slash --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-aix-trailing-slash.patch
patching file Zend/zend_virtual_cwd.c
Hunk #1 succeeded at 368 (offset -40 lines).
patching file main/streams/plain_wrapper.c
patching file Zend/zend_virtual_cwd.h
patching file Zend/zend_virtual_cwd.c
+ echo Patch #9 (php-7.2.18-fpm.patch):
Patch #9 (php-7.2.18-fpm.patch):
+ /opt/freeware/bin/patch --no-backup-if-mismatch -p0 --fuzz=2
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.18-fpm.patch
patching file configure
+ rm -rf /tmp/php-7.2.19-32bit
+ cp -pr . /tmp/php-7.2.19-32bit
+ rm -fr CODING_STANDARDS CONTRIBUTING.md CREDITS EXTENSIONS INSTALL LICENSE Makefile.frag Makefile.gcov Makefile.global Makefile.global.build NEWS README.EXT_SKEL README.GIT-RULES README.MAILINGLIST_RULES README.NEW-OUTPUT-API README.PARAMETER_PARSING_API README.REDIST.BINS README.RELEASE_PROCESS README.SELF-CONTAINED-EXTENSIONS README.STREAMS README.SUBMITTING_PATCH README.TESTING README.TESTING2 README.UNIX-BUILD-SYSTEM README.WIN32-BUILD-SYSTEM README.input_filter README.md TSRM UPGRADING UPGRADING.INTERNALS Zend acinclude.m4 aclocal.m4 appveyor build buildconf buildconf.bat config.guess config.sub configure configure.ac configure.build ext footer generated_lists genfiles header install-sh ltmain.sh main makedist missing mkinstalldirs pear php.gif php.ini-development php.ini-production php7.spec.in run-tests.php sapi scripts server-tests-config.php server-tests.php snapshot stamp-h.in tests travis vcsclean win32
+ mv /tmp/php-7.2.19-32bit 32bit
+ cp -pr 32bit 64bit
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.2JwMeb
+ umask 022
+ cd /opt/freeware/src/packages/BUILD
+ cd php-7.2.19
+ export CC=/opt/freeware/bin/gcc -fPIC
+ export CXX=/opt/freeware/bin/g++
+ export OBJECT_MODE=64
+ cd 64bit
+ export CFLAGS=-Wl,-bbigtoc -I/usr/include/openssl -O2 -maix64 -I/opt/freeware/include
+ export LDFLAGS=-L/opt/freeware/lib64 -L/usr/lib64 -L/opt/freeware/lib -L/usr/lib -lm -lXpm -lpthread -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
+ export PHP_LDFLAGS=-L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib -lm -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
+ patch -p0
+ 0< /opt/freeware/src/packages/SOURCES/php-7.2.19-phpini.patch
Hmm... Looks like a unified context diff to me...
The text leading up to this was:
--------------------------
|--- main/php_ini.c.orig 2019-04-29 03:09:18 +0000
|+++ main/php_ini.c 2019-04-29 03:09:36 +0000
--------------------------
Patching file main/php_ini.c using Plan A...
Hunk #1 failed at 612.
1 out of 1 hunks failed--saving rejects to main/php_ini.c.rej
done
error: Bad exit status from /var/tmp/rpm-tmp.2JwMeb (%build)
RPM build errors:
Macro %dotests defined but not used within scope
bogus date in %changelog: Thu Aug 31 2018 Reshma V Kumar <reskumar@in.ibm.com> 7.0.31-1
bogus date in %changelog: Thu Nov 25 2016 Nitish K Mishra <nitismis@in.ibm.com> 7.0.13-1
bogus date in %changelog: Thu Nov 26 2008 Michael Perzl <michael@perzl.org> - 5.2.8-1
Bad exit status from /var/tmp/rpm-tmp.2JwMeb (%build)
root@c01:/opt/freeware/src/packages/SPECS>
Could you help me to add mariaDB support to php available on AIX toolbox?
Thanks in advance.
Gustavo.