title: Weird PHP Parse/Syntax errors with VMWare 6.5 + PHP 5.3.3 + Symfony 1.4
body: <p>While following the "Practical Symfony" course, I have run in a strange error.</p>
  
  <p>I have installed a Debian Squeeze in a VMWare 6.5.5 machine. It comes with PHP 5.3.3 and I am using Symfony 1.4. The source files are on the host, I am accessing them using the shared folder feature (vmhgfs mount).</p>
  
  <p>Now, when I try the following commands, I get an error:</p>
  
  <pre><code>php symfony doctrine:build --model    
  php symfony doctrine:build --sql
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>PHP Parse error:  syntax error, unexpected ')' in /var/www/appli/lib/model/doctrine/base/BaseJobeetJob.class.php on line 144
  </code></pre>
  
  <p>What is funny is that when I :
  - do the same thing without the shared folders (e.g. on a ext3 partition), it works,
  - convert the VM to VirtualBox and do the same thing on a shared folder, it works,
  - downgrade the PHP to 5.2.6 (from lenny), it works.</p>
  
  <p>I remember having the same kind of issue some time ago with the PHP code generated by Smarty. As it was automatically generated PHP and could be regenerated at will, I had it generated in a local direcorty. But I do not think this is applicable to Doctrine generated files.</p>
  
  <p>Does anyone have any clue of what is happening and how I could fix it ?</p>
  
  <p>EDIT: here is the code around line 144:</p>
  
  <pre><code>    public function setUp()
      {
          parent::setUp();
          $this-&gt;hasOne('JobeetCategory', array(
               'local' =&gt; 'category_id',
               'foreign' =&gt; 'id',
               'onDelete' =&gt; 'CASCADE'));
  
          $timestampable0 = new Doctrine_Template_Timestampable();
          $this-&gt;actAs($timestampable0);
      }
  } // Line 144 here.
  </code></pre>
  
  <p>It is actually the end of the file...</p>
  
  <p>EDIT #2: to make it clear I have tested the following combinations in order to narrow down the issue:</p>
  
  <ul>
  <li>VM software : <strong>VMWare Workstation
  6.5.5</strong> / VirtualBox 4.0.8</li>
  <li>PHP version: <strong>5.3.3</strong> / 5.2.6, </li>
  <li>Mount type : <strong>vmhgfs</strong> (or vboxsf with VirtualBox) / ext4 (local)
  / cifs (aka Windows share).</li>
  </ul>
  
  <p>In every case I am using the very same source files (but for ext4 because I had no other choice than to copy them). I have a failure when combining the bold items. If I change any one of them, everything goes fine. I also tried to use the open-vm-modules in place of the provided vmware tools and to build a Debian installation from scratch instead of using my own automated script but neither has changed anything.</p>