Educating the world

Our blog has over 10,000 readers a month

Category: "PHP"

Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

May 19th, 2017
Recently had a problem with Yii2's migrate when trying to connect to a local database. [ yii-application]# ./yii migrate Yii Migration Tool (based on Yii v2.0.11.2) Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo… more »

file_get_contents SSL operation failed with code 1 SSL3_GET_SERVER_CERTIFICATE certificate verify failed

April 29th, 2017
Recently got this message while I was trying to use get_file_contents in PHP. file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed This is… more »

Yii Migration Tool No such file or directory

February 10th, 2015
I develop under Windows when I'm and home and in the office but when I'm at out and about I develop on my Mac Book Pro. While both run XAMPP, I recently came across a difference between the Windows and Mac versions while I was using Yii2 Framework (but… more »

Posix PHP commands not working under CentOS 7

December 8th, 2014
It took me a while to figure out why posix_getgid, posix_getegid, posix_getuid and posix_geteuid weren't working on my CentOS 7 installation of PHP. In fact none of the POSIX commands were available. PHPInfo revealed nothing, it didn't even mention… more »

Debugging PHP in Eclipse

October 21st, 2014
This requires 2 parts. Firstly change the php.ini to include the xdebug sections. All the relevant information can be found in the article Setting up XDebug under XAMPP. Second create an Eclipse run configuration to connect to the remote server which is… more »