Category "php"

old site, solving error "The byte stream was erroneous according to the character encoding that was declared"

I need to support an old site. using HTML4, <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" > and DB TABLE fields with latin1_

Interface "Composer\Plugin\PluginInterface" not found

I am writing composer package and in my plugin code I am trying to get Composer\Plugin\PluginInterface but I'm receiving Interface "Composer\Plugin\PluginInterf

New alternative for getDoctrine() in Symfony 5.4 and up

As my IDE points out, the AbstractController::getDoctrine() method is now deprecated. I haven't found any reference for this deprecation neither in the official

Symfony - fixtures load throw unexpected error

In my Symfony 6 project, I am trying to load a fixture: /** * @param ObjectManager $manager */ public function load(ObjectManager $manager): void { $mana

twilio - how to make an outbound voice call in php

I have the below method. Currently is just calls up an external phone number and says "Welcome". I cannot understand how to connect a twilio number with an ex

Call to undefined method Illuminate\Database\Eloquent\Builder::links() error when attempting to paginate

I'm trying to create a simple filter system with a search box, service, category and a way to sort the items in my laravel controller. However, I am getting an

Invalid parameter number in Laravel Raw Query

I have the following query in mysql select count(*) as aggregate from `promotions` where `supplier_id` = 1 and '2022-03-27' <= promotions.to AND '2022-04-27'

PHP Composer with ZScaler

I'm trying to download the phpspreadsheet library for php 7.4 but I'm facing trouble with certificates. In my company, ZScaler is used to inspect network and it

CodeIgniter call_hook('post_controller_constructor') exits

I have inherited a webapp using CodeIgniter I am trying to get it to run locally on my mac when I try to go to http://localhost ,i can see via the debug logs i

How to setup browser-sync with Wordpress and xampp

In my gulpfile.js I have the following code: const themeName = "test" const browsersync = require('browser-sync').create(); // Browsersync function browserSync

i cant directly going to login page with codeigniter 4, and using myth/auth

i tried to using codeigniter 4 and try using myth/auth, and i get a problem, if put restricted in my filters its not loading the login page public $aliases

Variable returned by Symfony controller always undefined

Ok, so I have a text field in which I type a string and I have a button next to it. <div class="sidebar-search"> <div class="input-group custom-se

PHP fmod returns the dividend not remainder

This returns 50727.64 instead of the expected 0.489 fmod((float)50727.64, (float)103680); Is this because the normal division only returns a decimal? This code

Filter all row with the same foreign key when a those column is null in laravel

i have table schema in mysql for my project. this project build with laravel and as you can see in the below image i want to fillter all row with the same store

How to deal with mysqli problems? mysqli_fetch_array(): Argument #1 must be of type mysqli_result

In my local/development environment, the MySQLi query is performing OK. However, when I upload it on my web host environment, I get this error: Fatal error: Ca

Symfony- docker container Could not open input file: bin/bash

I started my Symfony 6 project with Docker successfully. I have a problem when accessing the PHP container and trying to run php bin/console doctrine:migrations

How I use return inside a recursive functions in php

I have a php recursive function as shown in the below: function displayDropdown(&$catList, $parent, $current=[], $level=0) { if ($parent==0) { foreac

Is it possible to use amCharts5: Simple Pie Chart, but not with percentages?

I started using this library, and I liked it. I was wondering if anyone had the need for instead of showing the data in percentage, to show the real data withou

How to apply different and/or groups for multiple filters in PHP GA4?

I have to pull data using mutiple dimension filters using AND/OR operators in php GA4. How to apply AND operator for the below dimension filters - 'dimensionFil

Unable to retrieve data from parent form in InlineCreate operation in backpack for laravel

I implement the InlineCreate Operation in Backpack for Laravel and works fine, but my field depend of other field and I can't to get the parent field informati