I need to exclude in the output error generated "server information and sensitive information it logs out while showing the error
If an error Occurs it outputs a lots of sensitive information in the server section. how can I expect the output log of server information and Database information.
Illuminate \ Database \ QueryException (HY000) SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value (SQL: insert into ptcs
(title
, details
, duration
, rewards
, ad_link
, hit
, type
, count
, membership_id
, updated_at
, created_at
) values ( gxxx, Sponsored, 30, 0.100, , 20000, 1, 0, 1, 2019-12-20 03:35:36, 2019-12-20 03:35:36)) Previous exceptions SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value (HY000) COPY Application frames (4) All frames (83) 82 Illuminate\Database\QueryException …/vendor/laravel/framework/src/Illuminate/Database/Connection.php664 81 PDOException …/vendor/laravel/framework/src/Illuminate/Database/Connection.php458 80 PDOStatement execute …/vendor/laravel/framework/src/Illuminate/Database/Connection.php458 79 Illuminate\Database\Connection Illuminate\Database{closure} …/vendor/laravel/framework/src/Illuminate/Database/Connection.php657 78 Illuminate\Database\Connection runQueryCallback …/vendor/laravel/framework/src/Illuminate/Database/Connection.php624 77 Illuminate\Database\Connection run …/vendor/laravel/framework/src/Illuminate/Database/Connection.php459 76 Illuminate\Database\Connection statement …/vendor/laravel/framework/src/Illuminate/Database/Connection.php411 75 Illuminate\Database\Connection insert …/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php32 74 Illuminate\Database\Query\Processors\Processor processInsertGetId …/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php2628 73 Illuminate\Database\Query\Builder insertGetId …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php1318 72 Illuminate\Database\Eloquent\Builder __call …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php823 71 Illuminate\Database\Eloquent\Model insertAndSetId …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php788 70 Illuminate\Database\Eloquent\Model performInsert …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php651 69 Illuminate\Database\Eloquent\Model save …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php790 68 Illuminate\Database\Eloquent\Builder Illuminate\Database\Eloquent{closure} …/vendor/laravel/framework/src/Illuminate/Support/helpers.php1027 67 tap …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php791 66 Illuminate\Database\Eloquent\Builder create …/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php23 65 Illuminate\Database\Eloquent\Model forwardCallTo …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php1608 64 Illuminate\Database\Eloquent\Model __call …/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php1620 63 Illuminate\Database\Eloquent\Model __callStatic …/app/Http/Controllers/AdminPTCController.php81 62 App\Http\Controllers\AdminPTCController store …/vendor/laravel/framework/src/Illuminate/Routing/Controller.php54 61 call_user_func_array …/vendor/laravel/framework/src/Illuminate/Routing/Controller.php54 60 Illuminate\Routing\Controller callAction …/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php45 59 Illuminate\Routing\ControllerDispatcher dispatch …/vendor/laravel/framework/src/Illuminate/Routing/Route.php219 58 Illuminate\Routing\Route runController …/vendor/laravel/framework/src/Illuminate/Routing/Route.php176 57 Illuminate\Routing\Route run …/vendor/laravel/framework/src/Illuminate/Routing/Router.php682 56 Illuminate\Routing\Router Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php30 55 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/app/Http/Middleware/Ban.php27 54 App\Http\Middleware\Ban handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 53 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 52 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/app/Http/Middleware/Admin.php24 51 App\Http\Middleware\Admin handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 50 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 49 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/app/Http/Middleware/StoreReferralCode.php21 48 App\Http\Middleware\StoreReferralCode handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 47 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 46 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php41 45 Illuminate\Routing\Middleware\SubstituteBindings handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 44 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 43 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php75 42 Illuminate\Foundation\Http\Middleware\VerifyCsrfToken handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 41 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 40 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php49 39 Illuminate\View\Middleware\ShareErrorsFromSession handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 38 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 37 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php63 36 Illuminate\Session\Middleware\StartSession handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 35 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 34 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php37 33 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 32 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 31 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php66 30 Illuminate\Cookie\Middleware\EncryptCookies handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 29 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 28 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php104 27 Illuminate\Pipeline\Pipeline then …/vendor/laravel/framework/src/Illuminate/Routing/Router.php684 26 Illuminate\Routing\Router runRouteWithinStack …/vendor/laravel/framework/src/Illuminate/Routing/Router.php659 25 Illuminate\Routing\Router runRoute …/vendor/laravel/framework/src/Illuminate/Routing/Router.php625 24 Illuminate\Routing\Router dispatchToRoute …/vendor/laravel/framework/src/Illuminate/Routing/Router.php614 23 Illuminate\Routing\Router dispatch …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php176 22 Illuminate\Foundation\Http\Kernel Illuminate\Foundation\Http{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php30 21 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php65 20 Barryvdh\Debugbar\Middleware\InjectDebugbar handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 19 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 18 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/fideloper/proxy/src/TrustProxies.php57 17 Fideloper\Proxy\TrustProxies handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 16 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 15 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php31 14 Illuminate\Foundation\Http\Middleware\TransformsRequest handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 13 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 12 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php31 11 Illuminate\Foundation\Http\Middleware\TransformsRequest handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 10 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 9 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php27 8 Illuminate\Foundation\Http\Middleware\ValidatePostSize handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 7 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 6 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php62 5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode handle …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php151 4 Illuminate\Pipeline\Pipeline Illuminate\Pipeline{closure} …/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php53 3 Illuminate\Routing\Pipeline Illuminate\Routing{closure} …/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php104 2 Illuminate\Pipeline\Pipeline then …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php151 1 Illuminate\Foundation\Http\Kernel sendRequestThroughRouter …/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php116 0 Illuminate\Foundation\Http\Kernel handle /home/xx/app.com/lab/vendor/laravel/framework/src/Illuminate/Database/Connection.php * @param array $bindings * @param \Closure $callback * @return mixed * * @throws \Illuminate\Database\QueryException */ protected function runQueryCallback($query, $bindings, Closure $callback) { // To execute the statement, we'll simply call the callback, which will actually // run the SQL against the PDO connection. Then we can calculate the time it // took to execute and log the query SQL, bindings and time in our memory. try { $result = $callback($query, $bindings); }
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
* @return void
*/
public function logQuery($query, $bindings, $time = null)
{
$this->event(new QueryExecuted($query, $bindings, $time, $this));
if ($this->loggingQueries) {
Arguments "SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value (SQL: insert into ptcs
(title
, details
, duration
, rewards
, ad_link
▶" Environment & details: GET Data empty POST Data _token
"/" title
" Excha" ad_link "" membership_id
"1" rewards "0.100" duration
"30" hit "20000" status
"1" details "" Files empty Cookies _ga "GA1.2.767514765.1574096306" __tawkuuid
"e::::::2" _gid
"" __utmz
"175573563.1575805896.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" __utma
"" ref " ▶" code
" ▶" __utmc
"18812009" __utmb
"18812009.6.10.1576786660" TawkConnectionTime
"0" XSRF-TOKEN
" ▶"
" ▶" Session empty Server/Request Data LSPHP_ENABLE_USER_INI
"on" PATH
"/usr/local/bin:/usr/bin:/bin" TEMP
"/tmp" TMP "/tmp" TMPDIR
"/tmp" PWD "/" HTTP_ACCEPT "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8" HTTP_ACCEPT_ENCODING
"gzip, deflate, br" HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.9" CONTENT_TYPE
"application/x-www-form-urlencoded" CONTENT_LENGTH
"213" HTTP_COOKIE "_ga=GA1.2.767514765.1574096306; __; _gid=GA1.2.739023008.1575 ▶" HTTP_HOST
"" HTTP_REFERER
"" HTTP_USER_AGENT "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" HTTP_CACHE_CONTROL
"max-age=0" HTTP_X_FORWARDED_FOR
"105.112.122.222" HTTP_SAVE_DATA
"on" HTTP_UPGRADE_INSECURE_REQUESTS
"1" HTTP_ORIGIN "" HTTP_X_FORWARDED_PROTO
"https" HTTP_X_HTTPS
"on" REDIRECT_HTTPS
"on" REDIRECT_SERVER_PORT
"443" REDIRECT_UNIQUE_ID
"" REDIRECT_SCRIPT_URL "/admin/ptc/create" REDIRECT_SCRIPT_URI "" REDIRECT_STATUS "200" HTTPS
"on" SERVER_PORT "443" UNIQUE_ID
"" SCRIPT_URL
"" SCRIPT_URI
"" SERVER_SIGNATURE
"" SERVER_SOFTWARE "Apache" SERVER_NAME "" SERVER_ADDR "198.54.125.177" REMOTE_ADDR "105.112.122.222" DOCUMENT_ROOT
"" REQUEST_SCHEME
"https" CONTEXT_PREFIX
"" CONTEXT_DOCUMENT_ROOT
"" SERVER_ADMIN
"" SCRIPT_FILENAME "//" REMOTE_PORT "38744" REDIRECT_URL
"/admin/xxx/create" SERVER_PROTOCOL "HTTP/1.1" REQUEST_METHOD
"POST" QUERY_STRING
"" REQUEST_URI "/admin/xxx/create" SCRIPT_NAME "/index.php" PHP_SELF
"/index.php" REQUEST_TIME_FLOAT
1576791336.6069 REQUEST_TIME
1576791336 APP_NAME
" APP_ENV "local" APP_KEY "" APP_DEBUG
"true" APP_LOG_LEVEL
"debug" APP_URL "" CURRENCY_CODE
"" CURRENCY_SYMBOL "#" APP_SSL "false" DB_CONNECTION
"Xxxxxx" DB_HOST "127.0.0.1" DB_PORT "3306" DB_DATABASE "Xxxxxxxxxx_xxxxx" DB_USERNAME "Xxxxxxxxxx_xxxx" DB_PASSWORD "Xxxxxx" BROADCAST_DRIVER
"log" CACHE_DRIVER
"file" SESSION_DRIVER
"file" SESSION_LIFETIME
"120" QUEUE_DRIVER
"sync" REDIS_HOST
"127.0.0.1" REDIS_PASSWORD
"null" REDIS_PORT
"00000" MAIL_DRIVER "Xxxxx" MAIL_HOST
"Xxdrgughjjj.byg" MAIL_PORT
"465" MAIL_USERNAME
"Xxxxx@xxxx.ui" MAIL_PASSWORD
"Xxxxxxxxxx." MAIL_ENCRYPTION "SSL" MAIL_FROM_ADDRESS
"Xxxxxx@cxxxcvb.vv" MAIL_FROM_NAME
Xxxxxxxxxx" MAILGUN_DOMAIN
"Xxxxxxxxxx" MAILGUN_SECRET
"" RECAPTCHA_PUBLIC_KEY
"Xxxxxxxxxx" RECAPTCHA_PRIVATE_KEY
"Xxxxxxxxxx" PUSHER_APP_ID
"" PUSHER_APP_KEY
"" PUSHER_APP_SECRET
"" Environment Variables LSPHP_ENABLE_USER_INI
"on" PATH
"/usr/local/bin:/usr/bin:/bin" TEMP
"/tmp" TMP "/tmp" TMPDIR
"/tmp" PWD "/" APP_NAME
"Xxxxxxxxxx" APP_ENV "local" APP_KEY "Xxxxxxxxx" APP_DEBUG
"true" APP_LOG_LEVEL
"debug" APP_URL "go.go" CURRENCY_CODE
"" CURRENCY_SYMBOL "#" APP_SSL "false" DB_CONNECTION
"xxxxx" DB_HOST "000.0.0.1" DB_PORT "3306" DB_DATABASE "Cccccvv_xxxx" DB_USERNAME "Cccccvv_xxxx" DB_PASSWORD "xxxxxx" BROADCAST_DRIVER
"log" CACHE_DRIVER
"file" SESSION_DRIVER
"file" SESSION_LIFETIME
"000" QUEUE_DRIVER
"sync" REDIS_HOST
"0000.000.000" REDIS_PASSWORD
"Xxxxxxxxxx" REDIS_PORT
"Xxxxxxxxxx" MAIL_DRIVER "Xxxxxxxxxx" MAIL_HOST
"Xxxxxxccccxcxxxxxx.xxx" MAIL_PORT
"Xxx" MAIL_USERNAME
"Xxxxxxxxxxx@xx.xxx" MAIL_PASSWORD
"Xxxxxxxxxx." MAIL_ENCRYPTION "SSL" MAIL_FROM_ADDRESS
"Xxxxxx@xxxxxxx.xxx" MAIL_FROM_NAME
"Xxxxxxxxxxx" MAILGUN_DOMAIN
"Xxxxxxxxxx" Xxxxxxccccxcxxxxxx" RECAPTCHA_PRIVATE_KEY
"Xxxxxxxcccccccc" PUSHER_APP_ID
"" PUSHER_APP_KEY
"" PUSHER_APP_SECRET
"" Registered Handlers 0. Whoops\Handler\PrettyPageHandler
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire