title: Getting an errno 2 when running a PHP script
body: <p>Hope you help me... I've been at this for the past 2 days and have to admit that I'm stumped.</p>
  
  <p>The OS I'm on is Ubuntu 9.10 Karmic.</p>
  
  <p>I successfully installed and tested Mapserver.  For my class project, I have a php script that I am using to create a layer see below....</p>
  
  <p>The error I get when run the script on a cmd line prompt:</p>
  
  <pre><code>Warning: [MapServer Error]: msProcessProjection(): no system list, errno: 2
  
   in /var/www/mapserverdocs/ms4w/apps/world/mapscripts/staticwms.php on line 16
  
  Warning: Failed to open map file static.map in /var/www/mapserverdocs/ms4w/apps/world/mapscripts/staticwms.php on line 16
  
  Fatal error: Call to a member function owsdispatch() on a non-object in /var/www/mapserverdocs/ms4w/apps/world/mapscripts/staticwms.php on line 18
  </code></pre>
  
  <p>PHP SCRIPT:</p>
  
  <pre><code>&lt;?php
  
  if (!extension_loaded("MapScript")) dl("php_mapscript");
  
  $request = ms_newowsrequestobj();
  
  foreach ($_GET as $k=&gt;$v) {
    $request-&gt;setParameter($k, $v);
  }
  
  $request-&gt;setParameter("VeRsIoN","1.0.0");
  
  ms_ioinstallstdouttobuffer();
  
  $oMap = ms_newMapobj("static.map");
  $oMap-&gt;owsdispatch($request);
  
  $contenttype = ms_iostripstdoutbuffercontenttype();
  
  if ($contenttype == 'image/png') {    
    header('Content-type: image/png');
    ms_iogetStdoutBufferBytes();
  } else {
    $buffer = ms_iogetstdoutbufferstring();
    echo $buffer;
  }
  
  ms_ioresethandlers();
  
  ?&gt;
  </code></pre>
  
  <p>I made the directory and files world wide rwx just to make sure it was not a permissions issue</p>
  
  <p>Any help would be greatly appreciated!!</p>
  
  <p>Thanks</p>
  
  <p>Chris</p>