Fatal erorr in WP_Customize_Image_Control - php

Fatal error: Uncaught Error: Call to a member function get_setting() on string in C:\xampp\htdocs\wp\wp-includes\class-wp-customize-control.php:237 Stack trace: #0 C:\xampp\htdocs\wp\wp-includes\customize\class-wp-customize-media-control.php(57): WP_Customize_Control->_construct('$wp_customize', 'wp_logo_change...', Array) #1 C:\xampp\htdocs\wp\wp-content\themes\wordpress\functions.php(36): WP_Customize_Media_Control->_construct('$wp_customize', 'wp_logo_change...', Array) #2 C:\xampp\htdocs\wp\wp-includes\class-wp-hook.php(303): WordPress_customizer_register(Object(WP_Customize_Manager)) #3 C:\xampp\htdocs\wp\wp-includes\class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #4 C:\xampp\htdocs\wp\wp-includes\plugin.php(470): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\wp\wp-includes\class-wp-customize-manager.php(933): do_action('customize_regis...', Object(WP_Customize_Manager)) #6 C:\xampp\htdocs\wp\wp-includes\class-wp-hook.php(303): WP_Customize_Manager->wp_loaded('') #7 C:\xampp\htdocs\wp\wp-includes\class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #8 C:\xampp\htdocs\wp\wp-includes\plugin.php(470): WP_Hook->do_action(Array) #9 C:\xampp\htdocs\wp\wp-settings.php(600): do_action('wp_loaded') #10 C:\xampp\htdocs\wp\wp-config.php(96): require_once('C:\xampp\htdocs...') #11 C:\xampp\htdocs\wp\wp-load.php(50): require_once('C:\xampp\htdocs...') #12 C:\xampp\htdocs\wp\wp-admin\admin.php(34): require_once('C:\xampp\htdocs...') #13 C:\xampp\htdocs\wp\wp-admin\customize.php(13): require_once('C:\xampp\htdocs...') #14 {main} thrown in C:\xampp\htdocs\wp\wp-includes\class-wp-customize-control.php on line 237
enter image description here
i am using xampp and get this error .....How can i fix this error.
my code is right below
function WordPress_customizer_register( $wp_customize){
$wp_customize-> add_section('wp_header_area',array(
'title' =>__('Header Area','sajjadalam'),
'description' => 'If you need to update your LOGO,you can change.It is easy',
));
$wp_customize->add_setting('wp_logo_change_setting',array(
'default' => get_bloginfo('template_directory').'/img/logo.png',
));
$wp_customize->add_control(new WP_Customize_Image_Control('$wp_customize','wp_logo_change_setting',array(
'label'=> 'Logo Change',
'setting' => 'wp_logo_change_setting',
'section' => 'wp_header_area',
) ));
}
add_action('customize_register', 'WordPress_customizer_register');

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

swiftmailer and Yii2 not working 1 out of 10 time

I have a background process sending email to me when specific event occur.
It's working most of the time (9 out of 10), but sometime I get the following error message :
PHP Warning 'yii\base\ErrorException' with message 'fwrite(): SSL: An established connection was aborted by the software in your host machine.'
in E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php:232
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'fwrite(): SSL: ...', 'E:\ProgramData\...', 232, Array)
#1 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php(232): fwrite(Resource id #481, 'MAIL FROM:<MTE#...')
#2 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\ByteStream\AbstractFilterableInputStream.php(171): Swift_Transport_StreamBuffer->_commit('MAIL FROM:<MTE#...')
#3 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\ByteStream\AbstractFilterableInputStream.php(90): Swift_ByteStream_AbstractFilterableInputStream->_doWrite('MAIL FROM:<MTE#...')
#4 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(276): Swift_ByteStream_AbstractFilterableInputStream->write('MAIL FROM:<MTE#...')
#5 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\EsmtpTransport.php(243): Swift_Transport_AbstractSmtpTransport->executeCommand('MAIL FROM:<MTE#...', Array, Array)
#6 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\EsmtpTransport.php(322): Swift_Transport_EsmtpTransport->executeCommand('MAIL FROM:<MTE#...', Array)
#7 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(416): Swift_Transport_EsmtpTransport->_doMailFromCommand('MTE#...')
#8 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(444): Swift_Transport_AbstractSmtpTransport->_doMailTransaction(Object(Swift_Message), 'MTE#...', Array, Array)
#9 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php(176): Swift_Transport_AbstractSmtpTransport->_sendTo(Object(Swift_Message), 'MTE#...', Array, Array)
#10 E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Mailer.php(85): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#11 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2-swiftmailer\Mailer.php(146): Swift_Mailer->send(Object(Swift_Message))
#12 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\mail\BaseMailer.php(260): yii\swiftmailer\Mailer->sendMessage(Object(yii\swiftmailer\Message))
#13 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\mail\BaseMessage.php(48): yii\mail\BaseMailer->send(Object(yii\swiftmailer\Message))
#14 E:\ProgramData\htdocs\Yii2_KB\controllers\BackgroundTask.php(172): yii\mail\BaseMessage->send()
#15 E:\ProgramData\htdocs\Yii2_KB\vendor\bazilio\yii2-async\commands\AsyncWorkerCommand.php(29): app\controllers\BackgroundTask->execute()
#16 [internal function]: bazilio\async\commands\AsyncWorkerCommand->actionDaemon('background')
#17 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\base\InlineAction.php(55): call_user_func_array(Array, Array)
#18 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\base\Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#19 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\console\Controller.php(91): yii\base\Controller->runAction('daemon', Array)
#20 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\base\Module.php(455): yii\console\Controller->runAction('daemon', Array)
#21 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\console\Application.php(167): yii\base\Module->runAction('async-worker/da...', Array)
#22 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\console\Application.php(143): yii\console\Application->runAction('async-worker/da...', Array)
#23 E:\ProgramData\htdocs\Yii2_KB\vendor\yiisoft\yii2\base\Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#24 E:\ProgramData\htdocs\Yii2_KB\yii(23): yii\base\Application->run()
#25 {main}
PHP Warning: fwrite(): SSL operation failed with code 1. OpenSSL Error messages:
error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry in E:\ProgramData\htdocs\Yii2_KB\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php on line 232
Here follow my configuration for the mailer :
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'x.x.x.xxx',
'username' => 'xxx',
'password' => 'XyXyXy',
'port' => '25',
'encryption' => 'tls',
],
],
I'm using Yii 2.0.6
PHP Version : 5.5.9
Mail server : Exchange Server 2010
When it fail, it's mostly after a period of inactivity between 2 events ( a few hours).
Any ideas ?
Thanks to ineersa for the tips.
I've added the following code in the beginning of the background process, and now it's working.
if (Yii::$app->mailer->getTransport()->isStarted()) {
Yii::$app->mailer->getTransport()->stop();
}
Yii::$app->mailer->getTransport()->start();

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!

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

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.

Categories