Instructions for building PHP on MPE/iX, such as they are:

  1. As an exercise, I strongly recommend that you first build wget, as described by Lars.
    Lars's instructions are complete and comprehensive, so, if you can't get wget working, then you don't have a hope with the incomplete and probably inaccurate instructions following.

  2. Also, as an exercise, I recommend that you download and build the latest Apache version from httpd.apache.org. If you can't get Apache working, then you don't have a hope with the incomplete and probably inaccurate instructions following.

  3. Download the latest source code from www.php.net. The version we originally used was 4.0.4pl1. These instructions also seem to work for 4.0.6. Use Samba to upload the file to /SAMBA/SHR/public or wherever. Or use wget to download it directly on to the HP3000 (cool).

    Get the various MPE hacks php-mpe.tar.Z and the TurboImage extension php-ti.tar.Z.

  4. Create the user and home group:
    :newgroup php.ix ;access=(r,w,a,l,x,s:gl);
    :newuser php.ix ;pass=whatever
    :altuser php.ix home=php ;cap=+ph,gl
    :hello php.ix
    :/bin/sh -L
    
  5. Unpack the source files somehow. This ought to work.
    shell/iX> gunzip -c /SAMBA/SHR/public/php-4.0.6.tar.gz | tar xvof -
    
    (I couldn't get gunzip to work. I gave up and used Winzip & uploaded the unzipped tar file with Samba.)
    Create a symbolic link to the new source directory.
    shell/iX> ln -s php-4.0.6 src
    
  6. Install the MPE bits.
    shell/iX> cd
    shell/iX> mkdir mpe
    shell/iX> tar xvzopf /SAMBA/SHR/public/php-mpe.tar.Z
    shell/iX> cd /IX/PHP/src/ext
    shell/iX> mkdir mpe
    shell/iX> cd mpe
    shell/iX> tar xvzopf /SAMBA/SHR/public/php-ti.tar.Z
    shell/iX> cd
    
  7. The following files should have been created by the last step:
  8. This step is optional, but may avoid some hassle later when linking. Untar this file. This replaces files: Thank you to Mark K for patching these files for me.

    Execute this command to rebuild libtool so that it links properly under MPE/iX.
    shell/iX> ltconfig ltmain.sh
    

  9. Try buildconf
    shell/iX> cd /IX/PHP/src
    shell/iX> buildconf
    
    If that doesn't work, then try autoconf to MPE-ize the configuration:
    shell/iX> cd /IX/PHP/src
    shell/iX> autoconf
    
    If you can't get autoconf to work, all hope may not necessarily be lost.

  10. If buildconf didn't work, you will need to hack /IX/PHP/src/configure to add in the TurboImage extension.

  11. Configure for MPE and TurboImage (watch the dots): This sometimes freezes at creating config_vars.mk. Break/RESUME gets it moving again.

    If configure breaks, you might have to help it along, by noting where it broke, examining the code, and then executing shell commands like this before re-running it:
    shell/iX> export ac_cv_prog_lex_root=lex.yy
    
    Running configure can be very slow on an HP3000. I think it took about 14 hours the first time that Troy did it on our HP927.

  12. Compile it.
    shell/iX> make
    
  13. If you haven't modified libtool, as described above, then you will need to manually link.
  14. If you have built the CGI, try running it.
    shell/iX> php -h
    
  15. If you have built the CGI, make install won't work until you have hacked /IX/PHP/src/build/shtool to remove the silly #filen@me#.

    Change the line
    dsttmp="$dstdir/#INST@$$#"
    to
    dsttmp="$dstdir/_INST_$$_"

    But who needs make install for the CGI? Just copy the file to somewhere!

  16. If you have built the DSO version make install will copy libphp4.so to Apache's libexec directory, and modify httpd.conf for you.

The executables are available here.


Back to the Unofficial home page