1,461,715 questions
Score of -5
1 answer
41 views
How can I make user and pass, pass through here?
Check inside execute(\[ ?\>\<?php
// JSON.stringify skapar den JSON-text som server/register.php läser från php://input.
body: JSON.stringify({
username: user,
password: ...
Score of 0
0 answers
65 views
AI generation works, streams (typed out) to the page, but keeps disabled and loading blocks
I am using Laravel 13, Livewire V3, and the Laravel AI SDK to generate AI messages based on Knowledge Chunks. That part works great, and it streams to the page.
However, the problem is that the ...
Score of 1
1 answer
143 views
Can someone help me fix my PHP CURL and LoadHTML() error?
I'm currently making a web crawler in PHP for my A level computer science project. I have it working, getting all the links from a page, trying to run the page, and then if it doesn't throw an error ...
Best practices
1
vote
5
replies
112
views
How to prevent database lock contention during high-frequency API state syncs in Laravel?
I am architecting a high-concurrency synchronization endpoint in Laravel where thousands of cross-platform mobile clients concurrently send payload mutations to update a single user state row in a ...
Score of -3
0 answers
170 views
Encrypt JS/Decrypt PHP [closed]
JS encrypting is working (I think):
function TestInfo()
{
secretKey = 'VPiWeZdL1JO9v5Lmnlx5Ae2JhqaIEX8X';
plainText = "This is a clear string";
// Generate a random 16-...
Score of 0
0 answers
114 views
Laravel 13 interactive Artisan prompts immediately exit on Windows 11 (exit code 255)
I'm experiencing a strange issue with Laravel 13 on Windows 11.
Any Artisan command that requires interactive input immediately exits before I can type anything.
For example:
php artisan migrate
...
Score of 0
0 answers
107 views
is_file returns false when files do exist [closed]
I am deleting files if there is no corresponding / matching file (they just have different file extensions, and are in different folders) but - !is_file keeps working as if no file are found when some ...
Score of 0
3 answers
120 views
PHP Intelephense not applying syntax highlighting despite correct language detection in VS Code
Problem:
I am experiencing an issue with the PHP Intelephense extension in Visual Studio Code. Although my files are correctly recognized as PHP (as shown in the status bar), the code remains ...
Advice
1
vote
6
replies
161
views
Wordpress Vs Core PHP for Sport club
we are actually planning to develop a website for our sports club. It includes session registrations, payment gateway, shop- e commerce and coupon generation options. Trying to figure out if word ...
Score of 0
1 answer
80 views
Wordpress custom Template - PHP Combine 2 Foreach
I try to create a custom WordPress template but i can't combine the code that i need.
I wanna combine this 2 PHP codes.
What i try is to echo for example a list of 3 posts with prefix in the title a ...
Score of 1
0 answers
120 views
PHPUnit Coverage for preg_match
I have this very simple code which I am failing to see how to reach a coverage target of 100%.
final class StringValidator
{
public function matches(
string $pattern,
string $...
Score of -1
1 answer
118 views
file not being deleted after its expiry time passes
I'm trying to make a rate limiting function that prevent users from using specific forms when they reach a certain threshold. The limit will get reset after a certain amount of time. When a user ...
Score of 0
0 answers
146 views
Woocomerce no product found hook not working
I am trying to execute a code on the product attribute page where there are no products this is my page as an example https://shop.mmstore.be/merk/rosso/. The problem is that the hook
add_action( '...
Score of 1
1 answer
130 views
How do I return to a different page using a different parameter to what my form uses?
I have created a form to update/edit rows in my database. This form works on updating the ID related to selected row that is updated. The page that this is selected from is displayed based on a ...
Best practices
3
votes
7
replies
267
views
PHP MYSQL Login Form, is there a better way to do it?
I am currently learning PHP and trying to follow good practices regarding login handling, sessions, input validation, and database access.
I wrote the following login script and added detailed ...