php artisan optimize results in Symfony parse error unexpected EoF
forge@indigo-lagoon:~/anps$ composer update --verbose
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 0.092 seconds
Analyzed 7560 packages to resolve dependencies
Analyzed 61419 rules to resolve dependencies
Nothing to install or update
Dependency resolution completed in 0.000 seconds
Generating optimized autoload files
> post-update-cmd: Illuminate\Foundation\ComposerScripts::postUpdate
> post-update-cmd: php artisan optimize
[Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected end of file
Script php artisan optimize handling the post-update-cmd event returned with error code 1
forge@indigo-lagoon:~/anps$
My app is working perfectly fine, so I'm not sure what this error is in relation to. There is no kind of line or file specified.
furthermore, the 'php artisan optimize' runs fine on my local machine, but my forge server has issues.
Ok posting my solution so everyone else can know!
I believe the error was caused by not having php short open tags enabled in php.ini on the server that was throwing the error.
I had used short tags to echo out debug msgs and somehow that was making php artisan choke.
Once i removed the short open tags, the 'php artisan optimize' ran without issues on the problem server.
Please or to participate in this conversation.