繁体   English   中英

使用exec的相同命令给出不同的输出

[英]same command using exec giving different output

我正在从一台服务器迁移到另一台服务器,并看到相同的exec命令给出了不同的输出。 我不确定我需要检查并确保我看到一致的输出

Example of the command that is executed:



java -jar /var/www/html/PhpTikaWrapper-master/vendor/tika-app-1.5.jar -m one.jpg

1)服务器1(这是我想要的)

Array
(
    [0] => Chroma BlackIsZero: true
    [1] => Chroma ColorSpaceType: RGB
    [2] => Chroma NumChannels: 4
    [3] => Compression CompressionTypeName: deflate
    [4] => Compression Lossless: true
    [5] => Compression NumProgressiveScans: 1
    [6] => Content-Length: 9371
    [7] => Content-Type: image/png
    [8] => Data BitsPerSample: 8 8 8 8
    [9] => Data PlanarConfiguration: PixelInterleaved
    [10] => Data SampleFormat: UnsignedIntegral
    [11] => Dimension ImageOrientation: Normal
    [12] => Dimension PixelAspectRatio: 1.0
    [13] => IHDR: width=150, height=75, bitDepth=8, colorType=RGBAlpha, compressionMethod=deflate, filterMethod=adaptive, interlaceMethod=none
    [14] => Text TextEntry: keyword=Software, value=Adobe ImageReady, encoding=ISO-8859-1, compression=none
    [15] => Transparency Alpha: nonpremultipled
    [16] => height: 75
    [17] => resourceName: Orca-logo.png
    [18] => tEXt tEXtEntry: keyword=Software, value=Adobe ImageReady
    [19] => tiff:BitsPerSample: 8 8 8 8
    [20] => tiff:ImageLength: 75
    [21] => tiff:ImageWidth: 150
    [22] => width: 150
)

服务器2(这是我在新服务器中得到的):

Array
(
    [0] => Comments: Lavc56.5.100
    [1] => Component 1: Y component: Quantization table 0, Sampling factors 2 horiz/2 vert
    [2] => Component 2: Cb component: Quantization table 0, Sampling factors 1 horiz/1 vert
    [3] => Component 3: Cr component: Quantization table 0, Sampling factors 1 horiz/1 vert
    [4] => Compression Type: Baseline
    [5] => Content-Length: 25259
    [6] => Content-Type: image/jpeg
    [7] => Data Precision: 8 bits
    [8] => Image Height: 840 pixels
    [9] => Image Width: 840 pixels
    [10] => Jpeg Comment: Lavc56.5.100
    [11] => Number of Components: 3
    [12] => Resolution Units: none
    [13] => X Resolution: 1 dot
    [14] => Y Resolution: 1 dot
    [15] => comment: Lavc56.5.100
    [16] => resourceName: ankita2_comp.jpg
    [17] => tiff:BitsPerSample: 8
    [18] => tiff:ImageLength: 840
    [19] => tiff:ImageWidth: 840
    [20] => w:comments: Lavc56.5.100
)

两台服务器上的Java版本相同,如下所示

java version "1.7.0_141"
OpenJDK Runtime Environment (rhel-2.6.10.1.el6_9-x86_64 u141-b02)
OpenJDK 64-Bit Server VM (build 24.141-b02, mixed mode)

另外,该命令不会在新服务器上返回宽度。

任何帮助,将不胜感激。 谢谢。

我已经确定了问题,实际上apkka tikka针对提供的不同文件类型提供了不同的响应格式。

对于JPEG,我们将得到不同的响应,而对于png,我们将得到与上面相同的不同响应。

希望这可以节省将来的时间。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM