Laravel 5.1 : Error on install new - php

When I am running laravel new blog or any name, I get the following error:
Crafting application...
PHP Fatal error: Uncaught TypeException: Argument 2 passed to GuzzleHttp\Adapter\StreamAdapter::createResponseObject() must be of the type array, null given, called in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 67 and defined in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php:71
Stack trace:
#0 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(67): GuzzleHttp\Adapter\StreamAdapter->createResponseObject(Object(GuzzleHttp\Message\Request), NULL, Object(GuzzleHttp\Adapter\Transaction), Object(GuzzleHttp\Stream\Stream))
#1 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(52): GuzzleHttp\Adapter\StreamAdapter->createResponse(Object(GuzzleHttp\Adapter\Transaction))
#2 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Client.php(193): GuzzleHttp\Adapter\StreamAdapter->send(Object(GuzzleHttp\Adapter\Transaction)) #3 C:\U in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 71
Fatal error: Uncaught TypeException: Argument 2 passed to GuzzleHttp\Adapter\StreamAdapter::createResponseObject() must be of the type array, null given, called in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 67 and defined in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php:71
Stack trace:
#0 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(67): GuzzleHttp\Adapter\StreamAdapter->createResponseObject(Object(GuzzleHttp\Message\Request), NULL, Object(GuzzleHttp\Adapter\Transaction), Object(GuzzleHttp\Stream\Stream))
#1 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php(52): GuzzleHttp\Adapter\StreamAdapter->createResponse(Object(GuzzleHttp\Adapter\Transaction))
#2 C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Client.php(193): GuzzleHttp\Adapter\StreamAdapter->send(Object(GuzzleHttp\Adapter\Transaction)) #3 C:\U in C:\Users\Felix\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\Adapter\StreamAdapter.php on line 71
I don't understand how this can happen. Here is my PhpInfo file
Thanks

The answer was simple. I was running PHP CLI from PHP7 and not XAMPP/PHP5. Only have to uncomment the extension=php_curl.dll line.

Related

I want to start a local server for Codeigniter-4 with "php spark serve" but get these errors

PS C:\xampp\htdocs\dashboard-db> php spark serve
PHP Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\HTTP\URI::setScheme() must be of the type string, null given, called in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php on line 443 and defined in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php:749
Stack trace:
#0 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(443): CodeIgniter\HTTP\URI->setScheme(NULL)
#1 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(207): CodeIgniter\HTTP\IncomingRequest->setPath('', Object(Config\App))
#2 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(169): CodeIgniter\HTTP\IncomingRequest->detectURI('REQUEST_URI', ' http://localho...')
#3 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\Config\Services.php(589): CodeIgniter\HTTP\IncomingRequest->__construct(Object(Config\App), Object(CodeIgniter\HTTP\URI), '', Objec in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php on line 749
Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\HTTP\URI::setScheme() must be of the type string, null given, called in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php on line 443 and defined in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php:749
Stack trace:
#0 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(443): CodeIgniter\HTTP\URI->setScheme(NULL)
#1 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(207): CodeIgniter\HTTP\IncomingRequest->setPath('', Object(Config\App))
#2 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\IncomingRequest.php(169): CodeIgniter\HTTP\IncomingRequest->detectURI('REQUEST_URI', ' http://localho...')
#3 C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\Config\Services.php(589): CodeIgniter\HTTP\IncomingRequest->__construct(Object(Config\App), Object(CodeIgniter\HTTP\URI), '', Objec in C:\xampp\htdocs\dashboard-db\vendor\codeigniter4\framework\system\HTTP\URI.php on line 749
Sorry for the late answer. You probably solved it but this observation might help others too.
The problem may be due to the app.base URL in the .env file. Typing it such as 'localhost' or 'localhost:8080' will be incorrect, you should try typing 'http://localhost' instead.

Argument 3 passed to MongoDB\Driver\Server::executeBulkWrite() must be an instance of MongoDB\Driver\WriteConcern or null

I got an error from mongo db, when I connect with application server through php 7.2,**
Fatal error: Uncaught TypeError: Argument 3 passed to MongoDB\Driver\Server::executeBulkWrite() must be an instance of MongoDB\Driver\WriteConcern or null, array given in /var/www/html/project/apps/vendor/mongodb/mongodb/src/Operation/InsertOne.php:134 Stack trace: #0 /var/www/html/project/apps/vendor/mongodb/mongodb/src/Operation/InsertOne.php(134): MongoDB\Driver\Server->executeBulkWrite('project.app_fe...', Object(MongoDB\Driver\BulkWrite), Array) #1 /var/www/html/project/apps/vendor/mongodb/mongodb/src/Collection.php(931): MongoDB\Operation\InsertOne->execute(Object(MongoDB\Driver\Server)) #2 /var/www/html/project/apps/api/appFeedback.php(75): MongoDB\Collection->insertOne(Array) #3 {main} thrown in /var/www/html/project/apps/vendor/mongodb/mongodb/src/Operation/InsertOne.php on line 134

Unknown error in PHP when using Google Cloud Vision Service

enter image description herei'm getting this error and i don't know how to debug this.
Fatal error: Uncaught TypeError: Argument 1 passed to Google\ApiCore\Middleware\RetryMiddleware::Google\ApiCore\Middleware{closure}() must be an instance of Exception, instance of Error given, called in /Users/../Desktop/VISION MAIN/vendor/guzzlehttp/promises/src/Promise.php on line 203 and defined in /Users/../Desktop/VISION MAIN/vendor/google/gax/src/ApiCore/Middleware/RetryMiddleware.php:90
Stack trace:
0 /Users/../Desktop/VISION MAIN/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Middleware\RetryMiddleware->Google\ApiCore\Middleware{closure}(Object(Error))
1 /Users/../Desktop/VISION MAIN/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(2, Object(Error), Array)
2 /Users/../Desktop/VISION MAIN/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()
3 /Users/../Desktop/VISION MAIN/vendor/guzzleh in /Users/../Desktop/VISION MAIN/vendor/google/gax/src/ApiCore/Middleware/RetryMiddleware.php on line 90
Request in php file
main.php(call the request php file)
swift code call the main.php

Laravel frequently showing 'Undefined variable: _SERVER'

I am frequently getting the following error in Laravel 5.4.
Notice: Undefined variable: _SERVER in
C:\wamp64\www\hxponline\vendor\symfony\http-foundation\Request.php on
line 305
Notice: Undefined variable: _GET in C:\wamp64\www\hxponline\vendor\symfony\http-foundation\Request.php on
line 315
Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\HttpFoundation\Request::createRequestFromFactory()
must be of the type array, null given, called in
C:\wamp64\www\hxponline\vendor\symfony\http-foundation\Request.php on
line 315 and defined in
C:\wamp64\www\hxponline\vendor\symfony\http-foundation\Request.php:2014
Stack trace: #0
C:\wamp64\www\hxponline\vendor\symfony\http-foundation\Request.php(315):
Symfony\Component\HttpFoundation\Request::createRequestFromFactory(NULL,
Array, Array, Array, Array, NULL) #1
C:\wamp64\www\hxponline\vendor\laravel\framework\src\Illuminate\Http\Request.php(59):
Symfony\Component\HttpFoundation\Request::createFromGlobals() #2
C:\wamp64\www\hxponline\public\index.php(53):
Illuminate\Http\Request::capture() #3 {main} thrown in
C:\wamp64\www\hxponline\vendor\symfony\http-foundation\Request.php on
line 2014
Also in the phpmyadmin page I am getting,
Fatal error: Uncaught Error: Call to a member function setCookie() on
null in C:\wamp64\apps\phpmyadmin4.7.4\libraries\ThemeManager.php:260
Stack trace: #0
C:\wamp64\apps\phpmyadmin4.7.4\libraries\common.inc.php(616):
PMA\libraries\ThemeManager->setThemeCookie() #1
C:\wamp64\apps\phpmyadmin4.7.4\sql.php(18):
require_once('C:\wamp64\apps\...') #2 {main} thrown in
C:\wamp64\apps\phpmyadmin4.7.4\libraries\ThemeManager.php on line 260
I couldn't figure out any reason what is the reason for all these errors.
Any help would be really appreciated.

Wordpress plugin fatal error

I downloaded this taxi booking plugin from Github but when I try to activate it on wordpress I get a fatal error and it doesn't let me activate it. You can find the plugin on https://github.com/mbejda/TaxiCabBookingSystem
Fatal error: Uncaught exception 'Braintree_Exception_Configuration' with message 'merchantIdneeds to be set' in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php:117 Stack trace: #0 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(139): Braintree_Configuration::get('merchantId') #1 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(157): Braintree_Configuration::setOrGet('merchantId', NULL) #2 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/modules/BookingSystemBrainTreeModule.php(32): Braintree_Configuration::merchantId(NULL) #3 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/main.php(177): BookingSystemBrainTreeModule->__construct(Object(BookingSystem)) #4 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-maste in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php on line 117
Any help to get this resolved would be appreciated.
UPDATE at Sunday 8th Feb # 8:18pm.
I have added the Merchant ID on Configuration.php its giving me the same error I think, if not the same then very simular
Fatal error: Uncaught exception 'Braintree_Exception_Configuration' with message 'publicKeyneeds to be set' in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php:117 Stack trace: #0 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(139): Braintree_Configuration::get('publicKey') #1 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(162): Braintree_Configuration::setOrGet('publicKey', NULL) #2 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/modules/BookingSystemBrainTreeModule.php(33): Braintree_Configuration::publicKey(NULL) #3 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/main.php(177): BookingSystemBrainTreeModule->__construct(Object(BookingSystem)) #4 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/ma in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php on line 117
Regards
Did you read the error message output... it says
Message 'merchantId needs to be set' in
/Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php
[Update]
Also check out https://www.braintreepayments.com/docs/php

Categories