oaskedal,
you have BOTH a height and width property in your script...
Just set them to the size (in pixels) that you want, and get rid of the proportion/ration bit.
Here is an example using an image called "angelina.jpg":
<?php
header("Content-type: image/jpg");
$mainImage = imagecreatefromjpeg('angelina.jpg');
$width = 135;
$height = 75;
$mainWidth = imagesx($mainImage);
$mainHeight = imagesy($mainImage);
$image_p = imagecreatetruecolor($width,$height);
imagecopyresampled($image_p,$mainImage,0,0,0,0,$width,$height,$mainWidth,$mainHeight);
imagejpeg($image_p, null, 100);
?>