When running artisan migrate on a Laravel 5 project, it is failing with the following FatalErrorException:
$ artisan migrate -vvv --force
[Symfony\Component\Debug\Exception\FatalErrorException] syntax
error, unexpected '$table' (T_VARIABLE)
How do I get the file and line that is causing the error?
If in anyway relevant, I'm on a Windows 7 x64 machine with WAMP - PHP 5.6 and Laravel Framework version 5.1.10 (LTS).
There might be a semicolon or bracket missing a line
Check all in your migration files.
Laravel is configured to create daily log files for your application
which are stored in the storage/logs directory.
http://laravel.com/docs/5.1/errors#logging
This class Symfony\Component\Debug\Exception\FatalErrorException has some differences compared with the other Exception classes and it is not properly presented by the "error renderers" or "error notifiers".
A New sentry "error notifier" ("getsentry/sentry-php" version >= "2.0") will give you a proper stack trace.
Here is issue where is reported : https://github.com/getsentry/sentry-php/issues/761
Here is the PR for fix : https://github.com/getsentry/sentry-php/pull/763
Related
I was Deplyoying my lumen project to cpanel hosting , i did it as usual same as other person but i keep getting this error
'''
PHP Parse error: syntax error, unexpected '?' in /home/k5169896/public_html/apiFunderAsia/vendor/illuminate/support/Str.php on line 681
'''
This is usually caused by the version of PHP you are using, check the version on your new host, if it is < PHP 7.2 which is the minimum requirement for Lumen then it causes this issue.
Trying to Rollback but its giving me error that class'task' not found. Can someone please tell me why I am getting that error,
I also tried to remove the schema drop line but still its giving the same error
In your command line run:
composer dump-autoload
I have a shared hosting at iPage. I did the steps listed here : Deploy Laravel 5 using only FTP in a shared hosting (Moving files, editing htaccess) and yet still facing the same 500 error :
20161126T060216: bluepenlabs.com/projects/peugeot/public/index.php PHP
Warning:
require(/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/bootstrap/autoload.php):
failed to open stream: No such file or directory in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/index.php
on line 22 PHP Fatal error: require(): Failed opening required
'/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/bootstrap/autoload.php'
(include_path='.:/usr/local/lib/php-5.5.22-amd64/lib/php') in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/ 20161126T061559:
bluepenlabs.com/projects/peugeot/public/index.php
PHP Parse error:
syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE)
in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
on line 475
20161126T061939: bluepenlabs.com/projects/peugeot/public/index.php PHP
Parse error: syntax error, unexpected '.', expecting '&' or variable
(T_VARIABLE) in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
on line 475
Note that i'm trying to install the laravel project in a subdirectory /projects/peugeot/
Thank you
I once hosted a laravel project on iPage(shared hosting). I faced 500 errors. Not showing much description.
This may be because of the Laravel 5.3 min server requirements.
Ipage hosting site normally give a version below the min requirement. You need to change the setting on your Control Panel. Try upgrading your PHP version.
Hope this helps.
I need to solve the below issue:
When I tried to hosting codeIgniter framework to my online server, this error occurred.
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/lviscomp/public_html/system/core/Output.php:528)
Filename: core/Common.php
Line Number: 573
Backtrace:
A PHP Error was encountered
Severity: Error
Message: XCache: Cannot init
Filename: Unknown
Line Number: 0
Backtrace:
I had the same xcache issue in my Laravel application. I resolved it by upgrading the PHP version.
I think this might help you as well.
Go to your cPanel
Go to software section and click "select PHP version"
Change your PHP version from "native" to 5.4 or 5.5 (It will give you a list of drivers with checkboxes)
Select Xcache and enable it
Save your settings as well as PHP version
I hope it will work.
For Above Error header information already sent...
Click here!
XCache: Cannot init
Try Disable XCACHE from the Php configuration..
if this doesn't work ..
I think this is a question for your host.
I am having a problem with running commands via cli doctrine-cli.php file. I am using Doctrine 2 and Codeigniter 2. I would like to generate entities via Command Line Tool, but without success. Page is hosted by Hostgator. On this server is installed by default PHP version 5.2, but you can use PHP version 5.3 by adding some commands to .htaccess file located in root.
In the Command Line Tool I get this error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
Parse error: syntax error, unexpected T_STRING in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
If I run a file with PHP version via url, I get PHP version 5.3, but if I run the same file via Command Line Tool, I get php version 5.2. Why is that so?
Is there any solution for that?
Regards, Mario
I have a solution. As already #KeesSchepers said, there was a problem that in command line there was default 5.2.17 PHP version. I solved that simply, I just added prefix /opt/php53/bin/php to all doctrine2 commands, example:
/opt/php53/bin/php doctrine-cli.php orm:...
Thank you guys!