Skip to main content

PHP Collective

Questions

Browse questions with relevant PHP tags

1,467,634 questions

0 votes
1 answer
14 views

Downloading wordpress core using wp-cli command

I have tried to install WordPress using the CLI command wp core download but I got: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) Can any one help me ...
Hari's user avatar
  • 9
-4 votes
0 answers
12 views

Fatal error: Class ‘mysqli’ not found in OpenCart after PHP update? can advise? [duplicate]

Fatal error: Uncaught Error: Class 'mysqli' not found in /home/u963972343/domains/upgraded.co.in/public_html/system/library/db/mysqli.php:7 Stack trace: #0 /home/u963972343/domains/upgraded.co.in/...
BIJENDRA KUMAR's user avatar
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 ...
Adam Roberts's user avatar
-3 votes
0 answers
37 views

How to visualize dated data by date without date redundancies? [closed]

I'm creating a financial visualizer that runs on PHP and MYSQL with Chart.JS for the graph part. The user can submit a transaction to the database that gives the following info: How much money And ...
Johan Pagba's user avatar
0 votes
1 answer
42 views

Save Drop Box Multiple in PHP in more then one row (In array)

I have a form. Which has more then one dropbox with multiple selection. Find an issue to save the filed in array. Form structure is like this :- <form> <select name="mtype[]" ...
Prodhyogiki's user avatar
0 votes
0 answers
36 views

input text change avatar [closed]

I have a chat where the user changes their avatar using a library, but it overwrites the name and changes the gif to a static image. I thought of adding an input so that the user can change their ...
Paddy Power's user avatar
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 ...
CodersWorld's user avatar
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, ...
Dmytro Shved's user avatar
0 votes
1 answer
38 views

Reading from firestore in PHP not working with non-GRPC Firebase client

I'm using this firestore client that doesnt require GRPC and it is made by bensontrent GITHUB REPO: https://github.com/bensontrent/firestore-php The problem I have is that my index.php is not working ...
Ramburatskie's user avatar
0 votes
0 answers
44 views

Error before a $_Post is sent to the mysql query [duplicate]

I have the following code for a multiple dropdown menu, which takes the data from mysql database, then depending on the choice, displays a another dropdown menu. I have done this with php, javascript ...
Josu's user avatar
  • 1
0 votes
3 answers
45 views

How to locally deploy a Laravel + Vue.js web app in production mode?

I'm working on a Laravel (v11) + Vue.js (v3) web application and I want to simulate a production deployment locally to test performance, compiled assets, and configuration before going live. So far, ...
Jon Dev's user avatar
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 ...
Thomas Heck's user avatar
-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: ...
Jason Cagampang's user avatar
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=&...
Negar Javadzadeh's user avatar
1 vote
1 answer
49 views

Adding a custom link to products stop variations being added to cart in WooCommerce

I have an issue with some basic code on my WooCommerce project. I want to automatically add a link to a related demo product, to notify the customer. I am adding that link using ...
user30379416's user avatar
1 vote
1 answer
34 views

PHP imagick convert PDF with multiple pages to A4 PDF

I'm struggling converting multipage pdf files to A4 pdf files. I am using imagick to convert uploaded jpegs to A4 pdf files, but I just cannot simply resize multipage pdf files. Anything I try to do I ...
Marcel Krebs's user avatar
-2 votes
0 answers
23 views

I want to connect elFinder library with OneDrive [closed]

I wan't to connect elFinder library with Microsoft OneDrive but failed to do. I have spent many hours but still no progress. The code I have implemented <?php add_filter( 'fma__opts_override', ...
Syed Ali Ahmed's user avatar
0 votes
1 answer
55 views

Optimal Architecture for Dynamic Multi-Service Questionnaire System (Laravel/PHP) [closed]

I'm designing a Laravel-based system to manage dynamic questionnaires for hundreds of services, where each service has its own unique question flow with complex branching logic. Core Requirements: ...
Hani Masoud's user avatar
1 vote
1 answer
55 views

How to get the session value set in the API controller

I'm using laravel 12.0.1 and try to check the user is logged in or not in the middleware. I set the session value in api Controller, but when I call this value in the middleware, it is null. And my ...
takoChen's user avatar
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 ...
josephchain440's user avatar
-3 votes
0 answers
40 views

phone connection rendering faster [closed]

Regardless of browser, my site loads instantly on my phone and takes about five seconds on (a well spec'd)desktop. I can only guess my hosting provider is providing faster php execution for smart ...
badcarbine's user avatar
-1 votes
0 answers
52 views

MYSQL Incorrect DATE value: '202023-05-01' [closed]

Here I have a problem so when I access the admin dashboard of the system there is an error 500 which error is caused by what probably happened in the database: https://prnt.sc/P2nHb6-T6q-L The ...
jasaweb's user avatar
-1 votes
0 answers
30 views

Show products in stock only in certain page Woocommerce [closed]

I need to show all the products with stock only in some particular page. In my case, the page ID is: post=36886 I tried this code just for testing purposes trying to see if something happen (I know ...
Fran's user avatar
  • 103
0 votes
1 answer
53 views

Laravel Sanctum generates new XSRF-TOKEN for stateful API Requests

I use Laravel Sanctum to authorize SPA application requests (NuxtJS). In general, I understood the idea with the /sanctum/csrf-cookie endpoint and am already sending a request using axios, which ...
jsssy's user avatar
  • 1
-1 votes
1 answer
39 views

Laravel Error: Target class [files] does not exist (on fresh install)

I'm working on a fresh Laravel 12.12.0 project and facing a strange issue that I can't resolve. Whenever I try to run any Artisan command (like php artisan serve, php artisan route:list, or php ...
Sohag's user avatar
  • 1
0 votes
1 answer
22 views

Placing result from single/dual-column SQLite query into a multi-column HTML table with PHP

I am trying to generate two dynamically populated grids from two different SQLite tables using a multi-column layout. Unfortunately, I am not having a lot of luck with it: The first grid contains ...
Graf Eberstein's user avatar
2 votes
1 answer
66 views

php8 is there a way to use both named args and variable args in a function call?

Going through a code review and found named argument call being used to a argument that uses the spread operator for variable args (vargs). To my suprise it works fine for 1 argument, but I cannot ...
Alex Dawn's user avatar
0 votes
2 answers
41 views

How to allow a certain differences in a text assertion for a test case that has some expected changes in data using phpunit?

I am setting up a golden master test case, yet the result may be off at certain points due to side-effects changing some strings at known places. Getting rid of those side-effects would be best, yet ...
k0pernikus's user avatar
  • 67.2k
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: ...
Maxim's user avatar
  • 649
0 votes
2 answers
36 views

PHP SoapClient doesn't receive all SoapFault data

When I send a request to a Webservice using SoapUI, it will occassionally throw various SoapFault errors, i.e. when the searched for customer doesn't exist. In the XML these usually include a <...
yeen's user avatar
  • 1
1 vote
1 answer
57 views

Custom env file directory in Laravel 11

I am trying to set a custom directory for the .env file in Laravel 11. I've seen various solutions and it half working, but not loading the right env file in the controller. app.php: use Illuminate\...
samiles's user avatar
  • 3,910
-1 votes
0 answers
49 views

Amadeus /v2/schedule/flights API suddenly returning flight times with incorrect hours [closed]

We've been using the Amadeus Self-Service API /v2/schedule/flights for a while to retrieve scheduled flight times. Until recently, the values under departure.timings[0].value and arrival.timings[0]....
Kots's user avatar
  • 1
6 votes
1 answer
104 views

How print every line of a php script as its being executed?

How to print every line of a php script as it's being executed? For example in Python you can do $ cat test.py import time print('hello') time.sleep(3) print('goodbye') $ python -m trace -t test.py ...
hanshenrik's user avatar
  • 21.9k
0 votes
1 answer
78 views

Laravel route inside prefix not resolving correctly 404 given

I’m running into a routing issue in my Laravel application and could use some help figuring it out. In one of my views, I have a modal that allows users to search for coupons via a small Alpine.js ...
Ric Bocad's user avatar
-4 votes
0 answers
65 views

Laravel application not loading some images when using php artisan serve at http://127.0.0.1:8000/login [closed]

I'm building a Laravel application and running it locally using php artisan serve. The login page at http://127.0.0.1:8000/login is working, but some of the images (like logos, backgrounds, or icons) ...
P.Logarjana's user avatar
1 vote
1 answer
53 views

Displaying individual rows with same key as part of larger associative array using PHP and HTML

I am trying to display data from multiple MySQL tables in individual text fields in an HTML form using PHP. Here are three sample tables from a database, followed by code that I am using to select ...
Dave's user avatar
  • 11
-4 votes
0 answers
68 views

Best Practices for Syncing PHP and TypeScript Types [closed]

I’m working on a monorepo app using Laravel (with Blade) and Vue components, and I’m wondering—have you ever come across a good way to share types between PHP and TypeScript? Or is it usually better ...
Sanja's user avatar
  • 328
-3 votes
0 answers
37 views

Fastmail as admin mail of SMTP Configuration [closed]

We previously set up server mail as admin email. now my client want only fastmail as admin email. He also wanted to give feedback the client from fastmails email //Here is my previous configuration ...
Joynal Abed's user avatar
1 vote
1 answer
43 views

Make specific hidden order item metadata editable in WooCommerce Admin Edit Order

WooCommerce lets you add meta data to each order item. Plugins can do this, or you can manually add the meta data from the edit order screen. When you edit the order item (click the little pencil icon)...
Curious Toad's user avatar
0 votes
2 answers
65 views

Pass mp3 player event time to a php variable [closed]

I am using an mp3 audio player in a php script as follows echo "<b><font color='red'>$pic1</b></font>"; } ?> <br><br><audio controls preload='...
mark.four's user avatar
0 votes
2 answers
41 views

SSRS CSV export via PHP cURL returns incorrect encoding (e.g. "–" instead of "–"), but works when downloaded via browser

I'm using PHP with cURL to programmatically download SSRS (SQL Server Reporting Services) reports in CSV format. The download works, but the character encoding is off. For example: Text that should be ...
Moussa's user avatar
  • 71
-3 votes
0 answers
54 views

Email dashboard with codeigniter4 [closed]

I am trying to reproduce an email dashboard with CodeIgniter4. I have a problem with the view for sending an email. The problem: if in the send() method I use this code where I store the files ...
vidag's user avatar
  • 1
0 votes
0 answers
36 views

Read xml from url [duplicate]

i have a problem with reading data from an XML file and printing them on the screen. I created an auto.php page on the aruba server with the following code, when I open the page it says "Failed ...
Gianluca Galfano's user avatar
4 votes
1 answer
53 views

Preprocessing function never called

I'm very new Drupal Developer, and I would like to know why some of my preprocess function are never called. At the beginning, I only used one single preprocess function. // Before function ...
Nicolas's user avatar
  • 43
0 votes
0 answers
52 views

PHP Call to undefined function $name = call_user_func [closed]

Hello i have this issue but im not figured out why Error: Call to undefined function Wachat() in /home/hexahos4/public_html/modules/addons/wachat/classes/WachatGateway.php:112 Stack trace: #0 /home/...
fey's user avatar
  • 1
-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?
Deka Pramesta's user avatar
0 votes
1 answer
89 views

Laravel 11 Passport installation failed [closed]

I encountered the following error while trying to install laravel/passport. I've already added extension=sodium to my php.ini file and attempted to install the package using the command: composer ...
A'in Amran's user avatar
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 ...
raphael75's user avatar
  • 3,248
1 vote
1 answer
56 views

PHP-FPM Address already in use with docker

I am working on an application which have 3 different laravel project, What I am trying to do is I will have one single nginx docker container that will serve those 3 laravel APIs. The problem I am ...
Rudra Sarkar's user avatar
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) ...
Camila L. Oliveira's user avatar


15 30 50 per page
1
2 3 4 5
29353