Preventing Memory Leaks in PHP

Image resizing need memory. I use this script to prevent memory leak.

I use Intervention Image library for resizing I often get ‘Allowed memory size of …. bytes exhausted (tried to allocate … bytes)’ message.

////////////////////////////////////////////////////
//get memory_limit info from php.ini
$memoryAvailable = filter_var(ini_get(“memory_limit”), FILTER_SANITIZE_NUMBER_INT) * 1048576;

//getting the image width and height
$imageInfo = getimagesize($destinationPath . ‘/’ . $filename);

//This is quite rough and includes a fudge factor, 2.5, which you may want to experiment with.
$requiredMemory = ( $imageInfo[0] * $imageInfo[1] * ($imageInfo[‘bits’] / 8) * $imageInfo[‘channels’] * 2.5 );

//check memory usage
if (memory_get_usage() + $requiredMemory < $memoryAvailable) {

//we have enough memory to resize the image.
}
////////////////////////////////////////////////////

Laravel log viewer

Inspired by Micheal Mand’s Laravel 4 log viewer.

Log Viewer for Laravel 5 (compatible with 4.2 too).

Install:

composer require rap2hpoutre/laravel-log-viewer

Add Service Provider to config/app.php in providers section

‘Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider’,

Add a route in app/Http/routes.php (or choose another route):

Route::get(‘logs’, ‘\Rap2hpoutre\LaravelLogViewer\LogViewerController@index’);

my advice:
//protect log viewer with superamin filter

Route::get(logs”, [
‘before’ => ‘superadmin’,
“uses” => ‘\Rap2hpoutre\LaravelLogViewer\LogViewerController@index’
]);

https://github.com/rap2hpoutre/laravel-log-viewer

kullancs

A KUTYÁS TURIZMUS MIATT TUDTAK A KULLANCSFAJOK TELJESEN SZÉTSZÓRÓDNI AZ ORSZÁG TERÜLETÉN, ÉS A KUTYÁK MIATT VANNAK TELE VELÜK A VÁROSI PARKOK IS.

https://index.hu/belfold/2019/04/26/kullancs_kullancsszovetseg_lyme/

Dr. Lakos András

Nem félünk a kullancstól
Természetes, hogy vannak, így természetesen védekezhetünk is ellenük: http://allyouneed.blog.hu/2017/03/28/nem_felunk_a_kullancstol

Így szabadulj meg a vérszívóktól! : http://index.hu/index2/#bloghu/okosodjvelunk/2016/09/23/igy_szabadulj_meg_a_verszivoktol

Egyetek bőségesen fokhagymás ételeket, ugyanis ezek számukra kellemetlen szagúvá teszik a vért, így pedig kevésbé tűntök „csábító falatnak” a vérszívók számára. Igaz, mások számára is… J

Kullancskisokos: tévhitek és teendők, hogy elkerülje a bajt : http://divany.hu/eletmod/2016/05/01/kullancskisokos/

kullancsriasztó házilag

Természetes kullancsriasztó, ami tényleg működik!: http://www.kiskegyed.hu/test-es-lelek/megelozes/termeszetes-kullancsriaszto-ami-tenyleg-mukodik-135225

A citromos illat távol tartja a kullancsokat.

http://sporolok.blog.hu/2014/08/23/szunyog_es_kullancsriaszto_hazilag

Run your own auction site on your PHP – MySQL hosting service

Laravel auction software (PHP – MySQL ) on Codester:

https://www.codester.com/items/4105/php-laravel-auction-multi-vendor-auction-script?ref=smartcodecreator

Everybody loves eBay. However, not everyone likes the commissions you have to pay to sell on the site.

What if you love the idea of eBay but want to run an auction from site of your own? This could be to sell general items or it could be to sell very specific items at auction.

There are many reasons to create a website based around auction software. You don’t have to completely go down the general eBay item route, but instead have a site that runs a very specific auction.

An example that springs to mind instantly would be to create a website that allows you to run a charity auction for a selection of items on one evening. This would work in the same way as eBay but run over the space of a single evening.

Other reasons to setup your own auction website would be to avoid paying commissions on each auction item as well as having the ability to style the website in any manner you wish.