About phptuts

Author Archive | phptuts

Linux: Cron job to monitor for php-fpm service problem

Sometimes, php-fpm service is error, how to monitor for php-fpm service ? Step 1: create a file like check.php with a simple content like and upoad this file to document root (like: /home/vpssim.demo/public_html), you will have the link: http://localhost/check.php Step 2: add a cron job: You can use the command line Then type: i Then […]

Read full story Comments { 0 }

How to reset MariaDb root password on Linux

You forgot or you unknow your root MYSQL password! How to reset MariaDb root password on Linux? Step 1: stop MariaDb Result: Step 2: Result: Step 3: stop and start Mariadb service Note: You can’t use command service mysql restart

Read full story Comments { 0 }

PHP array_shift equivalent in golang

We use reflect as the example: Result:

Read full story Comments { 0 }

PHP parse_str equivalent in golang

PHP parse_str equivalent in golang is url.ParseQuery Example: Result:

Read full story Comments { 0 }

How to fix IDMGrHlp.exe use high CPU

You can find this file at: C:\Program Files (x86)\Internet Download Manager or C:\Program Files\Internet Download Manager Back up this file first (ex: IDMGrHlp.exe.bak) Edit file by Notepad++ or any editor program, delete all content and save file. Note: this file is readonly, so you must turn off this property

Read full story Comments { 0 }

How to prevent ERR_BLOCKED_BY_XSS_AUDITOR on chrome

Sometime, you can see this error: A case i can show: when you post a HTML code from a textarea form. Ex: POST /url in page /url you can add a header: Do by PHP:

Read full story Comments { 0 }

fsockopen equivalent in golang

Example with http link: Example with https link:

Read full story Comments { 0 }

How to run golang web server forever on Linux

To run nodejs webserver forever, you can use forever like: How to do this with golang ? There are many methods, i can show one of them: Step 1: content: Step 2:

Read full story Comments { 0 }

How to install golang on Centos

Step 1: For win64 For win32 Result example: Step 2: extract tar.gz file For win64 For win32 Step 3: Put the export declaration in ~/.bashrc. (use your GOPATH) Now you can use go command:

Read full story Comments { 0 }

Install PHP 7 on CentOS 7

After I showed last week what problems you can deal with when switching from PHP 5.6 to PHP 7, I would like to show you how to switch to PHP 7 at all. Since I am now migrating to CentOS with all servers, it will be the first time that it is not a Debian […]

Read full story Comments { 0 }