php: generate a 60 char random string
2019-12-29 2019-12-29 22:02:11


Q: how to create a 60 char random string ?

A: use the benath function generateRandomString() to create such a string. Modify to your needs.


$srandomString = enerateRandomString();

it will produce a sting like:

 * @return string
function generateRandomString()
    $iLength = 30;
    $sBase = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

xampp, php, imagemagick: resize on PNG fails
2019-11-28 2019-12-30 00:28:19


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.


as root:

cd /opt/lampp/lib; 
ln -s /lib/x86_64-linux-gnu/

@see […]

This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".