php: generate a 60 char random string
2019-12-29
Q: how to create a 60 char random string ?
A: use the benath function generateRandomString()
to create such a string. Modify to your needs.
usage
$srandomString = enerateRandomString();
it will produce a sting like:
1572437300-71425db97d34ae5da7-37619268-DSCbkJT0JoqHpPtsCiN1l
/**
* @return string
*/
function generateRandomString()
{
[…]
xampp, php, imagemagick: resize on PNG fails
2019-11-28
Problem with XAMPP: php's shell_exec()
executing imagemagick's /bin/convert
command does not convert a PNG image. There is always a message saying a lib could not be found although library is there. No such problems with JPG images, only PNG.
This is a xampp related problem.
SOLUTION
as root
:
cd /opt/lampp/lib;
mv libz.so.1 libz.so.1.orig;
ln -s /lib/x86_64-linux-gnu/libz.so.1 […]