I am following a tutorial and my screen turned blank with no error messages. I looked in laravel.log and got this errors, but am unsure how to fix it.
Here is the error from the log file.
2017-04-10 14:30:40] local.ERROR: Symfony\Component\Console\Exception\RuntimeException: The "--resources" option does not exist. in /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Input/ArgvInput.php:219
Stack trace:
#0 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Input/ArgvInput.php(155): Symfony\Component\Console\Input\ArgvInput->addLongOption('resources', NULL)
#1 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Input/ArgvInput.php(84): Symfony\Component\Console\Input\ArgvInput->parseLongOption('--resources')
#2 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Input/Input.php(63): Symfony\Component\Console\Input\ArgvInput->parse()
#3 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Command/Command.php(220): Symfony\Component\Console\Input\Input->bind(Object(Symfony\Component\Console\Input\InputDefinition))
#4 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/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))
#5 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Application.php(826): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Application.php(190): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Routing\Console\ControllerMakeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/symfony/console/Application.php(121): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(123): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /Users/aaronmk2/Desktop/CodingDojo/php/Todos/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 {main}
From the log file the error is telling you that the --resources option does not exists on the command php artisan make:controller.
You have to call that command with the option --resource (singular one), i.e.:
php artisan make:controller PhotoController --resource
Related
Hi every one I am currently working on laravel 5.8 and recently installed spatie/laravel-backup package to backup my files and db and i did all the steps which are needed to use the package but when I run the command
php artisan backup:run it gives many errors as below
Starting backup... Dumping database u452010341_qkcg... Backup failed
because The dump process failed with exitcode 1 : General error :
'"mysqldump"' is not recognized as an internal or external command,
operable program or batch file.
#0 C:\xampp\htdocs\b\vendor\spatie\db-dumper\src\DbDumper.php(246): Spatie\DbDumper\Exceptions\DumpFailed::processDidNotEndSuccessfully(Object(Symfony\Component\Process\Process))
#1 C:\xampp\htdocs\b\vendor\spatie\db-dumper\src\Databases\MySql.php(190): Spatie\DbDumper\DbDumper->checkIfDumpWasSuccessFul(Object(Symfony\Component\Process\Process), 'C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\b\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(250): Spatie\DbDumper\Databases\MySql->dumpToFile('C:\\xampp\\htdocs...')
#3 [internal function]: Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup\{closure}(Object(Spatie\DbDumper\Databases\MySql), 'mysql')
#4 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Support\Collection.php(1120): array_map(Object(Closure), Array, Array)
#5 C:\xampp\htdocs\b\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(253): Illuminate\Support\Collection->map(Object(Closure))
#6 C:\xampp\htdocs\b\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(167): Spatie\Backup\Tasks\Backup\BackupJob->dumpDatabases()
#7 C:\xampp\htdocs\b\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(143): Spatie\Backup\Tasks\Backup\BackupJob->createBackupManifest()
#8 C:\xampp\htdocs\b\vendor\spatie\laravel-backup\src\Commands\BackupCommand.php(52): Spatie\Backup\Tasks\Backup\BackupJob->run()
#9 [internal function]: Spatie\Backup\Commands\BackupCommand->handle()
#10 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(32): call_user_func_array(Array, Array)
#11 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(90): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#12 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Container\Container.php(576): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Console\Command.php(183): Illuminate\Container\Container->call(Array)
#15 C:\xampp\htdocs\b\vendor\symfony\console\Command\Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#16 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Console\Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 C:\xampp\htdocs\b\vendor\spatie\laravel-backup\src\Commands\BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 C:\xampp\htdocs\b\vendor\symfony\console\Application.php(1012): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\xampp\htdocs\b\vendor\symfony\console\Application.php(272): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 C:\xampp\htdocs\b\vendor\symfony\console\Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Console\Application.php(90): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 C:\xampp\htdocs\b\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(133): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 C:\xampp\htdocs\b\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 {main}
Backup failed because: The dump process failed with exitcode 1 : General error : '"mysqldump"' is not recognized as an internal or external command,
operable program or batch file.
I searched for solutions and found the code below:
'connections' => [
'mysql' => [
'driver' => 'mysql'
...,
'dump' => [
'dump_binary_path' => '/path/to/the/binary', // only the path, so without `mysqldump` or `pg_dump`
'use_single_transaction',
'timeout' => 60 * 5, // 5 minute timeout
'exclude_tables' =>['table1', 'table2'],`enter code here`
'add_extra_option' =>'--optionname=optionvalue',
]
],
But still I'm getting same error... I tried more than 100times, still nothing.
So any one who gone through this problem or any body who knows how to solve this please help me out.
in the code you found, where says:
'dump_binary_path' => '/path/to/the/binary',
Change to:
'dump_binary_path' => 'C:\xampp\mysql\bin',
Next time, look to the errors because int his case, the problem is well described!
Regards
Now you also need to comment this line:
//'add_extra_option' =>'--optionname=optionvalue',
working for me.
Recently I've upgraded Laravel from 5.8 to 6.0 and made some adjusts to make it running smoothly.
In my local environment, it works fine. But when I publish in my server, when I try to send some notifications (mail and broadcast) I receive the following error:
ErrorException: Undefined property: Illuminate\Notifications\ChannelManager::$container in /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php:53
Stack trace:
#0 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(53): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined prope...', '/var/www/vialoc...', 53, Array)
#1 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php(73): Illuminate\Notifications\ChannelManager->sendNow(Object(App\Models\User), Object(App\Notifications\UserConfirmationNotification), Array)
#2 [internal function]: Illuminate\Notifications\SendQueuedNotifications->handle(Object(Illuminate\Notifications\ChannelManager))
#3 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#4 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#5 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/Container.php(580): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#8 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#9 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#10 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#11 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Notifications\SendQueuedNotifications), false)
#12 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#13 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#14 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Notifications\SendQueuedNotifications))
#16 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(88): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#17 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(327): Illuminate\Queue\Jobs\Job->fire()
#18 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(277): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#19 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(118): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#20 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(102): Illuminate\Queue\Worker->daemon('redis', 'vialoc-api,defa...', Object(Illuminate\Queue\WorkerOptions))
#21 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(86): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'vialoc-api,defa...')
#22 [internal function]: Illuminate\Queue\Console\WorkCommand->handle()
#23 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#24 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#25 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#26 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Container/Container.php(580): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#27 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
#28 /var/www/vialoc_api/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#29 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#30 /var/www/vialoc_api/vendor/symfony/console/Application.php(908): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#31 /var/www/vialoc_api/vendor/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 /var/www/vialoc_api/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Console/Application.php(90): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /var/www/vialoc_api/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /var/www/vialoc_api/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 {main}
And one note: To upgrade to Laravel 6 on my server, I needed to upgrade to PHP 7.2. I've done this and I think there is some PHP module missing. But I'm stuck to resolve this issue.
To notifications, I'm using Redis for Queue. And I've tried to sent the emails through mailtrap and mailgun, but the response is the same.
Please someone can help me? Tks a lot in advance.
I've discovered the problem.
My queue was being managed by a supervisor process. And with the upgrade and the code change, the process didn't update the code being processed.
When I ran the following command:
sudo supervisorctl restart all
Everything starts working again.
Running composer install on your server should list any missing modules.
I am trying to setup coveralls with Travis and I have a source_files must be set error
$ php coveralls.phar -v
Load coverage clover log:
- /home/travis/build/Toolwatchapp/tw-backend/application/tests/build/logs/clover.xml
Collect git info
Read environment variables
source_files must be set
#0 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFile.php(154): Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile->ensureJobs()
#1 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/src/Satooshi/Bundle/CoverallsV1Bundle/Api/Jobs.php(98): Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile->fillJobs(Array)
#2 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/src/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepository.php(123): Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs->collectEnvVars(Array)
#3 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/src/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepository.php(66): Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository->collectEnvVars()
#4 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php(161): Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository->persist()
#5 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php(114): Satooshi\Bundle\CoverallsV1Bundle\Command\CoverallsV1JobsCommand->executeApi(Object(Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration))
#6 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/vendor/symfony/console/Command/Command.php(259): Satooshi\Bundle\CoverallsV1Bundle\Command\CoverallsV1JobsCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/vendor/symfony/console/Application.php(840): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(Satooshi\Bundle\CoverallsV1Bundle\Command\CoverallsV1JobsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/vendor/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 phar:///home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar/bin/coveralls(21): Symfony\Component\Console\Application->run()
#11 /home/travis/build/Toolwatchapp/tw-backend/application/tests/coveralls.phar(12): require('phar:///home/tr...')
#12 {main}
The build is here https://travis-ci.org/Toolwatchapp/tw-backend/builds/174537515 and the commit built is here https://github.com/Toolwatchapp/tw-backend/tree/1220893cdce17553ab98ffc28efd028108ec770c
Thanks,
M.
It is likely that the root_dir is off
Judging from this discussion this is the possible reason of the problem.
Try specifying the correct root_dir according to the docs.
I am running php 5.5 on a Windows Server 2008. I am using the Laravel 4.0 framework for the application. I am connecting to a SQL SRV database via PDO, when executed via http there is no issue, connections are made data is called and updated without issue.
However when calling a command from Artisan (Laravel's CLI tool) I get the following error in the log:
log.ERROR: exception 'PDOException' with message 'could not find driver' in C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:47
Stack trace:
#0 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php(47): PDO->__construct('sqlsrv:Server=H...', 'xxxxxx', 'xxxxxx', Array)
#1 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\Connectors\SqlServerConnector.php(29): Illuminate\Database\Connectors\Connector->createConnection('sqlsrv:Server=H...', Array, Array)
#2 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\Connectors\ConnectionFactory.php(41): Illuminate\Database\Connectors\SqlServerConnector->connect(Array)
#3 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php(128): Illuminate\Database\Connectors\ConnectionFactory->make(Array, 'sqlsrv')
#4 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php(64): Illuminate\Database\DatabaseManager->makeConnection('sqlsrv')
#5 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php(242): Illuminate\Database\DatabaseManager->connection()
#6 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(206): Illuminate\Database\DatabaseManager->__call('table', Array)
#7 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(206): Illuminate\Database\DatabaseManager->table('bb_job_details')
#8 C:\inetpub\MBSWeb\postsrch\app\models\Job.php(214): Illuminate\Support\Facades\Facade::__callStatic('table', Array)
#9 C:\inetpub\MBSWeb\postsrch\app\models\Job.php(214): Illuminate\Support\Facades\DB::table('bb_job_details')
#10 C:\inetpub\MBSWeb\postsrch\app\models\Cron.php(18): Job::getJobDetailsByStatus()
#11 C:\inetpub\MBSWeb\postsrch\app\controllers\ApplicantController.php(14): Cron::ChangePostingJobStatus()
#12 C:\inetpub\MBSWeb\postsrch\app\commands\GetApplicantsCommand.php(45): ApplicantController->index()
#13 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Console\Command.php(108): GetApplicantsCommand->fire()
#14 C:\inetpub\MBSWeb\postsrch\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(244): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 C:\inetpub\MBSWeb\postsrch\vendor\laravel\framework\src\Illuminate\Console\Command.php(96): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 C:\inetpub\MBSWeb\postsrch\vendor\symfony\console\Symfony\Component\Console\Application.php(897): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 C:\inetpub\MBSWeb\postsrch\vendor\symfony\console\Symfony\Component\Console\Application.php(191): Symfony\Component\Console\Application->doRunCommand(Object(GetApplicantsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 C:\inetpub\MBSWeb\postsrch\vendor\symfony\console\Symfony\Component\Console\Application.php(121): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 C:\inetpub\MBSWeb\postsrch\artisan(59): Symfony\Component\Console\Application->run()
#20 {main} [] []
[2014-03-23 22:53:13] log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined function Symfony\Component\Console\mb_detect_encoding()' in C:\inetpub\MBSWeb\postsrch\vendor\symfony\console\Symfony\Component\Console\Application.php:721
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
The PDO SQLSRV lib is installed, see the below screenshot of the phpinfo(), and as I've already said I can connection without issue when using the application via http;
Why is the PDO connection working fine via http but not in CLI? Please note I'm using the exact same set of code, one is called from a Laravel controller, the other from a Laravel command.
php cli and php cgi use different php.ini files. Try php -i | grep pdo to see if pdo is installed for your cli, see php -i | grep "Loaded Configuration File"
The answer above is correct, but just to clarify:
Open your console and execute:
php -i | grep "Loaded Configuration File"
That will give you the folder directory where you php-cli.ini is (Laravel Commands use a different php.ini than the one used by HTTP requests)
Go to that file, and make sure it has this:
extension=php_pdo_mysql.dll
Restart your server and try again. That worked for me, hope it helps.
I wrote a simple script to download some .JPG files and reupload them to Amazon S3. It works almost every time but every once in a while I'm getting the error:
[Guzzle\Http\Exception\RequestException]
Error completing request
Since the error doesn't tell me much, where would I find more information as to what is causing the error. I don't even know if it is in the downloading of my files from the FTP server, the renaming, or the uploading to S3. Very confused on this error.
EDIT
Following the advice below, I added in the catch portion but I'm not sure what that's telling me exactly. This script is downloading jpg's and then uploading them to Amazon S3. Here's what the Catch is providing:
#0 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(378): Guzzle\Http\Message\Request->processResponse(Array)
#1 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php(49): Guzzle\Http\Message\Request->setState('complete', Array)
#2 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(286): Guzzle\Http\Message\EntityEnclosingRequest->setState('complete', Array)
#3 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(244): Guzzle\Http\Curl\CurlMulti->processResponse(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Curl\CurlHandle), Array)
#4 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(227): Guzzle\Http\Curl\CurlMulti->processMessages()
#5 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(211): Guzzle\Http\Curl\CurlMulti->executeHandles()
#6 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(105): Guzzle\Http\Curl\CurlMulti->perform()
#7 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php(91): Guzzle\Http\Curl\CurlMulti->send()
#8 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php(282): Guzzle\Http\Curl\CurlMultiProxy->send()
#9 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/aws/aws-sdk-php/src/Aws/Common/Client/AbstractClient.php(284): Guzzle\Http\Client->send(Object(Guzzle\Http\Message\EntityEnclosingRequest))
#10 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php(136): Aws\Common\Client\AbstractClient->send(Object(Guzzle\Http\Message\EntityEnclosingRequest))
#11 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php(153): Guzzle\Service\Client->execute(Object(Aws\S3\Command\S3Command))
#12 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php(189): Guzzle\Service\Command\AbstractCommand->execute()
#13 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php(76): Guzzle\Service\Command\AbstractCommand->getResult()
#14 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/aws/aws-sdk-php/src/Aws/Common/Client/AbstractClient.php(105): Guzzle\Service\Client->__call('PutObject', Array)
#15 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/app/commands/ProcessListings.php(156): Aws\Common\Client\AbstractClient->__call('putObject', Array)
#16 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/app/commands/ProcessListings.php(156): Aws\S3\S3Client->putObject(Array)
#17 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/app/commands/ProcessListings.php(137): ProcessListings->UploadImageToS3('naples', '213506540', '213506540-naple...', 'app/processing/...')
#18 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/app/commands/ProcessListings.php(72): ProcessListings->DownloadImages('naples', '213506540', 'http://extimage...', '213506540-naple...', 12)
#19 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(108): ProcessListings->fire()
#20 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(244): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(96): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/symfony/console/Symfony/Component/Console/Application.php(898): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/symfony/console/Symfony/Component/Console/Application.php(191): Symfony\Component\Console\Application->doRunCommand(Object(ProcessListings), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/vendor/symfony/console/Symfony/Component/Console/Application.php(121): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /Volumes/Data/Users/chrisfarrugia/Sites/listingnaples.com/artisan(59): Symfony\Component\Console\Application->run()
#26 {main}