If you are interested in watercolor paintings you can click here

Last Update: 08/25/2005

This is another version of the AS/400, iSeries, i5 open-source PASE software distribution.

If you click here, you will see the result of the php info (version 4.4.0 with a V5R2 box so, it is not the same distribution than the one that I describe in this page) that I have on my machine. Of course I anonymized this document.

WARNING : Of course there is no warranty on this software. However, to my knowledge there is no viruses or trojan horses in the software that I provide here. I also checked all the signatures and MD5SUM when they were provided by the web sites where I downloaded the source files. Naturally, if you follow what I show you in this page, you can also rebuild the distribution on your own machine. I provide now the full source distribution of what I did and within this source distribution, you will find a compilation script which setup everything for you. It's a very basic bash script that you can customize to your need. You will find this source distribution HERE If you cannot do that you can also download the distribution and test it on a ... test machine.

There is only a 70 Mb file which contains everything. The file is called local-V5R3-2.0.tar.bz2. The MD5SUM signature is 819c8f5c6732f1c3790dd0497d982b47. You must first use the bunzip2 command on a PC (if you don't have it on your AS/400). Many freeware or commercial software can manage this kind of archive under windows. You will then have a tar archive that you can upload to your machine in binary mode with ftp for example. Because I don't have enough space on this web server, I created a FTP server where that's going to be possible for you to download this file. But be careful, only 2 users can download the file at the same time (the iSeries community is not so big ;-) ). So, if you have some trouble to download this file it might be because this limit has been override. So, try again later .....

I also downloaded the sources files from reliable sources which are :

  • http://aixpdslib.seas.ucla.edu
  • http://www.gnu.org
  • http://www.gzip.org (you reach this address thru the gnu website).
  • http://www.gzip.org/zlib/ (you reach this address thru the gnu website).
  • http://www.info-zip.org/pub/infozip/UnZip.html (you reach this address thru the gnu website)
  • http://www.info-zip.org/pub/infozip/Zip.html (you reach this address thru the gnu website).
  • http://sources.redhat.com/bzip2/
  • http://www.mysql.com
  • http://curl.haxx.se/
  • http://www.php.net
  • http://www.i5php.net
  • http://www.phpmyadmin.net/home_page/index.php

Anyhow, I advise you to install it first on a test machine first. This software has been built on a V5R3 box. So, it will not work with V5R2. Besides that I had to do for now a compromise. In fact, I had to use some software that I didn't built myself. This software are the following ones :

  • mysql-4.1.12 (downloaded from http://www.i5php.net. Thanks to Rob Ward)
  • gcc.3.3.6 (downloaded from http://aixpdslib.seas.ucla.edu)
  • libxml2.2.6.16 (downloaded from http://aixpdslib.seas.ucla.edu)
  • The reason for this problem is that I don't have an IBM compiler such as VisualAge (Xlc compiler) and without this compiler I cannot compile mysql and libxml2. This is because there is a pthread.h problem with the gnu gcc compiler. So, as a workaround and until I find a solution I included software that I didn't compile myself. As a bonus I added the curl software.

    This archive will provide you with the following components :

    • gcc-3.3.6 (AIX binary from UCLA)
    • texinfo-4.8
    • m4-1.4.3
    • autoconf-2.59
    • automake-1.9.6
    • zlib-1.2.3
    • patch-2.5.4
    • gzip-1.2.4
    • bzip2-1.0.3
    • bison-2.0
    • gettext-0.13
    • ncurses-5.4
    • curl-7.14.0
    • mysql-4.1.12 (iSeries binary from http://www.i5php.net)
    • unzip-5.52
    • zip-2.31
    • php-4.4.0
    • libxml2-2.6.16 (AIX binary from UCLA)
    • php-5.0.4

    The above software has been compiled in the order they are displayed. I'm providing the different variable which were used for each software:

  • texinfo-4.8 :
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • m4-1.4.3
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • autoconf-2.59
  • PATH=/usr/local/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • automake-1.9.6
  • PATH=/usr/local/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • zlib-1.2.3
  • CC=gcc
    make install

  • patch-2.5.4
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • gzip-1.2.4
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • bzip2-1.0.3
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    make install PREFIX=/usr/local
    Remark: make run its 6 tests without any problems

  • bison-2.0
  • PATH=/usr/local/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --prefix=/usr/local --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • gettext-0.13
  • PATH=/usr/local/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --prefix=/usr/local --disable-shared --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0 --disable-csharp

  • ncurses-5.4
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0 --prefix=/usr/local

  • curl-7.14.0
  • PATH=/usr/local/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many'
    CC=gcc
    ./configure --build=powerpc-ibm-aix5.2.0.0 --host=powerpc-ibm-aix5.2.0.0

  • mysql-4.1.13
  • Binary from http://www.i5php.net (Thanks to Rob Ward)

  • unzip-5.52
  • make -f unix/Makefile generic
    make -f unix/Makefile install

  • zip-2.31
  • make -f unix/Makefile generic
    make -f unix/Makefile install

  • libxml2-2.6.20
  • Binary software from the UCLA (see above)

  • php-4.4.0
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many -DPASE -I/usr/local/include'
    LDFLAGS='-liconv -ldb400 -Wl,-bnoquiet -Wl,-bI:/usr/local/lib/libdb400.exp,-bI:/usr/local/lib/as400_libc.exp'
    CC=gcc
    ./configure --with-config-file-path=/usr/local/php4/etc --prefix=/usr/local/php4/ --enable-force-cgi-redirect --with-ibm-db2 --with-pear --with-zlib --enable-magic-quotes --enable-inline-optimizations --disable-debug --with-iconv=/QOpenSys/usr --with-gettext --with-bz2 --build=powerpc-ibm-aix5.2.0.0 --enable-calendar --host=powerpc-ibm-aix5.2.0.0 --with-mysql=/usr/local/mysql --with-openssl --with-curl

  • php-5.0.4
  • PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/QOpenSys/QIBM/ProdData/DeveloperTools/perl/bin
    CFLAGS='-O2 -mcpu=powerpc -Wa,-many -DPASE -I/usr/local/include'
    LDFLAGS='-Wl,-bnoquiet -Wl,-bI:/usr/local/lib/libdb400.exp,-bI:/usr/local/lib/as400_libc.exp -L/usr/local/lib'
    CC=gcc
    ./configure --with-config-file-path=/usr/local/php5/etc --prefix=/usr/local/php5/ --enable-force-cgi-redirect --with-ibm-db2 --with-pear --with-zlib --enable-magic-quotes --enable-inline-optimizations --disable-debug --with-iconv=/QOpenSys/usr --with-gettext --with-bz2 --build=powerpc-ibm-aix5.2.0.0 --enable-calendar --host=powerpc-ibm-aix5.2.0.0 --with-mysql=/usr/local/mysql --with-openssl --with-curl

    A few notes :

    I encounter a few glithes :

  • I tried to use the most recent version of each software. Except for a few ones :

    - I used gettext-0.13 because it compiles fine with the iconv software include in the OS400. This is not true with gettext-0.14.1, because there is some trouble with libiconv with this version. If you try to install gnu libiconv 1.9.1 it won't work either.

    Each time I had to recompile gettext that took me 24 hours.

    A few installation notes :

    I assumed that you don't have a /QOpenSys/usr/local directory.

    You must installed the iSeries Tools for Developers (5799PTL) software program. You can find this software here

    You must register with IBM to download the software which is free and the software is among the trials and betas. I guess it is better if you also ask to your IBM representative the 5733SC1 LPO which is freely available. This is because this distribution support OPENSSL.

    This archive MUST be installed in the /QOpenSys/usr directory

    You can uncompress it with the bunzip2 command : e.g. bunzip2 local-V5R3-2.0.tar.bz2.

    you can then untar it with tar xvf local.tar

    Of course, if you don't have bunzip2 command on your iSeries, you must do that with a utility on your PC such as WinRAR, 7Zip, a.s.o.... However it will be Ok to untar on the iSeries.

    You must create a symbolic link the following way :

    When you are in the PASE environment (CALL QP2TERM from a regular iSeries command line) type the following commands :

    cd /usr

    ln -s /QOpenSys/usr/local local

    The above instruction will create a symbolic link which will permit the use of the software

    You can now go in the /usr/local/php4/bin or /usr/local/php5/bin directories. There you can type the 'php -v' command.

    If there is the version number which is displayed then everything should be fine for php.

    You must configure mysql. To do that you must create a user profile on the iSeries called 'MYSQL'.

    It is advised that you configured it as a *USER with no rights at all.

    You must run the mysql configuration script which is in /usr/local/mysql/bin. The configuration script is called mysql_install_db.

    You should then follow the instruction of this script.

    With the command /usr/local/mysql/bin/mysqld_safe &, you should be able to run the mysql daemon.

    You must also configure your iSeries apache server (in your httpd.conf file) with the following configuration directives, if you want to use the included php-4.4.0 version :

    ScriptAlias /php-bin/ /QOpenSys/usr/local/php4/bin
    
    # new type mime definition
    AddType application/x-httpd-php .php
    Action application/x-httpd-php /php-bin/php
    Action php-script /cgi-bin/php
    &ltDirectory /QOpenSys/usr/local/php4/bin>
    Options +ExecCGI
    CGIConvMode %%BINARY/BINARY%%
    order allow,deny
    allow from all
    </Directory>

    If you want to use the PHP-5.0.4 version you must configure your httpd.conf with the following instructions :

    ScriptAlias /php-bin/ /QOpenSys/usr/local/php5/bin
    
    # new type mime definition
    AddType application/x-httpd-php .php
    Action application/x-httpd-php /php-bin/php
    Action php-script /cgi-bin/php
    &ltDirectory /QOpenSys/usr/local/php5/bin>
    Options +ExecCGI
    CGIConvMode %%BINARY/BINARY%%
    order allow,deny
    allow from all
    </Directory>

    Make sure you setup the folder and file permissions properly in the /QOpenSys/usr/local/php/bin folder and on the php executable.

    The IBM Apache server uses the user profile: QTMHHTP1 when calling CGI applications unless you change the Server User Profile in the Apache config. Refer to the documentation in IBM iSeries Info Center.

    *PUBLIC or user QTMHHTP1 will need to have read access to the QOpenSys folder, read access to the php folder, and read access to the bin folder. The owner of the files of the distribution is QPGMR

    They will also need read and execute access to the php executable in the /QOpenSys/usr/local/php4/bin (or /QOpenSys/usr/local/php5/bin) folder.

    To control mysql you should install phpmyadmin. You will find in this archive the compress archive of the version 2.6.3-pl1 version of phpmyadmim. If you want to use it you will have to install it on your web server. You can find the latest version here : http://www.phpmyadmin.net/home_page/index.php

    This package has been created in part with the help of Rob Ward website that you can see at http://www.i5php.net.

    Have Fun

    Olivier