I´m testing the 33chartcreate-column.php example from PHPExcel library example.The code is: <?php /** Error reporting */ error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('…
502 Bad Gateway: nginx, php5-fpm, 175/209 connect() failed (111: Connection refused) while connecting to upstream
Running shopware 5 on a Debian Jessie machine with nginx and php5-fpm, we get very often a 502 Bad Gateway. This happens mostly in backend when longer operations are working like thumbnail creation, even if this is done within small chunks of single ajax requests. The used server with 64 GB RAM and 16 Cores i…
Manually register a user in Laravel
Is it possible to manually register a user (with artisan?) rather than via the auth registration page? I only need a handful of user accounts and wondered if there’s a way to create these without having to set up the registration controllers and views. Answer I think you want to do this once-off, so the…
Custom defined routes not resolving in Laravel
I have a Laravel 5.2 instance utilizing all the typical out-of-the-box routes for dashboard, cases, home, login/logout, and users (which is working well). I now need to create a wizard with steps (step1, step2, step3, etc.), and I need access to the session. I assigned them to the group middleware. However, w…
Set max_execution_time for specific controller in symfony2
Using ini_set(), I can expand the maximum execution time of a script. In Symfony2, I can add ini_set to web/app.php and web/app_dev.php to apply the increased execution time to all controllers. But in this case, I only want to expand the maximum execution time for one specific controller action in Symfony2. I…
php variable contains string and replace
Very new to PHP, but I have this code does anyone know how I would get this to work. Basically if the URL contains en-us replace the url with en Thanks Answer I hope this could be some help for you
Objective reasons for using spaces instead of tabs for indentation?
Are there objective reasons for using spaces instead of tabs for indenting files as per PSR-2 standard, can someone provide: facts, references, specific expertise on which PSR-2 standard is based? Authors of PSR-2 standard had in mind something more than “look and feel”, something more than just o…
Try catch for laravel is not working for duplicate entry
I am using below code in laravel controller. And getting duplicate error for username but I need to handle it by try-catch. This code is not working. <?php namespace AppHttpControllers; use …
How to create a custom SaveType which is child of SubmitType in Symfony forms
I want to make some simple admin panel application in Symfony. I see that since version 2.3 Symfony introduced a Bootstrap’s form theming, which is great, but I want to create custom submit field called SaveType which should have default class attr set to btn-primary instead of btn-default. So, from doc…
LARAVEL how to change $fillable in Model from trait?
I have in model: use seoTrait; protected $fillable = [ ‘name’, ‘title’, ‘description’ ]; I created trait “seoTrait” which need “seoMeta” in $fillable. Now I add : protected $fillable = [ ‘…