Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
5 views

Undefined array key "search_value" [duplicate]

Why am I getting this error? What am I doing wrong? Undefined array key "search_value" The website is working the way I want it to but this error is driving me crazy. <?php $search = $...
rodelishere's user avatar
-1 votes
0 answers
15 views

$pdo->beginTransaction(); | commit(); | rollback(); || Only one per "prepare->()" or one per code?

Should I beginTransaction / Commit every prepare->("") statement? Or only one per code? I'm wringting some big stuff using this way, but I'm worried that, when I finish it, its all wrong. ...
vwinck-dev's user avatar
-1 votes
0 answers
7 views

how to do split in jquery? [duplicate]

some of the phone data in my table is 03121234567, some are 03121234567,05321234567 if there is no comma in the expression print option 1 if there is a comma, print first 1 and then 2. how do i do ...
Ilyas Aydoğdu's user avatar
0 votes
0 answers
6 views

Adding an icon in google search results

where do I need to code on my website to show the little 20 x 20 icon that appears in google search results ? I do have a Site Icon which is what you see in browser tabs, bookmark bars, and within the ...
user2197774's user avatar
-1 votes
0 answers
16 views

I am not sure why my PhP form code isn't working [duplicate]

This code is supposed to send an email when a user completes the form. I'm not sure why it isn't working. I have tried to write PhP code to send the users' responses to my own email address. I am not ...
Sarah 's user avatar
0 votes
0 answers
13 views

Inserting an image from file into sql blob

My PHP code takes an uploaded file, converts it to a standard size and saves it as an image. So far so good. What I'm now trying to do is insert the images into a BLOB in an auto_incremented MySQL ...
Bert D's user avatar
  • 1
1 vote
0 answers
31 views

Understanding Promise chaining in PHP

I found this piece of code in a Github PR that aims at adding the Redis Sentinel support to a Redis client. (Redis sentinel is a service that will frequently check the state of multiple redis, and ...
Quentin Lerebours's user avatar
0 votes
0 answers
16 views

Ovewriting wc_create_new_customer WooCommerce function to allow subscrtiption purchases from guests

In WooCommerce, I need to allow people to checkout without having to register for an account when they buy subscriptions. In Accounts & Privacy in WooCommerce admin section, I have only one option:...
MikeG001's user avatar
-2 votes
0 answers
21 views

How to insert blob data into multiple blob column in a table in Oracle stored procedure using php?

I have a table with multiple column whose data type is blob in oracle. Now how can I insert multiple blob data into the table. Following is the example but here there is only one column type of blob ...
hiren patel's user avatar
0 votes
1 answer
22 views

Composer's autoload: Using "require_once vendor/autoload.php" inside an class that it already loaded?

I am using Dotenv\Dotenv library to call $_ENV[] superglobals, which stores the info of the database I'm using on (generic example, but the question repeats on the others contexts). In the code above, ...
vwinck-dev's user avatar
0 votes
0 answers
23 views

How to Remove Menu Items in Wordpress

I am trying to remove some menu items for my ShopManager to simplify her admin portal and also restrict access to certain features. I managed to remove some items from the Woocommerce menu. However, ...
devOP1's user avatar
  • 435
0 votes
0 answers
13 views

Randomize pages on WordPress

I'm trying to make the featured module on my website (www.twohitgames.net) under the news (in grey and a photo on the left) always launch a random page every time you enter. I've found the function ...
David Cabezas's user avatar
0 votes
0 answers
6 views

I want to display the "No Images" products at the end of a category listings. How can we achieve this sorting with best magento 2 practices?

In magento 2.4.x Category listing page. I want to move all the products which have NO IMAGES at the end OR you can say at the last page. What is the best practice of magento 2 to achieve this ...
Areeb Khan's user avatar
-1 votes
1 answer
29 views

a+ file mode writes twice the expected lines in php

When I run the following code (I don't have test1.txt already created): <?php $fp= fopen("test1.txt", "a+"); if(!fwrite($fp, "data\n")) echo "writing to ...
ramank27's user avatar
-2 votes
0 answers
37 views

Why is PHP showing the variable $greeting literally instead of processing it in my view? [closed]

I'm working on a CodeIgniter 4 project and using a custom template library to manage my views. I’m encountering an issue where PHP seems to display the variable name $greeting literally instead of ...
Noir's user avatar
  • 1
-2 votes
0 answers
32 views

Why doesn't https://www.xml-sitemaps.com generate a sitemap of my PHP website? [closed]

I am trying to generate a sitemap.xml with this https://www.xml-sitemaps.com for my new PHP website. It used to work perfectly fine with my old html website and discovered all the articles but now it'...
Cris D's user avatar
  • 11
-2 votes
0 answers
25 views

Trying to upload photos into a MySQL database on UPDATE database to allow users to edit their profile page with a photo [duplicate]

I am creating a php login system which allows users to create and update their profile page. Within this profile page one element is a photo, which they can upload (to the database) and then display ...
Luzzi98's user avatar
  • 17
3 votes
2 answers
59 views

Use different .env file for Laravel application?

Laravel comes by default with a .env file that comes under the root folder when you create a new project. I am having a fresh Laravel installation with this folder structure root/ ├── docker/ │ ├── ...
ltdev's user avatar
  • 4,427
1 vote
1 answer
29 views

VSCode Syntax Highlighting CSS/PHP mixed

I have a file style.php that contains css primarily and php in some areas. Syntax highlighting is completely broken in this scenario. <?php header("Content-type: text/css"); ?> :...
Fluxian's user avatar
  • 852
-1 votes
0 answers
38 views

How to correctly configure PHP/Appache to self-host a Kanboard server? [closed]

i am having issues with setting up a Vhost hosting Kanboard It is the first time i use shell, php and apache. I wanted to install ‘Kanboard’ on MacOS Sonomoa to use it for a personnal purpose. I want ...
gabyy_rx's user avatar
1 vote
0 answers
40 views

Laravel 11 API: Always got unauthenticated message

I am using Laravel 11 for API with sanctum for authorization. Login works fine but logout always get unauthenticated with Http Status 401. How to solve this problem and return HTTP status 200 as it ...
user27365176's user avatar
-1 votes
0 answers
31 views

Custom PHP settings PHP-FPM best practice [closed]

I am setting up a LEMP server (Ubuntu/Nginx/PHP) with PHP-FPM, and I was wondering what is the best practice for modifying global PHP settings? There seems to be a few options: Edit /etc/php/8.3/fpm/...
suncat100's user avatar
  • 2,194
0 votes
1 answer
24 views

Adding a new column on 'customers' tab on Restrict Content Pro - Agree terms

I am using Restrict Content Pro and I am trying to introduce a new column to my customers table on the WordPress dashboard. I want the column to be named something like 'Agreed Terms' and for each ...
Kieran Lythgoe's user avatar
-1 votes
1 answer
40 views

Date Format with PHP using Datetime

I have two dates I need to show it in format 29th and 30th November 2024 or 28th to 30th November 2024 or 28th October to 30th November 2024 or 30th November and 1st December2024 What I tried so for ...
B L Praveen's user avatar
  • 1,978
-3 votes
1 answer
32 views

Unverified breakpoint and breakpoint is not working (Laravel, Xdebug, VSCode)

I'm currently a beginner of PHP. I tried to config and run Xdebug in my IDE but it's not working after I searched a ton of online resources. And while I'm trying to run Xdebug, my breakpoint was ...
vietvip's user avatar
0 votes
1 answer
34 views

TYPO3 extend final classes

I have the following issue: <?php declare(strict_types=1); namespace Abc\Def\Services; class TypoScriptProvider extends \TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager { public ...
180690's user avatar
  • 301
0 votes
1 answer
44 views

Get return value of Stored procedure in PHP with no any Parameters

I'm little bit confused how to get the return value of SP SQL Server using PHP. It doesn't display anything at all, but if I run EXEC SP_NAME in SSMS it looks fine. Can someone teach me and help me ...
Ramzi's user avatar
  • 162
0 votes
2 answers
43 views

Laravel 7 query whereBetween 2 month

I want to find data between 2 month, for example data between months 8 and 9. Edit: The issue is in this line else if ($bulan1 != "semua" && $bulan2 != "semua") { $query-...
Febryan Akhdani's user avatar
0 votes
2 answers
57 views

How can i make a select start at a specific point without using selected

We have this select to select year of birth. Looking at the statistics of last couple of years, most users (close to 70%) are between the ages of 26-34. When the user opens the select, We want it to ...
MB99's user avatar
  • 3
0 votes
0 answers
20 views

How to convert gulpfile.js from laravel 5.2 to Vite in laravel 10

I have a gulpfile.js file from laravel 5.2 used to build JS and CSS files for the laravel public/build folder. I'm trying to make this old project in laravel 10 using Vite but I have no idea how to ...
Ashley Mok's user avatar
0 votes
1 answer
27 views

Symfony-ux-live-component No matching "form" property or mount() argument was found

class PostForm extends AbstractController { use DefaultActionTrait; use ComponentWithFormTrait; /** * The initial data used to create the form. */ #[LiveProp] public ?...
Onesine Nkemy A Lontio's user avatar
-1 votes
0 answers
25 views

Laravel Herd doesn't work at all after reinstall

Both Valet and Herd stopped working. No sites would load, just 502 nginx errors. I tried reinstalling both Herd and Valet, but that did not fix it. So I removed all traces of every version of PHP, ...
eComEvo's user avatar
  • 12.4k
-3 votes
0 answers
43 views

PHP response to AJAX Callback printing to screen [closed]

I encountered this really strange issue where my php method is sending back a json response after successfully saving the record into the database but the response is being printed on the screen ...
Poorvi Yeluri's user avatar
0 votes
1 answer
31 views

WooCommerce and Polylang: Send Email Notification given the language in which the order was placed

I am working on sending email notifications in the language in which the order was placed, using Polylang. Currently, my email notifications are sent in the language of the user who triggered these ...
roboes's user avatar
  • 402
1 vote
2 answers
52 views

Add a custom column to admin users list displaying custom user metadata

I have added a custom meta field to users called "customer_code". This all works and stores the information just fine. I have added the "Customer Code" column to the users admin ...
Graphic Detail's user avatar
0 votes
0 answers
33 views

Swiper does not work in separated Tab in PHP

In the <div class="B"> section, if I write: <?php for ($i = 1; $ i <= 1; $i++) : ?> it works, however this: <?php for ($i = 1; $i <= 7; $i++) : ?> does not work ...
ligtning's user avatar
1 vote
0 answers
15 views

Is it possible for a magento 2 plugin to display a html written warning based on certain conditions?

These are two files i'm using to print a warning: extra.html(https://i.sstatic.net/IYo7wvWk.png) data.html(https://i.sstatic.net/TMabfFrJ.png) This is what i'm getting but it's static, i want it to be ...
Santiago Gutierrez's user avatar
0 votes
2 answers
44 views

How to force a download using Symfony 6's forward function?

The problem is to send data from one controller to another controller using Symfony's forward function. The function is explained here In my first controller, I perform a query bounded by dates ...
Jorge H's user avatar
  • 352
0 votes
0 answers
22 views

PHP: Is feof() always required for fread()? [duplicate]

In PHP feof() tests for the end of file, but the documentation says that fread() would stop once the end of file is reached: fread() reads up to length bytes from the file pointer referenced by ...
Tintenfisch's user avatar
0 votes
0 answers
9 views

Flutterwave Transfer Issue

I'm trying to integrate flutterwave transfer feature to my website, fetching of banks and bank codes are working, verification of account name is working but when I input amount and initiate the ...
Test's user avatar
  • 1
-1 votes
1 answer
55 views

How to use different code snippets inside a while() loop in PHP?

I'm not sure how to ask this question properly. I modify CSV files in more steps in PHP. I've created a class for the files, and some methods. In most methods I have to read the CSV and change ...
user2511599's user avatar
0 votes
0 answers
26 views

php -v and php -i show different versions that phpinfo() and Plesk Control Panel

php -v and php -i both show that I'm running PHP Version => 5.4.16 on my CentOS 7 server. When I look at phpinfo() the PHP version is 7.4.33 (the correct version) which is the selected version ...
George 's user avatar
0 votes
0 answers
43 views

file_put_contents fails only when accessed from cURL

I have a page that I use for retrieving data that I want to curl via a cron job once a day. When it's run, it's supposed to fetch some data, process it, and then write it to a series of files with ...
austinl's user avatar
0 votes
0 answers
23 views

PHP proc_open vs pcntl_fork performance

I want to run hundreds of parallel php processes from a PHP script. Which will provide better performance: proc_open or pcntl_fork?
Nikolay's user avatar
  • 318
1 vote
3 answers
52 views

How to Pre-fill WooCommerce Product Descriptions Based on ACF Field Selection?

I'm trying to dynamically pre-fill the product description and short description in WooCommerce based on a custom ACF (Advanced Custom Fields) select field. The field allows the user to choose between ...
Alper Sonmez's user avatar
0 votes
0 answers
24 views

Where to include conditional logic in Wordpress block style templates?

I am trying to rewrite a classic WP theme as a block theme. In my current classic theme, where I display a list of posts, I use php logic to display or hide certain elements. E.g.: If a post includes ...
Adam Pearlman's user avatar
0 votes
0 answers
24 views

How to rectify this authentication problem [duplicate]

I am creating a login page for my new project. When logging in, the password can't match. It says Invalid password. This is my code. <!DOCTYPE html> <html lang="en"> <head&...
don Maleesha's user avatar
0 votes
1 answer
52 views

Which query to use: REPLACE/WHERE NOT EXISTS/NOT IN

There is a one to many relation in the database which needs to be updated. There is a table tasks and a table users which are linked with a table task_users containing three columns: id, task_id, ...
Sean's user avatar
  • 1
-1 votes
0 answers
39 views

How to check for duplicated code on php project? [closed]

I have been using phpcpd with grumphp for a while to detect duplicated code blocks on the project, and so far it worked like a charm, but right now Im working on migrating my project to PHP 8.3 and ...
Anibal Cardozo's user avatar
-4 votes
1 answer
45 views

Add up all numbers from a WordPress query [closed]

I have the following code $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $post_id = get_the_ID(); ...
Yorlinq's user avatar
  • 123

1
2 3 4 5
29355