1,461,583 questions
Score of -1
0 answers
17 views
PayPal Checkout Fails – No Order Created, Webhook Test Fails, create_order_error
I am experiencing an issue with WooCommerce PayPal Payments on my live store and would appreciate your assistance.
Website
[ redundant link deleted ]
Environment
WordPress: Latest
WooCommerce: 10....
Score of 0
0 answers
54 views
PHP Script runs in Browser but nor in cli or cron [duplicate]
I run the website on my Synology NAS in the WebStation.
I have this php code in the file upload.php witch works fine if I call it in a browser.
<?php
include_once('core/Controller.php');
...
Score of 0
0 answers
54 views
After removing PHP 8.4 I still see 8.4.1 in the CLI [closed]
I intend to use PHP 8.5 both in my cli and local webserver. When I run
php -v
then the result is
PHP 8.4.1 (cli) (built: Nov 21 2024 08:58:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, ...
Score of -1
0 answers
66 views
File access for LOAD DATA LOCAL INFILE [closed]
I have a module that reads a server log and populates a mysql table with this
$sql="LOAD DATA LOCAL INFILE '/var/log/apache2/access.log' …
By itself it fails, saying that the file can't ...
Score of 1
1 answer
134 views
Is it possible to enforce checking all possible return types in PHP?
Assuming I have a function that returns a union of types, such as:
<?php
function myFunc(): ?string
{
// ...
}
Or even:
<?php
function myFunc(): string|MyClass
{
// ...
}
Are there ...
Score of 1
0 answers
133 views
How can I optimize Eloquent relationships when importing millions of records?
I'm importing several million records from a third-party API into a Laravel application. Each record needs to be associated with existing models using Eloquent relationships (e.g., belongsTo, hasMany, ...
Score of 0
0 answers
96 views
MediaWiki doesn't see extensions, but php does. (XAMPP)
I am trying to set up a MediaWiki service with XAMPP on Windows 10. I am using XAMPP ver 8.2.12 VS16 x86_64, but because it also comes with php ver 8.2.12, I had to upgrade to php 8.5.8 by swapping ...
Score of -2
1 answer
116 views
url rewrite showing php of page
I'm trying to make it so when a user views mydomain.com/33 it will show view.php?id=33
# nginx configuration by winginx.com
default_type text/html;
location / {
if ($http_host ~ "^www....
Score of -1
1 answer
168 views
Invalidate strings that contain building/home number (18, 18a, 18b) [closed]
I am making a form that has street name and house number in separate fields and I want to validate them. How do I validate that a string has spaces letters and numbers, but doesn't end with space and ...
Score of 0
1 answer
103 views
Stream behavior in PHP
When getting a stream from an API using cURL with CURLOPT_WRITEFUNCTION I can keep a stream alive. A callback function can do things with the data as it comes in.
But I can't do this with fopen() ...
Score of 0
0 answers
89 views
CSRF token works on all forms except comments form - Session token missing in POST
I have a PHP website where CSRF protection works perfectly on all forms (contact, support, subscribe, add_post, edit_article) except for the comments form.
The problem:
The CSRF token is generated ...
Score of -1
1 answer
106 views
Replace element in array
I have a string
$sProducts = '2:1:-1:-1, 1:1:-1:-1, ..., n';
and an array
$aCount =>
(
[0] => 2
[1] => 3 .
.
...
Score of -1
0 answers
87 views
How can I detect the final destination URL after multiple HTTP redirects in Laravel?
I'm building a backlink monitoring SaaS in Laravel 12 where I need to verify the final destination of thousands of URLs. Many URLs return one or more redirects (301 or 302) before reaching the final ...
Score of -2
0 answers
188 views
Get number of rows (not the output) back from Ajax call invoking query in PHP class
I'm attempting to get the number of rows returned by a query in a PHP class member function back client-side. The output of the Ajax call is fine, no problems, but within the member function I update ...
Score of 0
2 answers
120 views
Need help in 419 token Mismatch in Laravel Sanctum SPA [closed]
The issue what i am facing is like i have configured Laravel Sanctum SPA just hours ago. It was literally working and now when i again used it it did not work i configured everthing which i will show ...