I have a web page written in PHP (version 7.3.12), where an user can write any SQL statement and then execute it (I am using MariaDB version 10.4.10, included in XAMPP). When user writes DDL statements, most of them are unfortunately autocommited, hence there is no space for rollbacking a transaction. I don&#…
“User is not set” IncompleteDsnException after migrating to Laravel 9
I was using Laravel 8.64, and my emails were working fine both on prod and dev servers. However, after upgrading to 9.0.2, I have an issue with sending emails. Of course, I followed all instructions, but still, I get errors when I try to send an email. User is not set. {“exception”:”[object]…
gzdecode() insufficient memory – size is exhausted
Do you know any solucion to unpack large .gz in php (>200 MB .gz, >4GB original… maybe in packs of >1GB or >2GB inside) ? Solucion of decode .gz part by part is needed. Code gzdecode(@file_get_contents($file)) gets PHP error: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted …
How to make a multiple update on mysql with string replace with value of another column
Hello i’m new in mysql and i have to run a multiple update on my table. I have 700 records in the table and i have to update them all this way: table example : store_id: 1 store_email: storename@gmail.com for single update i use i need to update all the emails and replace their name with their id, so it
From which Dockerfile should composer install be called from
I need to call composer install and unsure from which Dockerfile to call it from – Dockerfile-apache or Dockerfile-php-fpm? Should I install composer in Dockerfile-apache (and PHP CLI?) and run it from there? Running composer install from Dockerfile-php-fpm gives me this: Composer could not find a compo…
MS Graph | PHP | GET Photo – Laravel 404 exception
I’m building a website with Azure authentication using MS Graph. As you can see below I want to login and get my own data as well as my managers which is working fine, however the issue begins when I want to select the photo. When a user does not have a profile photo set it will return a 404 Not
Laravel (Lumen) connect to database on another server on same network
I’ve got a Laravel project on a server, and a Laravel Lumen 8 project on another server, they’re both virtual machines and are clones of one another so have the same hardware and OS. I have a domain, which for the purposes of this Stackoverflow we’ll call foo.com, it goes through Cloudflare,…
When does Zend Framework delete entries from the session table?
After we switched our project from PHP5 to PHP7, there were problems during SELECT (deadlocks) and DELETE (timeouts) commands on the session table. We didn’t take a look at it for a long time, but there were more than 20 Million (!) entries since Octoboer 2020. Obviously, the deletion which took too lon…
Can’t prevent client side submission php
I’ve created a register page using php, and the the form successfully sends data to the database. I’m trying to prevent client side submission, but I can’t get the form to stop submitting, even with nothing in the input fields. It also submits every time and I refresh the page, and I’m…
Custom Google Analytics API script is working, but running extremely slow
I am working on a project using the Google Analytics API for PHP. Here is what I need to do: We have about 320 client websites that we track in our Google Analytics account. We are running into an issue where the Google Analytics code stops tracking (for various reasons) on some sites, and we would like to ca…