Here is the simple way to install the dbase extension. One command only.
sudo pecl install dbase-7.0.0beta1
It will install the extension for you. You just need to restart php7.0-fpm service.
Check the php information.
If your php is version 5 to 5.7. Change the command to
sudo pecl install dbase
Go to php.net and look at the introduction of dBase section.
This extension has been moved to the PECL repository and is no longer bundled with PHP as of PHP 5.3.0.
That’s why we have to install this extension from pecl installation.
I followed the instruction mostly based on mote0230 github.
Please be noticed that updating (and probably inserting) with arrays that contain named indexes, is not working. For my project, it is OK. I just need to read the data from dbf files.
# PHP 7
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.0-fpm php7.0-curl php7.0-mysql php7.0-dev
# dbase for PHP 7
git clone git://github.com/mote0230/dbase-pecl-php7.git ~/php7-dbase
sudo make install
rm -rf ~/php7-dbase
Continue reading “Install dbase extension on php7, Ubuntu 16.04”
I checked my Nginx log files and saw a lot of errors as below:
*11047 FastCGI sent in stderr: “PHP message: PHP Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /home/users/yinfor.com/wp-includes/functions.php on line 3597” while reading response header from upstream,
I googled it and found the answer.
The reason why it happened is PHP 7 and W3 Total Cache.
Since I can not change PHP 7, I have to change something in W3 Total Cache plugin.
- Find the file /wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php
- Go to line 512, and replace following
- Save it.
It is a test bed on a VPS.
Here is the basic information of it.
- Ubuntu Linux 14.04.3
Linux 3.13.0-71-generic on x86_64
Intel(R) Xeon(R) CPU L5520 @ 2.27GHz, 1 cores
- Nginx 1.9.9
Continue reading “PHP Benchmark on PHP 7.0”