Stay up to date
We'll highlight new content in your collectives with a blue activity indicator on navigation items and posts.
Manage preferences
Questions
Browse questions with relevant PHP tags
165,206 questions
No answer
0
votes
0
answers
19
views
Gedmo/Doctrine Tree Extension Cannot use object as array
I've created an entity with a closure table and a repository alongside. I'm trying a basic example of building a tree but am seeing the error Cannot use object of type App\Entity\Discussion\Comment as ...
0
votes
0
answers
25
views
How to integrate a custom search option with dynamic filelds using CodeIgniter 4 master data listing UI?
Can anyone suggest a best way for integrating search/filter options for master data UI ?
I have around 20 fields/columns to search. I do not want to show 20 separate fields for this. Instead I want to ...
1
vote
0
answers
42
views
Instant response of the Like/Dislike buttons using Alpine.js in Livewire 3
I have logic for like/dislike button in two separate livewire components (LikeButton.php/DislikeButton.php)
The problem is I want like/dislike buttons react immediately after clicking
Currently, ...
0
votes
0
answers
40
views
How to handle authentication and authorization for multiple models (customer & staff) in Laravel with Inertia.js and Vue.js?
I'm building a Laravel application using Inertia.js and Vue and I want to support two different models with separate interfaces:
Customer frontend: Customers can create groups, tasks, and requests and ...
-1
votes
0
answers
20
views
Laravel Cloud Client Request Body is Buffer to Temp File
Good day everyone!, I would like to ask how to fix this error logs in my Laravel Cloud project.
A client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: ...
0
votes
0
answers
47
views
how to re-render all nested components?
I've implemented a nested search-select component using a Flux input with a dropdown to display database results.
The component's structure:
<div class="relative flex-grow" x-data=&...
0
votes
0
answers
28
views
How can I properly override templates and CSS in a custom PrestaShop 1.7/8 theme without breaking updates?
I'm building a custom theme for PrestaShop 1.7 (planning to support 8.x as well), and I want to override certain templates and styles without directly modifying the classic theme.
I’ve cloned the ...
1
vote
0
answers
36
views
PHP error_log - output file not having content
I'm having difficulties reading the error logs which php is supposed to write somewhere when I call error_log.
I'm in a docker environment and I'm loading a custom-php.ini file with this content:
...
-1
votes
0
answers
38
views
How to set OCI8 in ServBay PHP
I already added the oci8 extension to php.ini in ServBay configuration but I still can't turn on OCI8.
Is there any package that I should download and install to use OCI8 in ServBay php?
0
votes
0
answers
71
views
php segmentation fault when connecting to Access database
I have Ubuntu 24.04 and php 8.3. I'm trying to connect to an Access DB through PDO ODBC running on the command line. Here is what I have enabled:
$ php -i | grep PDO
PDO
PDO support => enabled
PDO ...
0
votes
0
answers
56
views
Problem with $_SESSION in PHP: array(0) { } before storing user data
I'm trying to authenticate a user and store the data in the session.
I expected that the session should contain the user's data after login, but the current behaviour is that var_dump($_SESSION) ...
0
votes
0
answers
55
views
google api php client re-use user token to call service as user after login?
When login with Google and using Google API Client PHP, I exchange a code and obtain token and user_id. I save the token and user_id for that user.
<script src="https://accounts.google.com/gsi/...
-5
votes
0
answers
42
views
Display root category only of post on archive page
I want to display the root (parent) category of my posts on the archive page. So far, I've found this code snippet <?php the_category( '', 'single' ); ?>, but it puts the parent in front of each ...
0
votes
0
answers
57
views
Laravel policy not being called when model is resolved dynamically
I'm running into an issue with Laravel policies not being triggered as expected.
In my controller, I retrieve a model based on a code provided in the request body:
public function validate(Request $...
1
vote
0
answers
23
views
Elementor page duplication between WordPress multisite subsites working inconsistently - only specific pages copy correctly
Background
I'm developing a WordPress multisite plugin that creates a new subsite and copies Elementor pages from our main site to the new subsite. I've implemented this functionality but have ...
0
votes
0
answers
37
views
Laravel login form refreshes without logging in or showing error message
I'm working on a login form in Laravel, but when I click the "Login" button, the page just refreshes without showing any error message, and I'm not redirected to the intended page (like the ...
-1
votes
0
answers
42
views
How can I do to submit my form's plugin (wordpress)?
I,m a junior developper and I try to code a plugin with color options, and while submitting my form I have the message : the link has expired, try later;
function ajouter_page_options_plugin()
{
...
2
votes
0
answers
51
views
Custom WordPress Customizer Control for Typography Presets renders blank section or fallback <select>, despite correct class registration
Problem
I’m building a WordPress theme and want a Global → Typography → Font Presets control in the Customizer that shows a grid of clickable cards (each card previews a heading/body Google-Font pair)....
1
vote
0
answers
80
views
How can I query for a price rate based on the price effective from date after determining the country from a phone number
I am trying to figure out how I can add surcharge rates to a set of call records. Up until recently the rates have never changed and I am able to get the right rate for a Call Detail Record (CDR) but ...
0
votes
0
answers
39
views
Issue with "In Stock Online" Status in Google Content API for Shopping
I'm using the Google Content API to update my product listings in Google Merchant Center. However, when I view the product on the Google Shopping page, it shows the status as “Contact for online ...
-4
votes
0
answers
63
views
DataTables warning: table id=sales-table - Ajax error. For more information about this error, please see http://datatables.net/tn/7
I am new and i have faced this error on my application. When operate this application on localhost it will works fine but when i try to host this application on domain server it showing me like this ...
1
vote
0
answers
37
views
Testing a race condition with pest
I'd like to test my laravel application to see if it is susceptible to a race condition. Using pest, I can submit sequential requests, but not different simultaneous requests.
For example:
$response ...
0
votes
0
answers
27
views
Can't get simple WooCommerce Memberships Filter Hook to work
I'm trying to register a function to a Woocommerce Memberships filter hook but I'm not getting any results. I'm following the docs from here. More specifically wc_memberships_member_discount_message ...
-2
votes
0
answers
67
views
Core PHP cURL - header origin pass null value
Payment gateway integration to access the URL, I'm using PHP's cURL function.
The code answer is 200 OK. However, it is not the intended answer. I reviewed the request headers in the developer tool ...
0
votes
0
answers
31
views
Laravel view not syncing with database pivot
I recently started a small excercise (I've been learning web developing since 5 months and just started a PHP Laravel course) creating a potential e-commerce and was tweaking the cart section.
The ...
-1
votes
0
answers
72
views
Problems starting MySQL on GitPod
I'm trying out GitPod to practice with Laravel, but I'm having a problem: every time I launch the workspace, I have to install MySQL, create the database, and import it. I've already created the ....
1
vote
0
answers
54
views
Laravel file in storage/uploads/... returns 404 on live server, but works on localhost
I'm deploying a website using Laravel on a server using CWP (Control Web Panel). On localhost, I can access files in storage/uploads/... just fine.
https://example.com/storage/uploads/...
0
votes
0
answers
37
views
Using Select on a has_many_trough relationship from filamentphp on pgsql
Am working with laravel 11 with filamentphp 3 on postgres db, I have a schema for Authors, Profiles, Posts and post_has_author.
author(author_id, profile_fk,...)
profile(profile_id,...)
post(post_id,.....
0
votes
0
answers
86
views
Why do base64 images not appear in Dompdf even though they are correctly generated?
I'm generating a PDF using Dompdf in Laravel.
In my Blade view, I'm capturing parts of the page as images using html2canvas and converting them to base64.
Example of my JavaScript code:
const rondes = ...
0
votes
0
answers
40
views
Stripe error: "No such payment_page" while using Checkout Session ID
I am integrating Stripe Checkout for embedded ui into my application.
After creating a Checkout Session (server-side), I am trying to use the session ID (cs_test_...) in my frontend/backend, but I am ...
0
votes
0
answers
17
views
'./dist/bootstrap-vue-next.mjs?' does not provide an export named 'BootstrapVueNext'
In my laravel application after i installing npm install bootstrap bootstrap-vue-next
and updating the vite.config.js :
import { BootstrapVueNext } from 'bootstrap-vue-next';
import 'bootstrap/dist/...
0
votes
0
answers
36
views
Drupal config sync but database drifting, how to automate 'database migration'?
I am using drupal11.
Specifically, I am using the paragrpahs module where on fresh install of the module it will create the module related entity tables in the database. Then I export my config ...
0
votes
0
answers
29
views
Opencart how can i remove query in seo link
<?php
namespace Opencart\Catalog\Controller\Startup;
/**
* Class SeoUrl
*
* @package Opencart\Catalog\Controller\Startup
*/
class SeoUrl extends \Opencart\System\Engine\Controller {
/**
...
0
votes
0
answers
44
views
404 error after form submission coming in wordpress
Hi I have created a form function code inside a theme functions.php file
my file is https://example.com/counsellor-registration/
which is showing html layout of form when i open this link .
problem is ...
1
vote
0
answers
91
views
Sending a 9MB JSON file takes 3 seconds
I have to provide data from a MySQL database, so I'm extracting that data with a traditional PHP/MySQL prepared statement, turning it into JSON with json_encode and echoing it.
This takes almost three ...
2
votes
0
answers
65
views
Schema::hasColumn() returns false for existing SQL table columns using Laravel and external database connection
I'm working on a Laravel 12 project that connects to a Microsoft Dynamics CRM SQL Server database through a custom connection. I've run into a puzzling issue: Laravel's Schema::hasColumn() returns ...
0
votes
0
answers
31
views
elastica throws an error when connecting via http(s)
I'm trying to set up on my machine a php service, along with an elasticsearch node
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0
container_name: ...
-2
votes
0
answers
34
views
Generate relative-path URLs with Slim Router
Background
I have an app published at a subdirectory of a domain: https://example.org/myapp2/ and it needs to use relative URLs.
But the relativeUrlFor method from Slim Router (FastRoute) generates ...
1
vote
0
answers
33
views
HiEvents Failed to create or fetch Stripe Connect Account: Only Stripe Connect platforms can work with other accounts
I'm trying to get hiEvents docker to run. I've set a webhook secret, public key and a secret key in my stripe dashboard and pasted them into the .env file which looks like that:
# See the README.md ...
0
votes
0
answers
70
views
Why am I getting a type mismatch on my Symfony form using an EntityType when using handleRequest?
In my application, I have a form generated using a class like so:
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('id', ...
1
vote
0
answers
70
views
Joining Laravel pivot through hasOneThrough relationship
I'm building a role based multi-tenancy system in my Laravel 12 project. a User is given a Role within a Company, they can only have one role within a company, but can have multiple companies assigned ...
0
votes
0
answers
60
views
Save order of custom entities in selection field
Let's say I have two custom entities:
Dish
Ingredient
The entities have a many-to-many relation with extra field: ingredient_position:
#[ORM\Entity]
class Dish
{
#[ORM\OneToMany(
...
0
votes
0
answers
28
views
Text input value showing as dollars in Laravel Filament..?? ( Ex: 1250 showing as 12.5 ).. How can fix this ..?
I set due_amount values when afterStateUpdate method in repeater :
$set('due_amount', collect($get('items'))->map(function ($item) {
return ($item['quantity'] ?? 0) * ($item['price'] ?? 0);
})-&...
0
votes
0
answers
38
views
Override cart.php template file issue in WooCommerce
I am making my own WooCommerce shop. For this I have copied the WooCommerce templates into <my_custom_theme>/woocommerce.
However I don't seem to be able to change the layout of the Cart. From ...
0
votes
0
answers
74
views
HTML Purify removing display:flex;
I am working on WordPress plugin, I am using a library known as Html Purify which is used to sanitize HTML.
while sending an email I have to sanitize all content using the library.
<?php
function ...
0
votes
0
answers
64
views
How can I point a subdomain at a directory without breaking PHP includes?
I am trying to use a subdomain to make an internal file browser on my site look flashier. My site is example.com. I have a directory at example.com/files/, with many various subdirectories.
I want ...
0
votes
0
answers
29
views
Showing Existing Files as Table on Edit Page in EasyAdmin 4.24.5, Symfony 7.1
I'm trying to implement a file management system for incoming invoices using EasyAdmin 4 in Symfony. I'm facing a specific issue:
What I want to achieve:
On the edit page, I want to show existing ...
1
vote
0
answers
75
views
Update z/OS Password Using PHP cURL Module
STARTEDIT:
The process below works and is the accepted answer. I don't know why but I can't reply with an answer, and I can only comment on this question, so I'm choosing to edit my initial question ...
0
votes
0
answers
42
views
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port)
I'm using Xdebug v3.4.0 (with PHP 8.3.9).
I get this error for every request.
I tried other Xdebug versions but still got the issue.
Here my php.ini :
[XDebug]
zend_extension = xdebug
xdebug.mode=...
0
votes
0
answers
66
views
PHP/SQL (MariaDB) - Transaction with self instanciation
I have a method that kill a character and if this character is married to another character, it also kill them.
public function kill(string $reason): void
{
$this->update(array(
'...
Members can contribute articles
Simply submit a proposal, get it approved, and publish it.
See how the process works
Simply submit a proposal, get it approved, and publish it.
See how the process works