1,464,381 questions
0
votes
0
answers
54
views
PHP add, delete to xml file [closed]
I am trying to add and delete data from an XML file using PHP. The addition works, but when I try to delete, the element is not removed from Training.xml. No error appears, it just doesn't do anything....
-1
votes
0
answers
27
views
php8.3.29 Ubuntu 24.04 can't install bcmath [closed]
I don't understand the dependency problem. PHP8.3-common is installed but version 8.3.29
I can't understand why it seems to be asking for 8.3.6
root@choir:~# php -v
PHP 8.3.29 (cli) (built: Dec 18 ...
Advice
1
vote
10
replies
71
views
PHP Variable Naming
If I have several variables that are only differentiated by a numerical value within the variable name, is there a way to make the numerical value a variable itself and then pass that value to another ...
0
votes
0
answers
54
views
PayPal OTP ‘transaction code’ SMS shows EUR for a GBP PayPal Checkout order [closed]
We are a UK merchant using WooCommerce + PayPal Checkout (PPCP) in production.
Some payers are prompted for an SMS OTP (‘prove it’s you’ / transaction code). The OTP SMS displays an amount in EUR (and ...
0
votes
0
answers
48
views
Hubleto PHP framework fresh install fails with "Cannot redeclare class Hubleto\App\Community\Discussions\Extendibles\AppMenu"
Using Hubleto 0.25 with PHP 8.1 to 8.5, on Windows (also tested on Linux and Docker, same result), I am trying to create a new app:
Initialize Hubleto:
php hubleto init
Create a new app:
php hubleto ...
3
votes
1
answer
66
views
Symfony AI: How to add additional models for the LM Studio bridge?
I’m working with Symfony AI and the LM Studio bridge to manage my language models locally.
My goal is to add custom models that are not included in Symfony’s default ModelCatalog.
My YAML ...
Advice
0
votes
7
replies
129
views
PHP shorthand for isset && truthy
Is there a shorter way to write the following in php?
$bar = isset($foo['bar']) && $foo['bar'];
or
$verylongname = isset($_POST['verylongname']) && $_POST['verylongname'];
I'm using ...
0
votes
3
answers
142
views
PHP, $regex to obtain each URL of videos about $pattern
I try with some regex to obtain only the URL of all the videos about $pattern but my $regex not work (in this case $pattern = "Greta"):
$data = '<p><a href="https://www.youtube....
5
votes
1
answer
95
views
Api Platform DTO is not comprehensible
version
symfony
7.4
symfony/object-mapper
7.4
api-platform/symfony
4.2
php
8.4
Describe the problem
So I've been reading about the new recommandation for API Platform which is to use and map DTO ...
-1
votes
2
answers
88
views
PHP - Loosing FTP connection [closed]
I'm trying to build a PHP class for a recursive directory listing. It's simple class, but for any reason I'm loosing the connection as it seems (Or the error is anywhere else, but I do not find.
The ...
-1
votes
0
answers
123
views
Use of named parameters in MySQL subquery with PHP8 [closed]
I have 2 tables customers and addresses (each customer can have many addresses)
The customers table has two fields of interest:
userName (varchar)
userID (varchar)
The addresses table has two fields ...
-2
votes
0
answers
45
views
Missing following extensions: 'ftp' for Magento 2 [closed]
I am installing Magento 2 [Magento Open Source] edition. I have installed and enabled all required extensions for Magento installation.
Installed the Elastic service,
enabled all required extensions ...
4
votes
1
answer
79
views
Localhost links wrongly trigger blank VSCode
(Thanks for the updates about what was missing @AD7Six)
I am using AMPPS to execute PHP Mysql and Apache. Recently I started using VS code in order to develop the PHP pages. But every time I open one ...
1
vote
1
answer
68
views
How can I delay $_errors and $_success while keeping my code on the next following login.php?
I own a jewellery company and I'm making a login system for my webshop. Here I'm using a register.php whereas I want to delay $_success and $_errors messages, and the code that is actually taking care ...
-3
votes
0
answers
120
views
Oxwall validation fails on PHP 8.3: "Please fill ..." error specifically when copy-pasting text [closed]
I am running an Oxwall-based site and recently upgraded to PHP 8.3. Since the upgrade, I've encountered a strange issue with form validation.
The Problem:
When users fill out a form (e.g., Forum posts ...