I’m running Ubuntu 18.04 with nginx/1.14.0. I have been running PHP 7.2 but some of my web applications require a newer php for security reasons. Since it is nginx, I use PHP-FPM. I used apt to …
array_search returns NULL/blank
I have such array “uniqid1”, “apple”=>”uniqid2”, “apple”=>”uniqid3”, “bannana&…
How to serve two laravel apps on 1 domain?
I have two laravel apps like this: I’m trying to serve them on linux machine, I can’t seem to get them to work together. I want to have two urls like this: https://test.example.co https://test.example.co/dashboard Answer I succeeded serving them using another subdomain, the “/dashboard”…
Docker-Composte LEMP : Error: could not find driver
I am trying to create a LEMP in Linux with docker-compose, I have managed to get PHP, NGINX and MySQL to work for me but when connecting to the DB from a php file it returns the exception: could not …
Unlink file – path issue – Codeigniter
Apparently, I am confused how to use site_url() while deleting a file. My site_url responded with http://localhost/Project/index.php For deleting a file, I use unlink command. However, How to use site_url into the unlink command in codeigniter. I am surprised! Below is the path where the uploaded files get st…
How to use PHP glob() with minimum file date (filemtime)?
I want to get a range of files with PHP glob function, but no older than a month (or other specified date range). My current code: $datetime_min = new DateTime(‘today – 4 weeks’); $product_files = …
Is it possible to get actual video link from embedded iframe
I tried to get video from an embedded iFrame, but JS is de-obfuscated, may there is an actual src link hidden in JS, I tried my best and couldn’t de-obfuscate, if I click Play I can find the source, …
how to insert data into select2 search input after scan using qrcode
Example results that i want : I already did the qrcode scan and select2. It is working fine. The problem is I want that data “SBD2P3000002” to be searched in the select2 dropdown. Already …
PHP preg_replace guids over multiple lines
Hi there regex wizards!, I have a document with multiple guids spread over multiple lines. I need to replace these guids with content from a file who’s name is the found guid. I’ve tried this: …
My php rooter is routing my css/jpg… files
I got a homemade php rooter with an htaccess rewriting rule but my public files are always getting catched by the rooter after I leave my landing page, blocking thoses sources on my other pages. index….