<html>
  <head>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">We are using an openlayers frontend
      to utilize mapserver via phpmapscript to read some colorized tif
      files we have made, and then render a png file on a webpage via
      gdal.<span style="mso-spacerun:yes">&nbsp; </span>This process seems
      to work about 95% of the time, The other 5%, we are getting no
      images and errors kicked out to the httpd error log. Based on the
      errors below, it seems to be occurring when mapserver issues the
      $map-&gt;draw() command, and kicks out some GDAL errors.<span
        style="mso-spacerun:yes">&nbsp; </span>When this happens, there is
      no png image that gets created. Ive included the following
      directives in the map file to help with debugging CONFIG
      "CPL_DEBUG" "ON", and<span style="mso-spacerun:yes">&nbsp; </span>CONFIG




      "MS_ERRORFILE" = /home/logfile</span><span
      style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p></o:p>Any help on what may be
      happening here?<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <b style="mso-bidi-font-weight:normal"><span style="font-size:
        12pt;">When it succeeds I see a message like this in the httpd
        error logs:</span><span style="font-size:12.0pt;
        font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><o:p></o:p></span></b><b>
    </b><br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">GDAL:
      GDALOpen(/home/cache/2012021913-2012022013.tif,
      this=0x2b5e6a5abda0) succeeds as GTiff<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <b style="mso-bidi-font-weight:normal"><span style="font-size:
        12pt;">When it fails, I see a string of errors, such as:</span><span
        style="font-size:12.0pt; font-family:&quot;Times New
        Roman&quot;,&quot;serif&quot;"><o:p></o:p></span></b><b> </b><br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">GDAL:
      GDALClose(/home/cache/2012021913-2012022013.tif,
      this=0x2b5e6fd12890)<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[Mon Feb 20 14:41:18 2012] [error]
      [client xxx.xxx.xxx.xxx] PHP Warning:<span
        style="mso-spacerun:yes">&nbsp; </span>[MapServer Error]:
      msDrawMap(): Failed to draw layer named 'map_data'.\n in
      /home/www/testmscross.php on line 231<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[Mon Feb 20 14:41:18 2012] [error]
      [client xxx.xxx.xxx.xxx] PHP Warning:<span
        style="mso-spacerun:yes">&nbsp; </span>[MapServer Error]:
      GetBlockRef failed at X block offset 0, Y block offset 0:
      GDALDatasetRasterIO() failed: drawGDAL()\n in
      /home/www/testmscross.php on line 231<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[Mon Feb 20 14:41:18 2012] [error]
      [client xxx.xxx.xxx.xxx] PHP Warning:<span
        style="mso-spacerun:yes">&nbsp; </span>[MapServer Error]:
      msDrawMap(): Failed to draw layer named 'map_data'.\n in
      /home/www/testmscross.php on line 231<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[Mon Feb 20 14:41:18 2012] [error]
      [client xxx.xxx.xxx.xxx] PHP Warning:<span
        style="mso-spacerun:yes">&nbsp; </span>[MapServer Error]:
      GetBlockRef failed at X block offset 0, Y block offset 0:
      GDALDatasetRasterIO() failed: drawGDAL()\n in
      /home/www/testmscross.php on line 231<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[Mon Feb 20 14:41:18 2012] [error]
      [client xxx.xxx.xxx.xxx] PHP Fatal error:<span
        style="mso-spacerun:yes">&nbsp; </span>Call to a member function
      saveImage() on a non-object in /home/www/testmscross.php on line
      270<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <b style="mso-bidi-font-weight:normal"><span
        style="font-size:12.0pt; font-family:&quot;Times New
        Roman&quot;,&quot;serif&quot;">gdalinfo on the tiff files yields</span></b><span
      style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><b>:</b><o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Driver: GTiff/GeoTIFFC<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Files:
      /home/cache/2012021913-2012022013.tif<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Size is 181, 132<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Coordinate System is `'<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Origin =
      (2172891.879999999888241,-5178906.330000000074506)<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Pixel Size =
      (4772.703535911604376,-4764.676212121210483)<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Image Structure Metadata:<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><span style="mso-spacerun:yes">&nbsp; </span>INTERLEAVE=PIXEL<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Corner Coordinates:<o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Upper Left<span
        style="mso-spacerun:yes">&nbsp; </span>( 2172891.880,-5178906.330) <o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Lower Left<span
        style="mso-spacerun:yes">&nbsp; </span>( 2172891.880,-5807843.590) <o:p></o:p></span>
    <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Upper Right (
      3036751.220,-5178906.330) <o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Lower Right (
      3036751.220,-5807843.590) <o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Center<span
        style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(
      2604821.550,-5493374.960) <o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Band 1 Block=181x15 Type=Byte,
      ColorInterp=Red<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><span style="mso-spacerun:yes">&nbsp; </span>NoData


      Value=-1<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Band 2 Block=181x15 Type=Byte,
      ColorInterp=Green<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><span style="mso-spacerun:yes">&nbsp; </span>NoData


      Value=-1<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">Band 3 Block=181x15 Type=Byte,
      ColorInterp=Blue<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><span style="mso-spacerun:yes">&nbsp; </span>NoData


      Value=-1<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <b style="mso-bidi-font-weight:normal"><span style="font-size:
        12pt;">and mapserv -v yields:</span><span
        style="font-size:12.0pt; font-family:&quot;Times New
        Roman&quot;,&quot;serif&quot;"><o:p></o:p></span></b><b> </b><br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">MapServer version 5.6.7 OUTPUT=GIF
      OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ
      SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
      SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
      SUPPORTS=WCS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=OGR
      INPUT=GDAL INPUT=MYGIS INPUT=SHAPEFILE<o:p></o:p></span> <br>
    <span style="font-size:12.0pt;font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <b style="mso-bidi-font-weight:normal"><span style="font-size:
        12pt;">Mapserver compiled with:</span><span
        style="font-size:12.0pt; font-family:&quot;Times New
        Roman&quot;,&quot;serif&quot;"><o:p></o:p></span></b><b> </b><br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">./configure --with-zlib --with-png
      --with-jpeg --with-gd --with-proj --with-threads
      --with-ogr=/usr/local/gdal-config
      --with-gdal=/usr/local/gdal-config --with-tiff --with-mygis
      --with-wfs --with-wcs --with-wmsclient --with-wfsclient
      --with-httpd=/usr/sbin/httpd --with-php=/usr/include/php<o:p></o:p></span>
    <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <b style="mso-bidi-font-weight:normal"><span style="">gdal
        information:</span><span style="font-family:&quot;Times New
        Roman&quot;,&quot;serif&quot;"><o:p></o:p></span></b><b> </b><br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[root]#./gdal-config &#8211;version<o:p></o:p></span>
    <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">1.7.3<o:p></o:p></span> <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[root]# ./gdal-config --dep-libs
      --version<o:p></o:p></span> <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">-L/usr/local/lib -lgeos_c
      -L/usr/lib -lsqlite3 -L/usr/lib64 -L/usr/lib64/lib -lodbc
      -lodbcinst -L/usr/lib64 -L/usr/lib64/lib -lgif -L/usr/lib64
      -L/usr/lib64/lib -ljpeg -L/usr/lib64/lib -ltiff -L/usr/lib64
      -L/usr/lib64/lib -lpng -L/usr/local/ -L/usr/local//lib -lnetcdf
      -L/usr/local/lib -L/usr/local/lib/lib -lcfitsio -lz -L/usr/lib64/
      -L/usr/lib64//lib -lm -lrt -ldl -L/usr/kerberos/lib64 -lcurl -ldl
      -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz
      -rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
      -L/usr/lib64 -lssl &#8211;lcrypto<o:p></o:p></span> <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span> <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">[root]# ./gdal-config --formats<o:p></o:p></span>
    <br>
    <span style="font-family:&quot;Times New
      Roman&quot;,&quot;serif&quot;">gxf gtiff hfa aigrid aaigrid ceos
      ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt
      usgsdem l1b nitf bmp pcidsk airsar rs2 ilwis rmf leveller sgi
      srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg
      coasp tsx terragen blx msgn til r northwood saga wcs wms grib bsb
      gif jpeg png netcdf pcraster fits rik rasterlite<o:p></o:p></span><br>
    <meta name="ProgId" content="Word.Document">
    <meta name="Generator" content="Microsoft Word 12">
    <meta name="Originator" content="Microsoft Word 12">
    <link rel="File-List"
href="file:///C:%5Cusers%5Ccrossover%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml">
    <link rel="themeData"
href="file:///C:%5Cusers%5Ccrossover%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx">
    <link rel="colorSchemeMapping"
href="file:///C:%5Cusers%5Ccrossover%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml">
    <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;
        mso-font-charset:0;
        mso-generic-font-family:roman;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-unhide:no;
        mso-style-qformat:yes;
        mso-style-parent:"";
        margin-top:0in;
        margin-right:0in;
        margin-bottom:10.0pt;
        margin-left:0in;
        line-height:115%;
        mso-pagination:widow-orphan;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-default-props:yes;
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
        {mso-style-type:export-only;
        margin-bottom:10.0pt;
        line-height:115%;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
  </body>
</html>