Category "php"

How to combine lines of code into one line?

I have 2 lines of code here but i want to combine all 2 lines into 1 // How to combine these 2 lines here $product = $this->productService->searchProduct(

ERROR LARAVEL EMAIL: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1

Greetings to the community! I have recently developed a web page with Laravel 9.X, which works correctly in local, but when I upload it to my Host, I am having

How to get Enum values Array in PHP

I have Enum Class. <?php namespace Enum; enum Status:string { case ACTIVE = 'active'; case ARCHIVE = 'archive'; case INACTIVE = 'inactive'; }

How to take a JSON content and return it in a wordpress function (php)?

I have a wordpress endpoint and I have some json data. Unfortunately I dont know how to return this json data in the function. I tried json_decode but it doesn'

Filter my select options by department and location

I have a problem in my website, I have 2 dropdown selects that are Departments and Locations, my problem is when I select a certain department and start typing

Codeigniter - foreach form input table

I have a foreach loop contained within a form there an input is required. I want to submit these all of input values to the database. Currently it only submits

GET not able to find URL

I have made a basic Laravel project and had configured my api.php file to have a GET route when I want to fetch data for my project, but whenever I try to load

WooCommerce Subscriptions automatically change status of manual recurring orders to processing

I am using WooCommerce Subscriptions with manual payments using the 'bacs' payment method. When recurring orders are created, the code below changes the status

How to forward email body without any change

Need to Forward raw Email without any change Working on an email forwarding script and implementing SRS with keeping DKIM intact (for DMARC). I have Laravel app

After updating answers in a SCORM lesson in the same attempt, the score result doesn't update - MOODLE

After adding a SCORM lesson in MOODLE, I took an attempt and then the SCORM lesson gives me a score result. Then, I took the same attempt again(Not "Enter a new

Sort by search phrase occurrences count Elasticsearch

I want to sort by occurrences count in Elasticsearch. For example, I have some texts that contain Ludwig van Beethoven string and I want to sort them by these s

HTTP authentication with PHP for specific pages

I have been trying to fix one issue for the last two weeks but didn't find any solution to my problem. So, I am trying to add HTTP authentication with PHP 7.4.

Symfony is slow on production server, not in local

I have a performance problem with my symfony stack. Because an image is worth than a long text : On production (AWS EC2 t2.medium) (2387ms, 84MiB)(ParamConverte

Woocomerce Local Pick Up - I want to add a reference on pick up / collection

Hi am using Woocomerce for pre sale of items at an event with a collection only option. When these are collected I want to update the order to Picked Up (or Col

Unit testing with get request

I am trying to create a unit test for one of my api. In the frontend, I send it this way... params = { participants: JSON.stringify(participants), secti

Temporary table deletion cant find the temporary table(no such file or directory)

SQLSTATE[HY000]: General error: 6 Error on delete of '/tmp/#sql_10f07_0.MAI' (Errcode: 2 "No such file or directory") this error has started to pop up every no

error when trying to install glpi database on windows

this error appears when I install a new database in order to run glpi Uncaught Exception mysqli_sql_exception: Unknown database 'glpi' in "C:\xampp\htdocs\glpi\

Setting A $_GET Value From A Previously Defined Variable - PHP

I have a search form in the header of every page on a site that submits info to another page when undertaking a search query via the form's action attribute, na

Issue turning pdo column value to string | PHP

Essentially I am running the following query using pdo and formatting the results as JSON. The issue is I need column2 to always show as a string in the JSON, e

how to fetch data and tag Element but not json data using axios from php Apache server in XAMP?

I have a front end code of react is import React,{useEffect,useState} from "react"; import axios from 'axios' export default function DataGridDemo() { con