Category "php"

How to chunk and generate pdf using dompdf in codeigniter for large data set

I have to generate a pdf file for very large data set (more than 1M). Can anyone explain how to chunk those data set into smaller units and download all data in

how to solve openssl problem on windows 11 pro while working on symfony jwt authentication generating key pair

openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem openssl : The term 'openssl' is not recognized as the name of a cmdlet, function, sc

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

I am using Evolution CMS (Modx) and have several functions declared (in snippets). Those functions I can include in Evo CMS by calling e.g. $modx->runSnippet

Undefined variable in Laravel 8 project (php 7.4)

Most of the functions i the project works but when it comes to register results I’m getting an error. This is an extensive pistol competition system where

WooCommerce coupon usage restriction by allowed user roles

we need to make an automatic discount coupon to be applied if the current user role is ( vendor ), we achieved that by creating a normal coupon then used the sn

How to extend PHP Laravel model's fillable fields in a child class?

I try to extend an extintig ˙PHP` Laravel model with some other fields, but I not found the right solution. I use PHP 7.1 with Laravel 6.2 Here is my code

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

Currently, Getting result based on scoring but what i want to do is i want a result based on scoring + Field Status with value true/false. If value is true th

Require a class from another class - php

I'm learning PHP. And I have a problem that I can't understand. This my situation: I have a directory called Lib. This is the structure of my directory: In the

storage\logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

I have developed my application in Laravel 8, it's working fine in localhost and Linux server. But When I deployed it in Plesk Windows Server it's showing permi

How can I solve this problem in my WordPress site Fatal error: Cannot redeclare get_rs_plugin_url()

I am trying to install Slider Revolution, but it shows the error below. Please help me resolve this issue! Fatal error: Cannot redeclare get_rs_plugin_url() (p

Woocommerce Checkout - Add conditional field required if one field is filled

I want to add a conditional requirement on the Checkout page. Because a lot of people fill the Name of Company without they are a company. And I want to add to

open(/var/lib/php/session/...sesionid, O_RDWR) failed: Permission denied (13)

I am running my website on using ec2 nginx. I have done a update on the instance and now I getting this error when the site loads. open(/var/lib/php/session/ses

Get NPM Package README via API

I need to get NPM Package README files in PHP. Does anyone know an API that I can use to grab this? I've tried to use registry.npmjs.org, although the latest ve

Difference between an HTML and a PHP file

I have to query a mysql database using php, but a file with the .html extension for example my index.html does not recognize the <?php ?>. Now I have inde

If you intend you use SMTP, add your SMTP Code after this Line

When I do a test email for a contact form in Live Server and press 'Send' nothing happens, no email goes through and no success message. Am I missing something

How to redirect to another page and call a Function there on Angular ng-click

I have a page where I toggle between areas using angular functions onclick at home.php like <button class="btn btn-success btn-lg span6" ng-click="settingMa

Symfony Mercure "Failed to send an update"

I am having an issue sending updates to the Caddy-based Mercure Hub with both the Symfony Mercure\HubInterface and the "pure" PHP example. When attempting to pu

How to Change TablePress row length for admin page

I am using a TablePress of wordpress library and try to display 100 rows per page in admin account , Not user page. How can i do that ?

How to loop sql table data inside a html table

I have a table for all orders made by users and I would like to send them their order summary in email. However I have managed to create a table showing the cu

Put content of wordpress page inside div

I am trying to put content of wordpress page content inside div but that does not work , simply trying ot do that echo '<div style="display:none">' . the_