I'm experincing an annoying issue, which (I think) is caused by a discrepancy between Ubuntu filesystem and Mac OSX filesystem. It seems to be a general problem, which can occur for anybody using Mac OSX, VMware Fusion and Ubuntu as guest.
My setup
- My host is Mac OSX where all source files are located.
- My guest OS is Ubuntu Server (non-gui) where all dev tools and compilers are installed (python, php etc).
- My virtualization software is VMware Fusion.
I couldn't get VMware Tools to work, so I followed these steps, to share files from OSX to Ubuntu: Getting an error trying to set up shared folders on an Ubuntu instance of VMWare Fusion running on OSX
Once again: files are located on OSX, shared to guest (Ubuntu) where PHP can read them.
Case Study
I've done some digging around with the PHP framework Laravel's inbuilt Artisan commands. All of the following commands are run from the Ubuntu (guest)
First time, this will work fine:
php artisan
I can also rebuild the source files just fine:
php artisan dump-autoload
However, as the files have been rebuilt, this no longer works:
php artisan
... and results in this syntax error:
PHP Parse error: syntax error, unexpected 'F' in /mnt/hgfs/www/tmi/api/vendor/composer/autoload_classmap.php on line 1646
The problem disappears if I remount the folder with the source code:
sudo mount /mnt/hgfs/www
Now I can again run the following without problems:
php artisan