Category "php"

Convert .htaccess rewrite rule for showing a custom 404 to be php-fpm friendly

I'm reinstall server on Ubuntu 20.04 with control panel "Hestia" with php-fpm support. But i have 404 error in front page domain.com/ if i use in .htaccess: Rew

Fastest, most efficient way to check for changes in a large XML file (100k+ entries) updated daily with PHP

I am working with xml files with 50-150k+ entries, and about 50-100MB+ in size that change daily. All entries are unique, and have 10-15 elements per entry (id

Convert nested associative array to single array in php [duplicate]

I have nested array with key & value pair. i want to convert it in single array. /* This is current array */ Array ( [id] => Array

Laravel livewire display session message with javascript

I am trying to submit a contact form using laravel livewire like: public $name; public $email; public $phone; public $message; public function submitForm() {

MySQL Character Set & Select Query Performance in stored procedure

Recently I noticed few queries are taking very long time in execution, checked further and found that MySQL Optimizer is trying to use COLLATE in Where clause a

Php cannot redeclare a function twice

Why is php not able to declare a function more than one time? I am using while loop with mySQL that contains list of IDs and I am trying to parse the ID to this

ms graph upload session stream and response drive item

Requirement: upload a large file (4MB+) using MSGraph (onedrive or Sharepoint) and return its corresponding DriveID (i.e. DriveItem) This example uses PHP but I

How can I link to an Excel file on a network share from a php web page?

I am trying to link a file on a php webpage which is hosted on a server within our local network using IIS. The workbook must load via the network location and

Laravel 5.5 CORS issue when loading FontAwesome 4.7.0

I get a problem. I already read a lot of reference but still get error. Access to font at 'http://192.168.0.1/fonts/fontawesome-webfont.woff2?v=4.7.0' from ori

How to change date format using PHP? [duplicate]

I have input string: '10/22' where 10 is a number of month and 22 is a number of year. I need to convert it to dd-mm-yyyy date. So I wrote a s

How to process gzipped chunked raw post data in PHP

I have tried reading php://input, $_POST, $_GET, $_REQUEST but everything returns blank or empty array. When I test on https://webhook.site I get the following

how to fix FileZilla button not found in xampp? [closed]

FileZilla Not Found! in xampp maybe someone has the same experience?

Apache2 won't start after upgrade to Ubuntu 22.04 LTS - Cannot load /usr/lib/apache2/moduleslibphp8.0.so

I am a bit stuck as to how to fix this. I did a distro upgrade a server running Apache2. Since the upgrade it has not worked. I ran a config test and below is t

Send response to 2 webhooks via CURL

We have a form on a website that currently uses Zapier Webhook to catch and push the information from the submitted form to our CRM. How can I add another webho

Multi Tenancy SAAS Application in Codeigniter4 [duplicate]

I am trying to build a multi tenancy saas Application using Codeigniter4. I want to setup individual database for each tanent's data and one g

How can we do PGP encryption/decryption using RSA in Php?

I have installed GnuPG library and used below code for encryption and decryption: $public_key = '/path/0xC6235F66-pub.asc'; $private_key = '/path/0xC6235F66-se

Symfony + Laragon, debug toolbar not working

Symfony version: 5.4.8 Project works fine but debug toolbar is all time retrying to load... But if I start project with symfony serve and access localhost:8000

How do I delete images that are not used in the database?

I have written scripts that check images in a directory and in a database. I need to delete images in a directory that are not in the database. How can I do thi

Way to match *all* newline-type character sequences in a text file

I'm looking for a way to obtain all sequences of newline-like characters found in a string. I'm trying to use preg_match() as follows: preg_match('/^[^\r\n]*(?

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

I'm running a PHP script and continue to receive errors like: Notice: Undefined variable: my_variable_name in C:\wamp\www\mypath\index.php on line 10 Notice: U