Zend framework 2 : " Connect Error: SQLSTATE[28000] [1045] Access denied" - php

I have been working on the official tutorial for ZF2.
At the end of the page, to see what gives the result, I get this long error:
An error occurred
An error occurred during execution; please try again later.
Additional information:
Zend\Db\Adapter\Exception\RuntimeException
File:
D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Driver\Pdo\Connection.php:243
Message:
Connect Error: SQLSTATE[28000] [1045] Access denied for user ''#'localhost' (using password: NO)
Stack trace:
#0 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Driver\Pdo\Pdo.php(211): Zend\Db\Adapter\Driver\Pdo\Connection->connect()
#1 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Adapter.php(175): Zend\Db\Adapter\Driver\Pdo\Pdo->createStatement(NULL)
#2 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Sql\Sql.php(103): Zend\Db\Adapter\Adapter->createStatement()
#3 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\TableGateway\AbstractTableGateway.php(234): Zend\Db\Sql\Sql->prepareStatementForSqlObject(Object(Zend\Db\Sql\Select))
#4 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\TableGateway\AbstractTableGateway.php(210): Zend\Db\TableGateway\AbstractTableGateway->executeSelect(Object(Zend\Db\Sql\Select))
#5 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\TableGateway\AbstractTableGateway.php(197): Zend\Db\TableGateway\AbstractTableGateway->selectWith(Object(Zend\Db\Sql\Select))
#6 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\module\Album\src\Album\Model\AlbumTable.php(24): Zend\Db\TableGateway\AbstractTableGateway->select()
#7 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\module\Album\src\Album\Controller\AlbumController.php(18): Album\Model\AlbumTable->fetchAll()
#8 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\AbstractActionController.php(87): Album\Controller\AlbumController->indexAction()
#9 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#10 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#11 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(209): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#12 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\AbstractController.php(108): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#14 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#15 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#16 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(209): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#17 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php(298): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#18 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\public\index.php(12): Zend\Mvc\Application->run()
#19 {main}
Previous exceptions:
PDOException
File:
D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Driver\Pdo\Connection.php:239
Message:
SQLSTATE[28000] [1045] Access denied for user ''#'localhost' (using password: NO)
Stack trace:
#0 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Driver\Pdo\Connection.php(239): PDO->__construct('mysql:dbname=zf...', NULL, NULL, Array)
#1 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Driver\Pdo\Pdo.php(211): Zend\Db\Adapter\Driver\Pdo\Connection->connect()
#2 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Adapter\Adapter.php(175): Zend\Db\Adapter\Driver\Pdo\Pdo->createStatement(NULL)
#3 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\Sql\Sql.php(103): Zend\Db\Adapter\Adapter->createStatement()
#4 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\TableGateway\AbstractTableGateway.php(234): Zend\Db\Sql\Sql->prepareStatementForSqlObject(Object(Zend\Db\Sql\Select))
#5 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\TableGateway\AbstractTableGateway.php(210): Zend\Db\TableGateway\AbstractTableGateway->executeSelect(Object(Zend\Db\Sql\Select))
#6 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Db\TableGateway\AbstractTableGateway.php(197): Zend\Db\TableGateway\AbstractTableGateway->selectWith(Object(Zend\Db\Sql\Select))
#7 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\module\Album\src\Album\Model\AlbumTable.php(24): Zend\Db\TableGateway\AbstractTableGateway->select()
#8 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\module\Album\src\Album\Controller\AlbumController.php(18): Album\Model\AlbumTable->fetchAll()
#9 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\AbstractActionController.php(87): Album\Controller\AlbumController->indexAction()
#10 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#11 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#12 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(209): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\AbstractController.php(108): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#15 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#16 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#17 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(209): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#18 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php(298): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#19 D:\softs\UwAmp\www\zf2-tutorial\ZendSkeletonApplication\public\index.php(12): Zend\Mvc\Application->run()
#20 {main}
Can anyone help me on this?

You need put your credentials in a local config file
// config/autoload/local.php:
return array(
'db' => array(
'username' => 'YOUR USERNAME HERE',
'password' => 'YOUR PASSWORD HERE',
),
);

Thank Maks3w, I got the same error because I didn't create local.php file to add the code. I thought that local.php.dist works well.
Everything's great after I have the local.php with the code
// config/autoload/local.php:
return array(
'db' => array(
'username' => 'YOUR USERNAME HERE',
'password' => 'YOUR PASSWORD HERE',
),
);

There is a comment in local.php.dist that helped me to fix it:
// Copy this file without the .dist extension at the end and populate values as needed.

Related

Error include(php.php): failed to open stream: No such file or directory Yii Version 1.1.22 + S3

I'm trying to put/get an s3 object using Yii 1.1.22 and AWS PHP v3 , and when I try to upload an image to s3 I'm getting below error :
include(php.php): failed to open stream: No such file or directory
stack trace
[error] [php] include(php.php): failed to open stream: No such file or directory (/xxxx/framework/yii/framework/YiiBase.php:463)
yii stack trace:
#0 unknown(0): spl_autoload_call()
#1 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(151): method_exists()
#2 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(113): GuzzleHttp\Promise\Promise->settle()
#3 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(203): GuzzleHttp\Promise\Promise->resolve()
#4 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(156): callHandler()
#5 /xxxx/vendors/aws/GuzzleHttp/Promise/TaskQueue.php(47): GuzzleHttp\Promise\{closure}()
#6 /xxxx/vendors/aws/GuzzleHttp/Handler/CurlMultiHandler.php(96): GuzzleHttp\Promise\TaskQueue->run()
#7 /xxxx/vendors/aws/GuzzleHttp/Handler/CurlMultiHandler.php(123): GuzzleHttp\Handler\CurlMultiHandler->tick()
#8 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute()
#9 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn()
#10 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending()
#11 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList()
#12 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#13 /xxxx/vendors/aws/GuzzleHttp/Promise/Coroutine.php(65): GuzzleHttp\Promise\Promise->wait()
#14 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(246): GuzzleHttp\Promise\Coroutine->GuzzleHttp\Promise\{closure}()
#15 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn()
#16 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#17 /xxxx/vendors/aws/GuzzleHttp/Promise/Coroutine.php(85): GuzzleHttp\Promise\Promise->wait()
#18 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(273): GuzzleHttp\Promise\Coroutine->wait()
#19 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList()
#20 /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#21 /xxxx/vendors/aws/Aws/AwsClientTrait.php(59): GuzzleHttp\Promise\Promise->wait()
#22 /xxxx/vendors/aws/Aws/AwsClientTrait.php(78): Aws\S3\S3Client->execute()
#23 /xxxx/protected/extensions/s3/ES3.php(125): Aws\S3\S3Client->__call()
#24 /xxxx/protected/components/Uploader.php(97): ES3->upload()
#25 /xxxx/protected/modules/account/controllers/UserController.php(619): Uploader->upload()
#26 /xxxx/protected/modules/account/controllers/UserController.php(411): UserController->saveUser()
#27 /xxxx/framework/yii/framework/web/actions/CInlineAction.php(49): UserController->actionEditUser()
#28 /xxxx/framework/yii/framework/web/CController.php(308): CInlineAction->runWithParams()
#29 /xxxx/framework/yii/framework/web/CController.php(286): UserController->runAction()
#30 /xxxx/framework/yii/framework/web/CController.php(265): UserController->runActionWithFilters()
#31 /xxxx/framework/yii/framework/web/CWebApplication.php(282): UserController->run()
#32 /xxxx/framework/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()
#33 /xxxx/framework/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#34 /xxxx/index.php(36): CWebApplication->run()
REQUEST_URI=/_pfpg_CVWaHvEhl-5MEij5PiF9oCmnFPK6yNHIX7sqetYnfGY_vcsum=b4b2ef23eeb23074c51a8c6631b491861541198cd0ea11492713cb2cd6bfce10
in /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php (151)
in /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php (113)
in /xxxx/vendors/aws/GuzzleHttp/Promise/Promise.php (203)
I'm using below code to upload :
$result = $s3->putObject([
'Bucket' => '',
'Key' => 'ogo_1070.png ',
]);
and my s3 config is :
$arrS3Config = [
'region' => ( getenv('APPLICATION_ENV') == 'dr' ) ? 'eu-central-1' : 'us-east-1',
'version' => '2006-03-01',
];
Can any one help me how trace this error at least
Thanks

Endless event loop in laravel when artisan queue:work runned

When I run php artisan queue:work I get endless loop of published event which is App\Events\PikirPublished
I couldn't find where I made a mistake. But in my log I saw that it is because of Carbon.
[2017-08-09 14:43:20] local.ERROR: InvalidArgumentException: Unexpected data found.
Unexpected data found.
The separation symbol could not be found
Trailing data in /Users/akmyradov/code/pikirler-desktop/vendor/nesbot/carbon/src/Carbon/Carbon.php:582
Stack trace:
#0 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(709): Carbon\Carbon::createFromFormat('Y-m-d H:i:s', 'Sun, 06 Aug 201...')
#1 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(122): Illuminate\Database\Eloquent\Model->asDateTime('Sun, 06 Aug 201...')
#2 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(84): Illuminate\Database\Eloquent\Model->addDateAttributesToArray(Array)
#3 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(900): Illuminate\Database\Eloquent\Model->attributesToArray()
#4 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(929): Illuminate\Database\Eloquent\Model->toArray()
#5 [internal function]: Illuminate\Database\Eloquent\Model->jsonSerialize()
#6 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php(95): json_encode(Array)
#7 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(48): Illuminate\Broadcasting\Broadcasters\RedisBroadcaster->broadcast(Array, 'App\\Events\\Piki...', Array)
#8 [internal function]: Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\Broadcasters\RedisBroadcaster))
#9 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#10 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#11 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#12 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#13 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#14 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(114): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#15 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#16 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#17 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(42): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Broadcasting\BroadcastEvent), false)
#18 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(69): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#19 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(317): Illuminate\Queue\Jobs\Job->fire()
#20 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(267): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#21 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(113): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#22 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\Queue\Worker->daemon('redis', 'default', Object(Illuminate\Queue\WorkerOptions))
#23 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(84): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'default')
#24 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#25 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#26 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#27 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#28 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#29 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#30 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#31 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#32 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 /Users/akmyradov/code/pikirler-desktop/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 {main}

Laravel (Mandrill/Ajax) email sending on dev not production

I've spent all night trying different things and for the life of me I cannot get my site to send emails. I just deployed my first Laravel project to a live server (digitalocean), yet when on my vagrant dev machine I have no problems sending email, it isn't until I deploy that the problems began.
I know the 500 error is usually due to the CSRF tokens and passing them in your headers, but I am doing that and am still getting an error. I will post the code I assume would be relevant and if anyone can see what the hell I am doing wrong I will forever be in your debt.
MAIL: (Asterix for privacy)
return [
'driver' => 'smtp',
'host' => 'smtp.mandrillapp.com',
'port' => 587,
'from' => array('address' => '********#gmail.com', 'name' => 'Admin'),
'encryption' => 'tls',
'username' => '********#gmail.com',
'password' => '****************',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
];
HomeController #store method for email sending (works on dev)
public function store(ContactFormRequest $request)
{
Mail::send('emails.email', array(
'name' => $request->get('name'),
'email' => $request->get('email'),
'user_message' => $request->get('user_message')
), function($message)
{
$message->from('*********#gmail.com');
$message->to('********#gmail.com', 'Admin')->subject('Client Inquiry');
});
return Response::json(['response' => 200]);
}
AJAX (jQuery)
$('#submit-contact-form').click(function(e) {
e.preventDefault();
$('#submit-contact-form').val('Sending...');
var $form = $(this).parent('form');
var $action = $form.attr('action');
var $data = $form.serialize();
$.ajax({
url: $action,
method: 'POST',
headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') },
data: $data,
success: function(data) {
if (data.response == 200) {
$('#submit-contact-form').val('Thank You For Contacting Us!');
}
}
});
});
Routes.php: (contact form is on my homepage and posts to itself, works on dev)
Route::resource('/', 'HomeController', ['only' => ['index','store']]);
Finally Form: (discovered if posting to root, for the url you have to pass empty string with a space in it
{!! Form::open(array('url' => ' ', 'id' => 'contact-form')) !!}
blah blah blah
{!! Form::close() !!}
I am new to Laravel so i'm still learning, but this one has me stuck especially because it works on dev and not production.
Here is my error log:
[2015-05-14 06:29:01] production.ERROR: exception 'ErrorException' with message 'Missing argument 1 for Illuminate\Support\Manager::createDriver(), called in /var/www/html/kraken/vendor/compiled.php on line 11268 and defined' in /var/www/html/kraken/vendor/compiled.php:11262
Stack trace:
#0 /var/www/html/kraken/vendor/compiled.php(11262): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Missing argumen...', '/var/www/html/k...', 11262, Array)
#1 /var/www/html/kraken/vendor/compiled.php(11268): Illuminate\Support\Manager->createDriver()
#2 /var/www/html/kraken/vendor/compiled.php(11258): Illuminate\Support\Manager->createDriver(NULL)
#3 /var/www/html/kraken/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php(92): Illuminate\Support\Manager->driver()
#4 /var/www/html/kraken/vendor/compiled.php(827): Illuminate\Mail\MailServiceProvider->Illuminate\Mail\{closure}(Object(Illuminate\Foundation\Application))
#5 /var/www/html/kraken/vendor/compiled.php(1027): Illuminate\Container\Container->Illuminate\Container\{closure}(Object(Illuminate\Foundation\Application), Array)
#6 /var/www/html/kraken/vendor/compiled.php(980): Illuminate\Container\Container->build(Object(Closure), Array)
#7 /var/www/html/kraken/vendor/compiled.php(1493): Illuminate\Container\Container->make('swift.mailer', Array)
#8 /var/www/html/kraken/vendor/compiled.php(1213): Illuminate\Foundation\Application->make('swift.mailer')
#9 /var/www/html/kraken/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php(30): Illuminate\Container\Container->offsetGet('swift.mailer')
#10 /var/www/html/kraken/vendor/compiled.php(1027): Illuminate\Mail\MailServiceProvider->Illuminate\Mail\{closure}(Object(Illuminate\Foundation\Application), Array)
#11 /var/www/html/kraken/vendor/compiled.php(980): Illuminate\Container\Container->build(Object(Closure), Array)
#12 /var/www/html/kraken/vendor/compiled.php(1493): Illuminate\Container\Container->make('mailer', Array)
#13 /var/www/html/kraken/vendor/compiled.php(1213): Illuminate\Foundation\Application->make('mailer')
#14 /var/www/html/kraken/vendor/compiled.php(5276): Illuminate\Container\Container->offsetGet('mailer')
#15 /var/www/html/kraken/vendor/compiled.php(5262): Illuminate\Support\Facades\Facade::resolveFacadeInstance('mailer')
#16 /var/www/html/kraken/vendor/compiled.php(5296): Illuminate\Support\Facades\Facade::getFacadeRoot()
#17 /var/www/html/kraken/app/Http/Controllers/HomeController.php(28): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
#18 /var/www/html/kraken/app/Http/Controllers/HomeController.php(28): Illuminate\Support\Facades\Mail::send('emails.email', Array, Object(Closure))
#19 [internal function]: App\Http\Controllers\HomeController->store(Object(App\Http\Requests\ContactFormRequest))
#20 /var/www/html/kraken/vendor/compiled.php(8287): call_user_func_array(Array, Array)
#21 /var/www/html/kraken/vendor/compiled.php(8354): Illuminate\Routing\Controller->callAction('store', Array)
#22 /var/www/html/kraken/vendor/compiled.php(8333): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\HomeController), Object(Illuminate\Routing\Route), 'store')
#23 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#24 /var/www/html/kraken/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#25 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /var/www/html/kraken/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#27 /var/www/html/kraken/vendor/compiled.php(8334): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#28 /var/www/html/kraken/vendor/compiled.php(8320): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\HomeController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'store')
#29 /var/www/html/kraken/vendor/compiled.php(7317): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'store')
#30 /var/www/html/kraken/vendor/compiled.php(7288): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#31 /var/www/html/kraken/vendor/compiled.php(6954): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#32 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#33 /var/www/html/kraken/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#34 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 /var/www/html/kraken/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#36 /var/www/html/kraken/vendor/compiled.php(6955): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#37 /var/www/html/kraken/vendor/compiled.php(6944): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#38 /var/www/html/kraken/vendor/compiled.php(6929): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#39 /var/www/html/kraken/vendor/compiled.php(1935): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#40 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#41 /var/www/html/kraken/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#42 /var/www/html/kraken/vendor/compiled.php(2438): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 /var/www/html/kraken/app/Http/Middleware/VerifyCsrfToken.php(17): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /var/www/html/kraken/vendor/compiled.php(8944): App\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /var/www/html/kraken/vendor/compiled.php(12083): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 /var/www/html/kraken/vendor/compiled.php(8944): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /var/www/html/kraken/vendor/compiled.php(10785): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 /var/www/html/kraken/vendor/compiled.php(8944): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#49 /var/www/html/kraken/vendor/compiled.php(11789): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#50 /var/www/html/kraken/vendor/compiled.php(8944): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 /var/www/html/kraken/vendor/compiled.php(11738): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#52 /var/www/html/kraken/vendor/compiled.php(8944): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 /var/www/html/kraken/vendor/compiled.php(2478): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#54 /var/www/html/kraken/vendor/compiled.php(8944): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 /var/www/html/kraken/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#57 /var/www/html/kraken/vendor/compiled.php(1891): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#58 /var/www/html/kraken/vendor/compiled.php(1880): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#59 /var/www/html/kraken/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#60 {main}
I've already gone to Laracast and posted but didn't get any responses, if anyone can help me I would appreciate it so much, thanks guys.

Login and Register app not working in laravel

I wrote a simple Login/Registration code in laravel with neo4j as DB. I installed vinelab/neoeloquent in my project, created a simple model to store the registration data in neo4j DB:
app/models/Reg.php
<?php
class Reg extends NeoEloquent {
protected $fillable = array('name', 'email', 'password');
public function index($name, $email, $password, $password_confirm) {
$formData = Neo4j::makeNode();
$formData->setProperty('names',$name)
->setProperty('email',$mail)
->setProperty('password',$pword)
->setProprty('password_confirmation',$pword_repeat)
->save();
}
}
Here is my register.blade.php
{{ Form::open(array('route' => 'register.store', 'method' => 'post')) }}
<p>
{{ Form::text('email', '', array('placeholder' => 'Email')) }}
</p>
<p>
{{ Form::password('password', array('placeholder' => 'Password')) }}
</p>
<p>
{{ Form::password('password_confirmation', array('placeholder' => 'Repeat password')) }}
</p>
<p>
{{ Form::text('names', '', array('placeholder' => 'Names')) }}
</p>
<p>
{{ Form::submit('Submit') }}
</p>
{{ Form::close() }}
#foreach ($errors->all() as $error)
<div>
{{ $error }}
</div>
#endforeach
But the data doesn't get stored in neo4j DB. It returns error, like something gone wrong. Even login functionality isn't working:
login.blade.php
{{ Form::open(array('route' => 'login.check', 'method' => 'post')) }}
<p>
{{ Form::text('email', '', array('placeholder' => 'Email')) }}
</p>
<p>
{{ Form::password('password', array('placeholder' => 'Password')) }}
</p>
<p>
{{ Form::submit('Submit') }}
</p>
{{ Form::close() }}
#foreach ($errors->all() as $error)
<div>
{{ $error }}
</div>
#endforeach
Routes.php
<?php
Route::get('register', array(
'as' => 'register.create',
'uses' => 'Register#create'
));
Route::post('register', array(
'as' => 'register.store',
'uses' => 'Register#store'
));
Route::get('login', array(
'as' => 'login.form',
'uses' => 'Login#form'
));
Route::post('login', array(
'as' => 'login.check',
'uses' => 'Login#check'
));
Route::get('logout', array(
'as' => 'logout',
'uses' => 'Login#logout'
));
Route::get('user/home', array(
'as' => 'user.home', function() {
return View::make('home');
}
));
Errors:
[2015-01-28 07:17:17] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php:5738
Stack trace:
#0 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5060): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5048): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5040): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(715): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(696): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#5 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7812): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#6 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8419): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#7 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8366): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#8 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(11029): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#9 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#10 /home/ajay/Desktop/laravelprojects/login-regform/public/index.php(49): Illuminate\Foundation\Application->run()
#11 /home/ajay/Desktop/laravelprojects/login-regform/server.php(19): require_once('/home/ajay/Desk...')
#12 {main} [] []
[2015-01-28 07:17:20] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php:5738
Stack trace:
#0 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5060): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5048): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5040): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(715): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(696): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#5 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7812): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#6 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8419): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#7 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8366): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#8 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(11029): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#9 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#10 /home/ajay/Desktop/laravelprojects/login-regform/public/index.php(49): Illuminate\Foundation\Application->run()
#11 /home/ajay/Desktop/laravelprojects/login-regform/server.php(19): require_once('/home/ajay/Desk...')
#12 {main} [] []
[2015-01-28 07:17:22] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php:5738
Stack trace:
#0 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5060): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5048): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5040): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(715): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(696): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#5 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7812): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#6 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8419): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#7 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8366): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#8 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(11029): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#9 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#10 /home/ajay/Desktop/laravelprojects/login-regform/public/index.php(49): Illuminate\Foundation\Application->run()
#11 /home/ajay/Desktop/laravelprojects/login-regform/server.php(19): require_once('/home/ajay/Desk...')
#12 {main} [] []
[2015-01-28 07:20:32] production.ERROR: exception 'ErrorException' with message 'Argument 3 passed to Illuminate\Database\Query\Builder::__construct() must be an instance of Illuminate\Database\Query\Processors\Processor, null given, called in /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php on line 7013 and defined' in /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:221
Stack trace:
#0 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(221): Illuminate\Exception\Handler->handleError(4096, 'Argument 3 pass...', '/home/ajay/Desk...', 221, Array)
#1 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7013): Illuminate\Database\Query\Builder->__construct(Object(Vinelab\NeoEloquent\Connection), Object(Vinelab\NeoEloquent\Query\Grammars\CypherGrammar), NULL)
#2 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6978): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#3 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6989): Illuminate\Database\Eloquent\Model->newQuery()
#4 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6840): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()
#5 /home/ajay/Desktop/laravelprojects/login-regform/app/controllers/Register.php(25): Illuminate\Database\Eloquent\Model->save()
#6 [internal function]: Register->store()
#7 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#8 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5834): Illuminate\Routing\Controller->callAction('store', Array)
#9 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5822): Illuminate\Routing\ControllerDispatcher->call(Object(Register), Object(Illuminate\Routing\Route), 'store')
#10 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5027): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Register', 'store')
#11 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#12 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5385): call_user_func_array(Object(Closure), Array)
#13 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5052): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#14 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5040): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#15 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(715): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#16 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(696): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#17 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7812): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#18 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8419): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#19 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8366): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#20 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(11029): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#21 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#22 /home/ajay/Desktop/laravelprojects/login-regform/public/index.php(49): Illuminate\Foundation\Application->run()
#23 /home/ajay/Desktop/laravelprojects/login-regform/server.php(19): require_once('/home/ajay/Desk...')
#24 {main} [] []
[2015-01-28 07:33:34] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'syntax error, unexpected 'class' (T_CLASS)' in /home/ajay/Desktop/laravelprojects/login-regform/app/storage/views/03cd328e32fa32d624bfa2a91506be61:5
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
[2015-01-28 07:42:45] production.ERROR: exception 'ErrorException' with message 'Argument 3 passed to Illuminate\Database\Query\Builder::__construct() must be an instance of Illuminate\Database\Query\Processors\Processor, null given, called in /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php on line 7013 and defined' in /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:221
Stack trace:
#0 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(221): Illuminate\Exception\Handler->handleError(4096, 'Argument 3 pass...', '/home/ajay/Desk...', 221, Array)
#1 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7013): Illuminate\Database\Query\Builder->__construct(Object(Vinelab\NeoEloquent\Connection), Object(Vinelab\NeoEloquent\Query\Grammars\CypherGrammar), NULL)
#2 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6978): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#3 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6989): Illuminate\Database\Eloquent\Model->newQuery()
#4 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6840): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()
#5 /home/ajay/Desktop/laravelprojects/login-regform/app/controllers/Register.php(25): Illuminate\Database\Eloquent\Model->save()
#6 [internal function]: Register->store()
#7 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#8 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5834): Illuminate\Routing\Controller->callAction('store', Array)
#9 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5822): Illuminate\Routing\ControllerDispatcher->call(Object(Register), Object(Illuminate\Routing\Route), 'store')
#10 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5027): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Register', 'store')
#11 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#12 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5385): call_user_func_array(Object(Closure), Array)
#13 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5052): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#14 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5040): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#15 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(715): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#16 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(696): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#17 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7812): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#18 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8419): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#19 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8366): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#20 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(11029): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#21 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#22 /home/ajay/Desktop/laravelprojects/login-regform/public/index.php(49): Illuminate\Foundation\Application->run()
#23 /home/ajay/Desktop/laravelprojects/login-regform/server.php(19): require_once('/home/ajay/Desk...')
#24 {main} [] []
[2015-01-28 07:43:16] production.ERROR: exception 'ErrorException' with message 'Argument 3 passed to Illuminate\Database\Query\Builder::__construct() must be an instance of Illuminate\Database\Query\Processors\Processor, null given, called in /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php on line 7013 and defined' in /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:221
Stack trace:
#0 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(221): Illuminate\Exception\Handler->handleError(4096, 'Argument 3 pass...', '/home/ajay/Desk...', 221, Array)
#1 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7013): Illuminate\Database\Query\Builder->__construct(Object(Vinelab\NeoEloquent\Connection), Object(Vinelab\NeoEloquent\Query\Grammars\CypherGrammar), NULL)
#2 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(6978): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#3 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php(87): Illuminate\Database\Eloquent\Model->newQuery()
#4 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Auth/Guard.php(354): Illuminate\Auth\EloquentUserProvider->retrieveByCredentials(Array)
#5 [internal function]: Illuminate\Auth\Guard->attempt(Array)
#6 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8287): call_user_func_array(Array, Array)
#7 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(3259): Illuminate\Support\Manager->__call('attempt', Array)
#8 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(3259): Illuminate\Auth\AuthManager->attempt(Array)
#9 /home/ajay/Desktop/laravelprojects/login-regform/app/controllers/Login.php(15): Illuminate\Support\Facades\Facade::__callStatic('attempt', Array)
#10 /home/ajay/Desktop/laravelprojects/login-regform/app/controllers/Login.php(15): Illuminate\Support\Facades\Auth::attempt(Array)
#11 [internal function]: Login->check()
#12 /home/ajay/Desktop/laravelprojects/login-regform/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#13 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5834): Illuminate\Routing\Controller->callAction('check', Array)
#14 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5822): Illuminate\Routing\ControllerDispatcher->call(Object(Login), Object(Illuminate\Routing\Route), 'check')
#15 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5027): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Login', 'check')
#16 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#17 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5385): call_user_func_array(Object(Closure), Array)
#18 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5052): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#19 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(5040): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#20 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(715): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#21 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(696): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#22 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(7812): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#23 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8419): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#24 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(8366): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#25 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(11029): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#26 /home/ajay/Desktop/laravelprojects/login-regform/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#27 /home/ajay/Desktop/laravelprojects/login-regform/public/index.php(49): Illuminate\Foundation\Application->run()
#28 /home/ajay/Desktop/laravelprojects/login-regform/server.php(19): require_once('/home/ajay/Desk...')
#29 {main} [] []
How can I fix the errors?

Laravel 4 Paypal IPN Not Working TokenMismatchException

I am simply adding a paypal IPN (using the https://github.com/mike182uk/paypal-ipn-listener) to add credits to a users profile and add the order into the database. I actually had this working, but for some reason a day later, I noticed nothing being inserted into the DB and the users credits are not given. All I get in the laravel.log is this huge error log which seems to be all TokenMismatchException.
FYI: I am using the paypal sandbox to do this right now, so not sure if that matters or not, but it's quite slow in responding.
Full error log for that specific call:
[2015-01-12 00:21:15] production.ERROR: exception 'Illuminate\Session\TokenMismatchException' in /home/username/webapps/site_name/app/filters.php:88
Stack trace:
#0 [internal function]: {closure}(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#1 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#2 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Events\Dispatcher->fire('router.filter: ...', Array, true)
#3 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1468): Illuminate\Events\Dispatcher->until('router.filter: ...', Array)
#4 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(240): Illuminate\Routing\Router->callRouteFilter('csrf', Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#5 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Routing\ControllerDispatcher->callFilter(Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#6 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(55): Illuminate\Routing\ControllerDispatcher->before(Object(AuthController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postLogin')
#7 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(962): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'AuthController', 'postLogin')
#8 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#9 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#10 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#11 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#12 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#13 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#14 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#15 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#16 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#17 /home/username/webapps/site_name/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#18 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#19 /home/username/webapps/site_name/public/index.php(49): Illuminate\Foundation\Application->run()
#20 {main} [] []
[2015-01-12 00:21:26] production.ERROR: exception 'Illuminate\Session\TokenMismatchException' in /home/username/webapps/site_name/app/filters.php:88
Stack trace:
#0 [internal function]: {closure}(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#1 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#2 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Events\Dispatcher->fire('router.filter: ...', Array, true)
#3 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1468): Illuminate\Events\Dispatcher->until('router.filter: ...', Array)
#4 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(240): Illuminate\Routing\Router->callRouteFilter('csrf', Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#5 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Routing\ControllerDispatcher->callFilter(Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#6 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(55): Illuminate\Routing\ControllerDispatcher->before(Object(AuthController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postLogin')
#7 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(962): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'AuthController', 'postLogin')
#8 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#9 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#10 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#11 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#12 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#13 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#14 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#15 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#16 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#17 /home/username/webapps/site_name/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#18 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#19 /home/username/webapps/site_name/public/index.php(49): Illuminate\Foundation\Application->run()
#20 {main} [] []
[2015-01-12 00:21:46] production.ERROR: exception 'Illuminate\Session\TokenMismatchException' in /home/username/webapps/site_name/app/filters.php:88
Stack trace:
#0 [internal function]: {closure}(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#1 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#2 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Events\Dispatcher->fire('router.filter: ...', Array, true)
#3 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1468): Illuminate\Events\Dispatcher->until('router.filter: ...', Array)
#4 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(240): Illuminate\Routing\Router->callRouteFilter('csrf', Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#5 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Routing\ControllerDispatcher->callFilter(Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#6 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(55): Illuminate\Routing\ControllerDispatcher->before(Object(AuthController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postLogin')
#7 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(962): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'AuthController', 'postLogin')
#8 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#9 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#10 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#11 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#12 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#13 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#14 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#15 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#16 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#17 /home/username/webapps/site_name/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#18 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#19 /home/username/webapps/site_name/public/index.php(49): Illuminate\Foundation\Application->run()
#20 {main} [] []
[2015-01-12 00:22:10] production.ERROR: exception 'Illuminate\Session\TokenMismatchException' in /home/username/webapps/site_name/app/filters.php:88
Stack trace:
#0 [internal function]: {closure}(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#1 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(199): call_user_func_array(Object(Closure), Array)
#2 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Events\Dispatcher->fire('router.filter: ...', Array, true)
#3 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1468): Illuminate\Events\Dispatcher->until('router.filter: ...', Array)
#4 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(240): Illuminate\Routing\Router->callRouteFilter('csrf', Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#5 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Routing\ControllerDispatcher->callFilter(Array, Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#6 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(55): Illuminate\Routing\ControllerDispatcher->before(Object(AuthController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postLogin')
#7 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(962): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'AuthController', 'postLogin')
#8 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#9 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#10 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#11 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#12 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#13 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#14 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#15 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#16 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#17 /home/username/webapps/site_name/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#18 /home/username/webapps/site_name/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#19 /home/username/webapps/site_name/public/index.php(49): Illuminate\Foundation\Application->run()
#20 {main} [] []
Not even sure what TokenMismatchException has to do with the Paypal IPN since I don't have csrf enabled on the routes for it. Peep the Controller/routes below:
IpnController
use PayPal\Ipn\Listener;
use PayPal\Ipn\Message;
use PayPal\Ipn\Verifier\CurlVerifier;
class IpnController extends BaseController {
/**
* Store a newly created resource in storage.
*
* #return Response
*/
public function store()
{
$listener = new Listener;
$verifier = new CurlVerifier;
$ipnMessage = Message::createFromGlobals(); // uses php://input
$verifier->setIpnMessage($ipnMessage);
if ( Config::get( 'app.debug' ) ) {
$verifier->setEnvironment('sandbox'); // Use sandbox if debug is true
} else {
$verifier->setEnvironment('production');
}
$listener->setVerifier($verifier);
$listener->listen( function() use ( $listener )
{
// on verified IPN (everything is good!)
$resp = $listener->getVerifier()->getVerificationResponse();
$data = Input::all();
$order = new CreditOrder;
$order->txn_id = $data['txn_id'];
$order->payer_email = $data['payer_email'];
$order->user_id = $data['custom'];
$order->product_id = $data['item_number'];
$order->mc_gross = $data['mc_gross'];
$order->save();
$product = Product::find( $data['item_number'] );
$user = User::find( $data['custom'] );
$user->increment( 'credits', $product->credit_amount );
Mail::send( 'emails.credits.thankyou', [ 'username' => $user->username, 'package' => $product->product, 'credits' => $product->credit_amount, 'price' => $product->price ], function( $message ) {
$message->to( 'email#gmail.com', 'Name' )->subject( 'Name - Credits Added!' );
});
},
function() use ( $listener )
{
// on invalid IPN (somethings not right!)
$report = $listener->getReport();
$resp = $listener->getVerifier()->getVerificationResponse();
Log::error('invalid IPN');
Mail::send( 'emails.plain', [ 'content' => $report ], function( $message ) {
$message->to( 'email#gmail.com', 'Name' )->subject( 'Name Invalid IPN' );
});
});
}
public function cancel()
{
return Redirect::route( 'credits.packages' )->with( 'error', 'Your payment was canceled.' );
}
public function success()
{
return View::make( 'credits.success' );
// return Redirect::home()->with( 'success', '<strong>Thank you, '. Auth::user()->username .'!</strong> Your payment was successful and your account has been credited.' );
}
}
IPN Routes
Route::group( [ 'before' => 'auth' ], function()
{
// IPN
Route::post('/credits/ipn', [ 'uses' => 'IpnController#store', 'as' => 'credits.ipn' ] );
Route::get('/credits/cancel', [ 'uses' => 'IpnController#cancel', 'as' => 'credits.cancel' ] );
Route::post('/credits/success', [ 'uses' => 'IpnController#success', 'as' => 'credits.success' ] );
});
If you need me to add any additional info, please let me know. I've been struggling with this for a few days now and really need to get this figured out this week! Appreciate any help :)
Just by taking my IPN routes out of the "before auth" group, it seems to be working fine now?
Someone did mention something about the csrf being enabled by default on post routes. So that could have something to do with it as well. Just in case, I used their suggestion here:
http://laravel.io/forum/01-12-2015-laravel-4-paypal-ipn-not-working-tokenmismatchexception?page=1#reply-19578
All seems to be working now though.
Cheers!

Categories