title: How to use Minify PHP with YUI compressor?
body: <p>I would like to use YUI compressor with <a href="http://code.google.com/p/minify/" rel="nofollow">minify PHP</a> rather than the default JSmin. Does anyone have experience setting this up?</p>
  
  <p>Right now I am using the groupsConfig.php to combine the JS.</p>
  
  <pre><code>return array(
      'jsAll'  =&gt; array('//contenido/themes/bam/assets/js/jquery.js', '//contenido/themes/bam/assets/js/modernizr.js','//contenido/themes/bam/assets/js/imgpreload.js', '//contenido/themes/bam/assets/js/imgpreload.js', '//contenido/themes/bam/assets/js/history.js','//contenido/themes/bam/assets/js/ajaxify.js', '//contenido/themes/bam/assets/js/isotope.js'),
      'jsHome' =&gt; array('//contenido/themes/bam/assets/js/easing.js','//contenido/themes/bam/assets/js/scrollable.js', '//contenido/themes/bam/assets/js/home.js'),
      'cssAll' =&gt; array('//contenido/themes/bam/bam.css'),
  );
  </code></pre>
  
  <p>As <a href="http://code.google.com/p/minify/" rel="nofollow">it says on the homepage</a>:</p>
  
  <blockquote>
    <p>Uses an enhanced port of Douglas Crockford's JSMin library and custom classes to minify CSS and HTML</p>
  </blockquote>
  
  <p>I have the following code in config.php, but I get a 500 error when trying to view the combined js file:</p>
  
  <pre><code>function yuiJs($js) {
      require_once '/lib/Minify/YUICompressor.php'; 
      Minify_YUICompressor::$jarFile = '/lib/yuicompressor-2.4.2.jar'; 
      Minify_YUICompressor::$tempDir = '/temp'; 
      return Minify_YUICompressor::minifyJs($js); 
  }
  $min_serveOptions['minifiers']['application/x-javascript'] = 'yuiJs';
  </code></pre>
  
  <p>It also appears that there are several lines in lib/Minify/YUICompressor.php that need to be configured, and I'm not sure if I'm doing it right:</p>
  
  <pre><code>class Minify_YUICompressor {
  
      /**
       * Filepath of the YUI Compressor jar file. This must be set before
       * calling minifyJs() or minifyCss().
       *
       * @var string
       */
      public static $jarFile = '../yuicompressor-2.4.2.jar';
  
      /**
       * Writable temp directory. This must be set before calling minifyJs()
       * or minifyCss().
       *
       * @var string
       */
      public static $tempDir = '../../temp/';
  
      /**
       * Filepath of "java" executable (may be needed if not in shell's PATH)
       *
       * @var string
       */
      public static $javaExecutable = 'java';
  </code></pre>