Open-source Languages & Tools for z/OS

 View Only
  • 1.  Cannot unpack the PHP install package

    Posted 09-25-2019 07:11

    downloaded both PHP packages and transferredd to our USS system using WinSCP as binary, but I can’t unzip either package:

    MCZ:/Rocket : gzip -d php-7.0.5_b012.170614.tar.gz
    gzip: php-7.0.5_b012.170614.tar.gz: not in gzip format
    MCZ:/Rocket : gunzip -d php-7.0.5_b012.170614.tar.gz
    gzip: php-7.0.5_b012.170614.tar.gz: not in gzip format
    MCZ:/Rocket : gunzip -d php-5.4.4_b0006.161122.tar.gz
    gzip: php-5.4.4_b0006.161122.tar.gz: not in gzip format

    Any suggestions anyone?

    Thanks,

    Steve



  • 2.  RE: Cannot unpack the PHP install package

    Posted 09-25-2019 09:12

    I suspect that there was an encoding problem somewhere along the line. I just downloaded the package and ran these commands. You might run the od command, as I did, and confirm that the hex data of the first few bytes is the same.

    bash-4.3$ ls -lT
    total 36448
    - untagged    T=off -rw-r--r--   1 TSJLC    PDUSER   18635859 Sep 25 07:49 php-5.4.4_b0006.161122.tar.gz
    bash-4.3$ od -tx1 php-5.4.4_b0006.161122.tar.gz | head
    0000000000    1F  8B  08  08  5C  6B  34  58  00  0E  97  88  97  60  F5  4B
    0000000020    F4  4B  F4  6D  82  F0  F0  F0  F6  4B  F1  F6  F1  F1  F2  F2
    0000000040    4B  A3  81  99  00  EC  5C  5D  6C  1C  47  72  5E  FD  D8  92
    0000000060    2C  CB  FA  5D  FD  23  20  70  87  D8  0F  17  99  FF  0A  70
    0000000100    7E  E8  0B  7C  80  81  35  63  E3  7E  82  83  7D  0C  96  77
    0000000120    49  CE  06  23  CB  48  1C  C0  50  4C  4B  B3  3B  BD  BB  03
    0000000140    DC  83  C3  D9  99  F5  00  79  30  66  86  2B  0A  67  01  79
    0000000160    48  00  3F  C4  80  49  8A  12  09  E4  E1  EE  28  92  47  E0
    0000000200    1E  8C  A5  EC  D8  80  1F  44  9F  8C  9C  81  7B  48  55  75
    0000000220    CF  FF  CC  F2  47  A4  7C  4E  D8  C2  68  77  67  BA  AB  AB
    CEE5213S The signal SIGPIPE was received.
    bash: [16843431: 2 (255)] tcsetattr: EDC5137I Inappropriate I/O control operation. (errno2=0x10150119)
    bash-4.3$ gzip -d php-5.4.4_b0006.161122.tar.gz
    bash-4.3$ pax -r -f php-5.4.4_b0006.161122.tar
    bash-4.3$ ls -lT
    total 154672
                        lrwxrwxrwx   1 TSJLC    PDUSER        33 Sep 25 07:53 CHANGES.ZOS -> ./share/doc/php/5.4.4/CHANGES.ZOS
    - untagged    T=off -rw-r--r--   1 TSJLC    PDUSER       852 Nov 21  2016 README
                        lrwxrwxrwx   1 TSJLC    PDUSER        32 Sep 25 07:53 README.ZOS -> ./share/doc/php/5.4.4/README.ZOS
                        lrwxrwxrwx   1 TSJLC    PDUSER        33 Sep 25 07:53 VERSION.ZOS -> ./share/doc/php/5.4.4/VERSION.ZOS
                        drwxr-xr-x   2 TSJLC    PDUSER      8192 Mar  3  2015 bin
                        drwxr-xr-x   3 TSJLC    PDUSER      8192 Sep  3  2014 include
                        drwxr-xr-x   3 TSJLC    PDUSER      8192 Nov 21  2016 lib
                        drwxr-xr-x   3 TSJLC    PDUSER      8192 Sep  3  2014 man
    - untagged    T=off -rw-r--r--   1 TSJLC    PDUSER   79091712 Sep 25 07:49 php-5.4.4_b0006.161122.tar
                        drwxr-xr-x   3 TSJLC    PDUSER      8192 Feb 12  2016 share
    bash-4.3$
    


  • 3.  RE: Cannot unpack the PHP install package

    Posted 09-26-2019 06:45

    Thanks Jerry,

    I have PHP working for now by unzipping it on my PC and uploading the files directly.

    I’ve managed to get a ‘Hellworld.php’ running and aam now stuck running PHP via the z/OS Apache web serer, but I’ll post a separate question inthe forum for that.

    Regards,

    Steve



  • 4.  RE: Cannot unpack the PHP install package

    Posted 09-26-2019 08:35

    Actually I don’t think php is working, as ‘php -v’ gives me :

    MCZ:/Rocket/php/bin :  php -v
    bash: ./php: cannot execute binary file: EDC5130I Exec format error.
    

    Using ‘od’ I get:

    MCZ:/Rocket :  od -tx1 php-5.4.4_b0006.161122.tar.gz | head
    0000000000    1F  2B  16  16  E0  92  F4  E7  00  0E  08  28  08  79  CF  D2
    0000000020    CB  D2  CB  94  22  8C  8C  8C  CC  D2  49  CC  49  49  CD  CD
    0000000040    D2  B1  21  39  00  58  E0  BD  93  1C  C7  99  5F  8D  80  1A
    0000000060    6B  73  DE  BD  8D  7B  40  97  17  80  0F  26  39  DF  15  97
    0000000100    A1  54  0B  4F  20  21  F5  83  46  A1  22  23  D0  0C  36  A6
    0000000120    C9  76  2E  7B  73  C8  1C  64  D7  D3  D2  FA  5E  B8  8B  03
    0000000140    FC  23  66  FD  39  CF  00  A8  F0  86  06  4E  15  87  01  A8
    0000000160    C8  00  6F  63  20  C9  2A  12  05  43  45  56  4D  1A  C7  44
    0000000200    1E  2C  B2  58  80  20  1F  C4  FF  2C  04  21  C0  C8  E4  A4
    0000000220    77  DF  78  CD  C7  9F  4F  D5  80  62  88  A6  87  9B  8A  8A
    CEE5213S The signal SIGPIPE was received.
    

    so something is wrong somewhere.



  • 5.  RE: Cannot unpack the PHP install package

    Posted 09-27-2019 06:33

    Ok - problem caused by using incorrect zip and tar options. Instructions in README.ZOS worked OK :slight_smile: