title: Warning: getimagesize failed to open stream: No such file or directory
body: <p>Hi i am working on zend framework and trying to crop image after upload and save the cropped image  but i am continuously getting path error. I am working on windows platform. Please someone help me out.
  I am getting this error
  Warning: getimagesize(C:\wamp\www\ModuleEx.com/public/image/) [function.getimagesize]: failed to open stream: No such file or directory in C:\wamp\www\ModuleEx.com\application\modules\admin\controllers\IndexController.php on line 21</p>
  
  <p>Here is my code</p>
  
  <pre><code>public function indexAction()
  {
      if(isset($_FILES["img"]["name"])){
          $names = $_FILES["img"]["name"];
          $tmp = $_FILES["img"]["tmp_name"];
          $upload_dir = "./public/image/".$names;
  
          $move=move_uploaded_file($tmp, "$upload_dir");
  
          $a="/public/image/".$names;
          $this-&gt;view-&gt;a = $upload_dir;
          $b=BASE_PATH."/public/image/".$names;
  
          list($width, $height) = getimagesize($b);
  
          $newwidth = "150"; 
          $newheight = "90";
          $thumb = imagecreatetruecolor($newwidth, $newheight);
          if($_FILES["img"]["type"]=="image/jpeg"){
              $source = imagecreatefromjpeg($b);
              imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width,   $height);
              imagejpeg($thumb,BASE_PATH."/public/image/".$names , 90);
  
          }
      }
  } 
  </code></pre>