Category: L.A.M.P.

php Benchmark test on php 7.2

Now it is a php 7.2. Included in the Ubuntu 18.04. My site is running on this platform. I also want to try to run the php Benchmark test, and see how fast it is.   -------------------------------------- | PHP BENCHMARK SCRIPT | -------------------------------------- Start : 2018-06-07 11:38:41 Server : webexample.win@50.116.5.237 PHP version : 7.2.5-0ubuntu0.18.04.1 Platform

Color Scheme for the command line of bash

When I install the Ubuntu server and ssh to the server, the default shell is bash. It looks like below. I prefer to have a colorful terminal window. So I goole it and find the solution: open ~/.bashrc in an editor copy this and add it at the end of .bashrc file: PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] ' save

Waiting for the Ubuntu 18.04 LTS

Based on the schedule of release, Ubuntu 18.04 LTS (Bionic Beaver) will be released on April 26, 2018, the day after tomorrow. Now, my all VPS is running on the Ubuntu 16.04 LTS. LTS is an abbreviation for “Long Term Support”.  An LTS version is released every two years. So after Ubuntu 16.04 LTS, it

php-fpm can not use html as php

I have a site, which use nginx as web server and php-fpm as php interpreter. Most of the files use html extension name. My nginx conf file has following section. But, when I enter the url such as https://example.com/sample.html, whose content is php script. It did not work. The solution is to change the config

How to connect DBF file and read data by PHP script

Afte last post, my php-fpm support the dbase database file now.  Here is an example php script. $db = dbase_open('../db/clients.dbf',0); if ($db){ $record_numbers = dbase_numrecords($db); for ($i = 1; $i <= $record_numbers; $i++) { $row = dbase_get_record_with_names($db, $i); if ( strpos(trim($row['CLIENTNAME']), $clientname) !== FALSE and $row['deleted'] != 1) { $clientid = $row['CLIENTID']); echo 'Customer ID