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
167,923 questions
No answer
0
votes
0
answers
13
views
Easy way to autonomous periodic data update in Laravel, PHP
How can I autonomous calculate and update value for one column in my Laravel project? I have no much experience in web-dev, so I just dont how to do it effective.
For example, now I've column "...
0
votes
0
answers
8
views
Laravel MongoDb Aggregation For unique and null
I want to retrieve documents from mongoDb by using MongoClient for parent_id is only first of same and parent_id is null.Only one aggregation.
$search[] = [
'$group' => [
...
-2
votes
0
answers
13
views
PHPUnit 'Error : Class "path\to\class\classToTest" not found'
I'm trying to write some unit tests. However no matter what I do I keep getting this error:
Error : Class "path\to\class\classToTest" not found
The test I'm trying to run has a simple ...
1
vote
0
answers
38
views
How to modify a PHP class to accept PgSql\Result as an attribute
I need to find a way (if possible) to make a PHP class accept a PgSql\Result object as an attribute. PHP 8.1+ has migrated the pgsql result resource to the PgSQL\Result instance. In prior versions ...
-1
votes
0
answers
15
views
Cannot connect to Postgres from my php/symfony application
I'm having issues connecting to any database from my php/symfony application
when I try to connect to pg_connect("host=localhost port=5432 dbname=dbname user=username"); the app just dies ...
0
votes
0
answers
20
views
Live reload server (Gulp + BrowserSync) for php files doesn't work inside docker container
I have a fully functioning live reload server for my php projects using Gulp and BrowserSync:
gulpfile.js
const { watch, series } = require('gulp');
const browserSync = require('browser-sync');
const ...
0
votes
0
answers
16
views
Google PlayIntegrity API validate token via PHP
I try to get device verdict with google play integrity token, but always have a million errors and I can't understand whats wrong. My Code:
<?php
use Google\Client;
use Google\Service\...
0
votes
0
answers
21
views
Json error: Cannot modify header information – headers already sent on Aws-bitnami
Inquiries regarding logs in the following format are probably the most common due to json errors related to WordPress.
[Thu Jul 25 13:00:50.367263 2024] [proxy_fcgi:error] [pid 26574:tid ...
0
votes
0
answers
30
views
PHP not connect to Microsoft Fabric database
I am attempting to connect to a database on Microsoft Fabric, but it will not connect. It does not display any error messages, nor is there anything in the logs. I am at a loss for what the issue ...
0
votes
0
answers
16
views
filtered special Database statements for google index
I have the url() statement in my database. all in www.site.com/random_alias format (splash pages).
Some links were created by the admin (userid=1) and archived to specialized (archived=1).
how can I ...
0
votes
0
answers
15
views
Imagick creating PDF even though setImageFormat is set to JPEG
I have an odd issue that I cannot get to the bottom of. I'm using Imagick to generate JPG thumbnails of PDFs that are uploaded to a custom admin tool. However, Imagick is creating PDF files even ...
0
votes
0
answers
16
views
Why is Google Sheets PHP API failing when I insert a line manually in Google Sheets?
I have a PHP script adding lines to a Google Spreadsheet. It all works perfectly fine.
$client = new Google_Client();
$client->setApplicationName("Google Sheets API");
$client->...
1
vote
0
answers
13
views
Understanding uriTemplate and Variable IDs in Symfony API Platform
I'm currently working on a Symfony project using API Platform, and I'm running into some confusion regarding the uriTemplate system and how it handles variable IDs.
I have an entity called Article, ...
0
votes
0
answers
18
views
php file not found when path contains spaces using fastcgi unix socket
I am transferring a site that was built on windows xampp to a server running ubuntu 24.04, apache 2.4.62, and php 7.4.33. Everything is working fine except php files containing spaces anywhere in the ...
-2
votes
0
answers
29
views
I'm using the PHP Server extension in Visual Studio Code and received a message
Hi I have created a website with .php format and I need help to run these PHP files on VS code, here is the massage that shows "From v3.0.0 onwards, PHP server will open the server URL in your ...
0
votes
0
answers
8
views
GraphQL nested objects query returns internal server error
I am learning GraphQL server with PHP, MySQL and I have following problems with nested objects.
This is my ProductType.php:
<?php
namespace App\Types;
use GraphQL\Type\Definition\Type;
use ...
0
votes
0
answers
20
views
Remove backslash from escaped forward slash in a string
I have an array(imageURLS) of string in js. Used 'fetch' to send the array as JSON.stringify(imageURLS) to savedesign.php. The array elements are like ['shop/2.png' , 'shop/3.png']. But each elements ...
0
votes
0
answers
17
views
File Size & Resume Option is Not Showing While Downloading File with HTTP Header
I've written a code in php, which is used in downloading link like https://example.com/dl.php&file=test.zip. Here the file dl.php checks the HTTP refer, if it is allowed then it download the file ...
1
vote
0
answers
15
views
Using Laravel Reverb with Laravel and Nuxt and multiple apps/layers
I have a weird issue. I am using Laravel Herd Pro locally for development and I added a Laravel Reverb Server using the Services in Herd. I got these credentials:
REVERB_APP_ID=1001
REVERB_APP_KEY=...
1
vote
0
answers
18
views
prevent change quantities on cart page
I'm using combo offer woocommerce plugin to make a bundle product with specific item number of linked products.
I had unchecked this option:
"Buyer can change the quantity of combo products?"...
0
votes
0
answers
25
views
How to view images and sentences like "With text wrapping -Square" of Word - laravel-dompdf
I'm using laravel-dompdf now for printing pdf.
PDF format:
Two images are displayed on the right half of the first page.
The sentence is displayed as much as possible in the left half of the first ...
0
votes
0
answers
19
views
Problem with ACF Date Range and Repeater Integration in WooCommerce
I am using ACF to create fields integrated with WooCommerce. I am struggling to manage the tour status for each period in the Week Days mode:
The tour has 2 modes: Week Days and Exact Dates.
A tour ...
0
votes
0
answers
26
views
Microsoft Graph API Authorization Error: 'Invalid size of Code_Challenge parameter.'
I am trying to generate an access token via a PKCE flow to call the Microsoft Graph API.
I am following this msdoc : Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra ...
0
votes
0
answers
15
views
How to change "ownerRecord" in RelationManager in Filament 3?
It is a basic RelationManager example of PostResource:
public static function getRelations(): array
{
return [
MediaRelationManager::make()
];
}
$post->media() (morphMany).
...
-2
votes
0
answers
24
views
React Expo push notification, sending notification to required channelId from PHP
https://exp.host/--/api/v2/push/send
{
"to": "ExponentPushToken[***************]",
"title": "Test Notification",
"body": "This is a test message.&...
1
vote
0
answers
57
views
Accented chars in dates
I've a problem in formatting dates in it_IT locale.
I've a customer with a site running on PHP 8.0.3, and due to some certification issues (this customer has to mantain ISO27001 certification) I've ...
0
votes
0
answers
46
views
Problem while trying to run composer update
I'm currently working on the dockerized version of ProcessMaker 4.1.21 and I'm encountering the following error when I try to run the "composer update --ignore-platform-reqs" command :
PHP ...
1
vote
0
answers
19
views
Watermark for custom image size in WordPress
I use a watermark code for a WordPress theme. The code works fine, but it generates a watermark for every uploaded image. How can I modify my code to not watermark some image sizes?
I have an image ...
0
votes
0
answers
23
views
Laravel Backpack saves files twice
I'm using Laravel Backpack.
I have a Product model. It has photos (wow) that I upload when creating a model in the backpack admin panel.
But there is a problem! Photos are uploaded twice:
It was '...
0
votes
0
answers
42
views
Crypto-Key Header conflict with p256ecdsa value
I'm not sure if this is a PHP or crypto issue, but in my free time I am using PHP to attempt a Data-Free Web Push Subscription Update.
I have a class with a method I called save_ssl_keys() that ...
0
votes
0
answers
31
views
How can I properly set up custom rewrite rules in WordPress to handle URLs like https://example.com/single-staff/12/abc
I'm working with WordPress and have created a page called "single-staff." The URL https://example.com/single-staff works fine, but accessing https://example.com/single-staff/12/abc results ...
1
vote
0
answers
22
views
Why is the dispatch livewire 3 didnt emit the data
I have a problem where the dispatch didn't do anything. I'm using Livewire v3.5.2. So I have a form for updating the data in my database. The Livewire component to handle the form look like this
...
-1
votes
0
answers
24
views
Parse XML ro e-Factura with php
I have some problem when i try to read an xml from ro e-Factura system file with php, with this function:
function parseXMLFactura($path_xml) {
if (!file_exists($path_xml)) {
...
0
votes
0
answers
11
views
Set breakpoints to all functions inside specific directory in Visual Studio Code
I'm exploring PHP application that uses Laravel framework and I want to start debugging each time when execution returns to application code (inside "app" directory) and skip debugging all ...
-1
votes
0
answers
17
views
Php application - monitoring endpoint usage by users
I have a php application based on Php and Fat-Free Framework (also use mysql, influxDb, vue js in frontend). I would like to be able to check which endpoints are used and by which users and based on ...
1
vote
0
answers
36
views
Filtering Entries by Taxonomy
have a "courses" collection that contains two taxonomies: "courses_levels" and "courses_categories". Currently, I use the following loop to iterate over all courses by ...
0
votes
0
answers
34
views
Handling Fetch API Errors in JavaScript: Displaying API Response in a Popup
I'm working on a payment integration using the Payway API in a Symfony application with Twig templates. When I submit expired credit card details, the API correctly returns a JSON response indicating ...
0
votes
0
answers
32
views
How to use php artisan in gitlab-ci?
I have the following .gitlab-ci.yml file:
stages:
- pull
- optimize
variables:
GIT_SSL_NO_VERIFY: "1"
before_script:
- git config --global http.sslVerify false
- git config --...
0
votes
0
answers
12
views
Moodle 4.x failing to install via command line in Ubuntu
I am following this link to be able to setup Moodle on Ubuntu. Moodle command line instructions. I am getting a failure at line 187 in the /lib/installlib.php. I have put in the correct information ...
0
votes
0
answers
25
views
Wordfence 502 Gateway Timeout on Login
I'm experiencing a 502 Gateway Timeout error during the login process of my WordPress site, specifically when Wordfence is enabled. The error log shows:
2024/07/24 11:32:51 [error] 1858364#1858364: *...
0
votes
0
answers
30
views
How do I define a Laravel hasOneThrough method for this scenario?
I have an Order model that belongs to a Portfolio model, the Portfolio model belongs to a FinancialGoal model and the FinancialGoal model belongs to a User model.
The order model has this ...
0
votes
0
answers
48
views
PHP multiple checkbox save values in array like i clicked them
Hello i use a code that i found here but i have a problem.
The problem is that the result of all checkboxes are a sorted one. But i want that the sort is like i clicked them.
Like a Android Code ...
0
votes
0
answers
25
views
Microsoft Graph APIs - 401 being generated despite access token appearing to be OK - using PHP
Essentially when I make a call to try to retrieve a document from sharepoint via its URL I am seeing a 401 - which I also see if I take the access token and use it within Postman for example.
I have a ...
0
votes
0
answers
6
views
Laravel Lighthouse Package 6.42 - Custom Exception Creation and Missing RendersErrorsExtensions.php
i'm using the Laravel Lighthouse package version 6.42 to handle GraphQL operations in my Laravel application. I need to create a custom exception to handle specific error scenarios.From my research, I ...
0
votes
0
answers
23
views
Unable to handle websocket event laravel reverb
Reverb Version
1.0.0
Laravel Version
11.10.0
PHP Version
8.3.6
Description
I am experiencing an issue with connecting to Laravel Reverb in my Laravel application. Despite following the setup ...
0
votes
0
answers
19
views
Is there an easy way to append values based on column name in Google Sheets API PHP?
I'm trying to add values to Google Sheets via PHP API.
It seems to be easy to add ordered-based values, e.g.
$updateRow = ['A','B','C'];
$rows = [$updateRow];
$valueRange = new \...
0
votes
0
answers
11
views
How to make doctrine autofill generated values to model?
I have model that allows only to read property CreatedAt. This field is generated by SQL.
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue
*/
private $Id;
...
...
0
votes
0
answers
21
views
Issue with Night Shift Calculation in Laravel Export - Discrepancies Between Display and Exported Data
In my Laravel application, I have functionality to handle night shifts and calculate durations, counts, and overtime based on these shifts. This data is correctly displayed on the web page. However, ...
0
votes
0
answers
33
views
Change currency in WooCommerce orders without affecting the total
I'm making a big payment gateway for WooCommerce which has 4 sides:
first one is client side which will send data,
second side is main server which receives data and depending on some options it ...
-2
votes
0
answers
33
views
The specified symfony 1.4 route with param does not showing in UI staging server
I added page redirect in my UI but it does not support my staging server. this is my url
<a href="<?php echo url_for("@product_ebook?ean={$product->getEan()}") ?>">...
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