Category "php"

PHPmailer: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

I am trying to email a form data with phpmailer. I am stuck with it. for some reason I am getting Failed to load resource: the server responded with a status of

PDO MYSQL HY093 (wrong number of parameters) issued incorrectly

I am receiving an HY093 (Parameter count mismatch) SQLSTATE on a query where I don't believe a mismatch exists. Below I have a complete PHP script to reproduce

I have a widget definition showing up outside of my page at the bottom. I can't find what is causing this. Any suggestions?

Help.. Probably simple solution, but. I have a widget definition showing up outside of my page frame boundary at the bottom. I can't find what is causing this.

How to get WooComrnce product category by meta key value

I have product categories with the meta value "old_id", I'm trying to make a function that will return the new product category id using the old id (with meta k

Adding shipping rate to checkout session results in "invalid array" exception

I am creating a checkout session where I want to add shipping rate which I've created in Stripe Dashboard. This is my code: $charge = $stripeClient->checkout

Merging arrays with the same keys

In a piece of software, I merge two arrays with array_merge function. But I need to add the same array (with the same keys, of course) to an existing array. Th

How can I set 'id' as biginteger and autoincrement in phinx for PostgreSQL?

I tried to set as only biginter but it lost its autoincrement properties. So I tried adding auto-increment as well. $table->changeColumn('id', 'biginteger',

Add an OpenGraph tag in WooCommerce single product pages

I have to add Product SKU to Woocommerce metatags product page (Facebook OpenGraph). I've tried to add global $product; echo "<meta property='og:id' content=

PHP CURLOPT_WRITEFUNCTION returns headers in body

When i include curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'curl_write_flush'), i get headers inserted into the $body. But without CURLOPT_WRITEFUNCTION everything

Inserting the current date doctrine

I have created a symfony project and am having a date issue. I would like to make a request which inserts the current date in the database. In my entity my fiel

Autheticate via Laravel Sanctum by passing token as a GET query parameter

I know the dangers of passing the token as a GET parameter. I've seen this and this. However, in my case there is no other way because the route will get called

Is it possible to change the way EasyAdmin load entities in index?

in my project with Symfony (PHP), i use EasyAdminBundle and i'm wondering if it's possible to change the way easyadmin load entities with pagination? I would li

When to use action injection and when to inject dependencies on the constructor for controllers?

In Symfony you can direct inject a service into a controller function: use App\Service\FooService; class FooController { public function one(FooService $fo

Add a minimum order price in WooCommerce, but still allow the customer to checkout when the condition is not met by charging the deficit

I would like to add a minimum order price for WooCommerce. I have found instructions on how to restrict ordering, unless the user adds more products to cart so

Replacing characters in a returned Header Location in PHP

I'm trying to filter returned header location after POST using below PHP code. The returned header location is required for further processing of the payment st

RedisException php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

I have Redis and php-redis extension installed but whenever I wanna use a queue in Laravel I just get the error below RedisException php_network_getaddresses: g

Variable undefined error in laravel blade component view

Component InputError.php <?php namespace App\View\Components; use Illuminate\View\Component; class InputError extends Component { /** * Create a

InvalidArgumentException View [layouts.app] not found. Larave-8 LliveWire-2

When I change app.blade.php to base.blade.php I am having the following error. InvalidArgumentException View [layouts.app] not found. (View: D:\Code\my-app\ven

Valet is not working with php.8 Nginx return Bad Gateway

Hi I have try to update php to 8.0 but always there a problem with valet to read the new version and I try to solve it without specific instructions but this ti

Symfony6 FindBy and entity many to many

I use symfony6 for the first time with php 8.0.17. I want to make a small form that allows me to retrieve "Card" objects. My "Card" objects are bound to many to