Following the course "Practical Symphony", I came across a strange mistake.
I installed Debian Squeeze on 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 access them using the shared folder function (vmhgfs mount).
Now, when I try to execute the following commands, I get an error message:
php symfony doctrine:build --model php symfony doctrine:build --sql
Mistake:
PHP Parse error: syntax error, unexpected ')' in /var/www/appli/lib/model/doctrine/base/BaseJobeetJob.class.php on line 144
Which is funny when I: - do the same thing without shared folders (for example, on the ext3 partition), it works, - convert the virtual machine to VirtualBox and do the same in the shared folder, it works, - downgrade PHP to 5.2.6 (from lenny), it works.
I remember that I had the same problem some time ago with PHP code created by Smarty. Since it was automatically generated by PHP and can be regenerated at its discretion, I generated it in a local directory. But I do not think this applies to the generated Doctrine files.
Does anyone know what is happening and how can I fix it?
EDIT: here is the code around line 144:
public function setUp() { parent::setUp(); $this->hasOne('JobeetCategory', array( 'local' => 'category_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $timestampable0 = new Doctrine_Template_Timestampable(); $this->actAs($timestampable0); } }
This is actually the end of the file ...
EDIT # 2: for clarity to be verified, I checked the following combinations to narrow down the problem:
- VM Software: VMWare 6.5.5 / VirtualBox 4.0.8 Workstation
- PHP Version: 5.3.3 /5.2.6,
- Mount Type: vmhgfs (or vboxsf with VirtualBox) / ext4 (local) / cifs (also known as the Windows share).
In each case, I use the same source files (but for ext4, because I had no choice but to copy them). I have a crash when combining bold items. If I change any of them, everything will be fine. I also tried using open vm modules instead of the provided vmware tools and building a Debian installation from scratch instead of using my own automated script, but didn't change anything.