1,464,307 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
31
views
Issue with OAuth flow when reinstalling app from Uninstalled tab [closed]
I have a custom Shopify app that installs correctly via the shop domain. The OAuth flow works as expected: the merchant enters shop domain in form in my app, then redirected to Shopify for approval, ...
Best practices
0
votes
6
replies
59
views
How can I fix the "exceeded quota" issue when using AI to generate articles in Laravel?
I am working on a blogging application in Laravel 8, which I named "Brave CMS".
I have recently added a "Write with AI" feature to the CMS.
In ArticleAIController.php I have:
class ...
2
votes
1
answer
63
views
How do I set the timeout on a socket [duplicate]
I'm trying to make a web page that can query a game server for call of duty 2, i seem to get issues with create a socket_create() im using php 8.3 the error i get is:
Fatal error: Uncaught TypeError: ...
Advice
0
votes
6
replies
70
views
Bind a socket to several IP addresses
I developed a PHP websocket server :
$serverSocket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($serverSocket, SOL_SOCKET, SO_REUSEADDR, 1);
if (!socket_bind($serverSocket, $host,...
2
votes
1
answer
80
views
How to correctly call a php function when script terminates, even from an error?
I've already read several possible SO duplicates such as this
and particularly this where hipertrtacker says register_shutdown_function can catch fatal errors and Peter Mortensen showed code very ...
-1
votes
0
answers
37
views
Determining PHP/MySQL encoding differences on 2 machines: MySQL Error 1366 only on one machine [duplicate]
I have some PHP pdo code that is copying data from one table (wp_posts) to another (a relational table structure). This is in the same schema with default
CHARSET=utf8mb4 COLLATE=...
-2
votes
0
answers
86
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....
-2
votes
0
answers
42
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
13
replies
164
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 ...
-2
votes
0
answers
70
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
60
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 ...
4
votes
1
answer
85
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
154
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
197
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
109
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 ...