Category "php"

xdebug 3 not working in ubuntu 20.04 with docker

I'm trying to use xdebug 3 with docker on ubuntu 20.04, but I'm not getting success, xdebug does not enter the interruption point, I already searched for everyt

Where do I need to place a hook for phpunit?

The answer is probably very simple, but I've been running around in circles and I can't find an answer anywhere. I'm trying to mock a final class which is norma

Having issue with matching rows in the database using PDO

I am looking to get row count to check if same email is already in database or not. i have tried couple of mechanism but no success. when i run my query directl

Transfer data between JavaScript and PHP through JSON

index.html: <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="

yii2 and mssql insert varbinary into model

Hi everyone I have a sql server table that contains fields that are of type varbinary. The table model sees the field as a string, when it tries to save it it g

how can I update multi specific rows in mysql and php ? in the example there are tow rows 50 , 51 I need to update "quantity" and "note"

how can I update multi specific rows in mysql and php ? in the example there are tow rows 50 , 51 I need to update "quantity" and "note" . SN | Medication | Qya

How to change product Image when variables are selected in Shop and Archive Pages?

I use this hook to show variations on the shop page. However, the product image does not change when a variable is selected. It works on a Single product page.

MySQL default_socket_timeout timeout only when connecting from ECS Fargate Task

This is a strange one. In my ECS Fargate task, I have a Docker container running PHP code that calls mysqli_connect to connect to an RDS MySQL database. Works g

Laravel database insert with combining array and string

I should insert an array such as $attendanceList = [18354012,18354013,18354014,18354015] and $present = "FALSE" and same for all item of $attendanceList. As you

How to get company posts from LinkedIn via API?

I would like to get the company posts from LinkedIn in PHP. What request should I use to ask for the post? I try to use PHP library "zoonman/linkedin-api-php-

How to add an error handling to read an XML file in php?

I am developing a PHP script that allows me to modify tags in an XML file and move them once done. My script works correctly but I would like to add error handl

render partial view based on user permissions

My Task is to create a permission system that is not pre-defined by roles. E.g the system does not define the roles which an admin can assign to other users. In

What is the difference between client-side and server-side programming?

I have this code: <script type="text/javascript"> var foo = 'bar'; <?php file_put_contents('foo.txt', ' + foo + '); ?> var

User pool client {id}does not exist

Here is my code: use Aws\CognitoIdentityProvider\CognitoIdentityProviderClient; $args = [ 'credentials' => [ 'key' => 'valid', '

PHP how to detect if running on arm64 cpu?

In PHP how can I detect if I am running on an arm64 CPU or not? (as opposed to, for example, an AMD64 CPU)

Laravel after login Two factor not working

When I log in after activating two factor, the field where I enter the verification key does not open. Login directly. What could my problem be caused by? Forti

Fatal error: Trait 'Laminas\Db\Adapter\Laminas\Db\Adapter\AdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

I keep getting this error when I'm trying to open Album application from Laminas MVC tutorial. I use multicontainer configuration in Docker which consists of li

Get all WooCommerce products within own plugin

Within a plugin how do I get products using wc_get_products()? Or is there another way to do it? if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'a

Braintree Integration Error: Detected a 3DS 1.0 Form POST to a 3DS 2.0 Endpoint

I am trying to implement 3DS with braintree recurrent payments and I am using drop-in UI. I do the following steps: I make a braintree.dropin.create in order to

Problem at startup laravel9 system after git clone

After I made a git clone with my project, composer install and everything and php artisan serve I'm just getting three lines of footers like this: 2022 © W