I want my laravel applications to run as well mannered 12 factor apps. Right now I’m struggling to get their to logs to and from stdout (stderr is also fine by me) under php-fpm. The php version is 7….
Is it safe to display SQL error messages on your website? (mysqli)
I was wondering if it’s safe to display the error messages mySQL(i) returns (if any) on your website, or should I do this differently? I have seen some forum arguments on MySQLi vs PDO and some say that it’s always safe to display MySQLi error messages, but since those are internet arguments, I do…
Laravel Queue How to get data in job handle method
I have created a sequence of messsages to be sent in text messages through twilio. I have created a controller to put the messages in a queue with the data received in the post request. Here is my controller to make queue: And in handle the job , in the handle function } I am not able to figure out
Remove “estimated for {country}” text after tax amount in Woocommerce checkout page
I set up a 19% standard tax amount in my Woocommerce Online-Shop. Unfortunatley – now there is a text “estimated for Germany” behind the (includes 20,12 €… part below the total-amount in my checkout page (see image below). I guess it displays the text because the calculated tax amount …
Variable variables in classes using PHP 7
Actually I’m migrating a bigger project from PHP 5.3.3 to PHP 7.1.13. In older versions of PHP it was possible to code following access to variable variables: This shows: Using the same code in PHP 7 it shows: In PHP 7 I figured out, that I have to use this way to get the same result: I found in the
Composer psr-4 autoload issue
I have problem with autoloading with composer when i use psr-4 autoloading it doesn’t work and give me error. I tried: $ composer dump-autoload and a lot of other thing but it doesn’t work …
WP-lightbox Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
My plugin wp-lightbox evolution is showing me an error Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead And when I replace that with preg_replace_callback I’m getting an error: Warning: preg_replace_callback(): Requires argument 2, ‘stripslashes(strstr(&…
Add custom checkout fields below the terms and conditions in Woocommerce
I have built an e-commerce site using Woocommerce. I would like to add two more check boxes below the terms and conditions. I have searched everywhere for a working solution and the only thing that I found is a commercial plugin. How to add custom checkout fields (2 checkboxes) below the terms and conditions …
Set back to product category in Woocommerce Product Page
I want to set a back button on my product page (to the product category). I cant manage to get the category and echo on the page. I have tried to use this code and it doesn’t work… The first problem I have whit this code is what I have no option to set the parent category for the product.
Anonymize IPv4 and IPv6 addresses with PHP preg_replace?
I needed to anonymize IPv4 and IPv6 addresses so I coded this crude solution: It works fine with full length IPv4 and IPv6 addresses like 207.142.131.005 2001:0db8:0000:08d3:0000:8a2e:0070:7344 but not with abbreviated addresses like 207.142.131.5 2001:0db8::8d3::8a2e:7:7344 I wonder if there is an elegant so…