Архиви на блога

openvpn username password auth

In your config you need to add username-as-common-name auth-user-pass-verify /etc/openvpn/verify.php via-file Then create the file and paste in it #Now add this code into the file #!/usr/bin/php Don’t forget to add users 😉 echo „myfirstuser:password123“ > /etc/openvpn/users

С етикет: , ,
Публикувано в linux

security.mixed_content.block_active_content

This can be set to false in about:config security.mixed_content.block_active_content

С етикет: ,
Публикувано в linux

idea for id storing of files

If you have some time of id in your database and you want to save file associated with this id it’s not a good idea to make dir with id value and save the file there because on some point

С етикет: , , , , , ,
Публикувано в linux, php

mysql server has gone away or connection timeout

If you do a lots of things in one php script this usually takes some time and mysql can gone away 😉 for this when you run new query you can run it with this function which will connect again

С етикет: , ,
Публикувано в linux, php

php recursive copy

This function copy recursive files and folders in php function recursive_copy($src,$dst) { $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if (( $file != ‘.’ ) && ( $file != ‘..’ )) { if ( is_dir($src

Публикувано в linux, php