I have configured the error_log directive in my php.ini file, like this: And then I configured the error_reporting directive like this: When I check the error_log file, I see normal PHP warning/error text lines: Is there is a way to change output format? I mean, if I can print, for example, the IP address and…
Laravel 5 – get ID by other field properly
I want to get the ID of a user in a middleware by searching with his email. I thought about doing it like this in one of two ways. First, creating a function in the model User: public function …
Error: Class ‘Stripe’ not found
I’m trying to use the Stripe php api in a Bolt extension but it’s having trouble finding the class. I added the Stripe library to composer.json: And ran composer install. myextension/vendor/composer/autoload_classmap.php now shows the classes loaded: And now I’m trying to use it in the exten…
Am I handling query errors correctly in Medoo Framework?
I’m using Medoo Framework to handle my database queries. It is basically a PDO wrapper, I didn’t find in their documentation how to handle errors or check the result, sometimes it return empty array, …
SimpleSamlPHP SimpleSAML_Error_NoState: NOSTATE
I instal SimpleSAMLPHP on my computer in local so i build 2 virtual host : ServerAdmin toto@gmail.com ServerName auth.saml.net AddDefaultCharset UTF-8 …
SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) symfony2
When I try to login I get an error: SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) parametrs.yml: This file is auto-generated during the composer install My OS is Debian Thanks for your help. Answer This is due to your mysql configuration. Accord…
Filter array to retain all elements that have a key containing a searched string
I’m trying to do some predictive searching, and I am using preg_grep() as a way to get away from the LIKE in SQL. I have the following array: If I have Phorc I want all array elements (key and value), with a partial match of Phorc, so here Phorce => 123. Is this possible with preg_grep() ? I have tri…
Laravel – Maintenance mode just for some urls
I need to use the Maintenance mode using the artisan command “down”, but just for some urls… In my case, i want that all urls that starts with “/admin/*” continue working. Is there a solution?
TCPDF – loop data in two columns layout
Im using TCPDF, at the moment im a listing data in two columns using array_chunk which works fine. But i need data to be show in first columns and then second, see below: Currently: 1 2 …
retrieving multiple records associated to multiple records laravel 4.2
recently i asked this question which got one answer but unfortunately didn’t solve the problem, after that i got no more answers and i really need to fix this problem i have. Alright so i have to make a quiz website for my school in which a user should be able to play the quiz, this page need to show