Articles under category PHP

Error in compiling PHP version, oh, incidentally, there may be discrepancy in php7 below, pure system.
For a long time, there is no written word. The document does not want to tidy up (3[____]

 The compilation parameters are basically 
'./configure''--cache-file=/opt/temp/cache/config.cache''--prefix=/opt/temp/php/php-7.2.6''--with-config-file-path=/opt/temp/php/php-7.2.6/etc''--with-config-file-scan-dir=/opt/temp/php/php-7.2.6/var/db''--disable-all''--enable-short-tags''--enable-opcache''--enable-dba''--enable-ipv6''--enable-calendar''--enable-ipv6'. E-dtrace''--with-pcre-regex''--with-pcre-dir=/usr''--with-mhash''--with-mcrypt=/usr''--with-zlib=/usr''--with-curl=/usr''--with-readline=/usr''--with-libedit=/usr/local''--with-gd=shared''--enable-gd-native-ttf''--with-gd=shared', the first, the second, the third, the second and the third.

Error: Configure: error: Please reinstall the libcurl distribution easy.h should be in/include/curl/
Resolvent: Yum install curl-devel

Error: Configure: error: jpeglib.h not found.
Resolvent: Yum install libjpeg-devel

Error: Configure: error: png.h not found.
Resolvent: Yum install libpng-devel

Error: Configure: error: To enable code coverage reporting you must have LTP have
Resolvent: Yum install -y lcov

Error: Configure: error: Cannot find sys/sdt.h which is required for DTrace support
Resolvent: Yum install -y systemtap-sdt-devel , Apt install -y systemtap-sdt-dev

Error: Configure: error: Cannot find OpenSSL's Libraries
Resolvent: Yum install OpenSSL openssl-devel openssl-libs
Note: the 64 bit system is added at compile time. --with-libdir=/usr/lib64 Or put /usr/lib64/libssl.so Copy to /usr/lib/libssl.so

Error: Configure: error: Unable to locate gmp.h
Resolvent: Yum install -y GMP gmp-devel

Error: Configure: error: Unable to detect ICU prefix or no failed. Please failed.
Resolvent: Yum install -y ICU libicu libicu-devel

Error: Configure: error: Please reinstall libedit I cannot find readline.h
Resolvent: Yum install -y readLine readline-devel
Note: the 64 bit system is added at compile time. --with-readline You may also need to download and compile the latest version separately. Libedit

Error: Configure: error: Cannot find libtidy
Resolvent: Yum install -y readLine readline-devel , Apt install libtidy-dev libtidy5

Error: Configure: error: Cannot find OpenSSL's <evp.h>
Resolvent: Yum install -y OpenSSL openssl-devel libssl-dev

Error: Configure: error: Please reinstall the BZip2 distribution
Resolvent: Yum install -y libbz2-dev

Error: Configure: error: Please reinstall the libcurl distribution
Resolvent: Yum install -y curl-devel , Apt install libcurl4-gnutls-dev

Error: Configure: error: mcrypt.h not found.
Resolvent: Apt install libmcrypt4-dev

Error: Configure: error: Cannot find libpq-fe.h.
Resolvent: Apt install libpq-dev

Error: Configure: error: Please reinstall readLine I cannot find readline.h
Resolvent: Apt install libreadline-dev

Error: Configure: error: xslt-config not found.
Resolvent: Apt install libxslt1-dev

Error: Configure: error: cURL version 7.10.5 or later is required to compile to
Resolvent: Apt install libcurl4-openssl-dev , Apt install libcurl4-gnutls-dev

Error: Configure: error: xslt-config not found. Please reinstall the libxslt > = 1.1.0 distribution
Resolvent: Apt install libxslt1-dev

Error: Configure: error: Unable to locate gmp.h
Resolvent: Apt install libgmp-dev

Error: Configure: error: utf8_mime2text () has new signature, but U8T_CANONICAL is missing. This, is
Resolvent: Apt install libc-client2007e-dev , Apt install libc-client-dev

Error: Configure: error: This c-client library is built with Kerberos support.
Resolvent: Apt install libkrb5-dev Consider adding --with-kerberos and --with-imap-ssl parameter

Error: Configure: error: libfbclient, libgds or libib_util not found! Check config.log for Check
Resolvent: Apt install firebird-dev It might be Apt install firebird2-dev

Error: Configure: error: Cannot find ldap.h
Resolvent: Apt install libldap2-dev

Error: Configure: error: Please reinstall the libzip distribution
Resolvent: Apt install libzip-dev

The new year is very busy now, and there are games waiting for me, van. This article dragged on for a long time.

Last time, I didn't tell my family that raspberry pie was hanging up. They used FRP to wear the outer net, and they could stay at home and make movies at home everywhere.

But the problem is coming. The resources in my hard disk are used by the company. I usually do not have the habit of copying the U disk. After I finish writing, I usually shut it down and save it on the hard disk. Recently, the notebook has not been taken home by the company, which limits my operation.

Is too laggy to write out a catalogue program. Of course, before I wrote, I also went to the Internet to find the next one. Most of them were not the kind of (simple) cold (clean) style. The foreigner's big round looked too cartoonish, and it was not suitable for my dear father's identity. The only one on the top was the one who looked at it. DirectoryLister/DirectoryLister But I need to put programs and files in a directory, and I have refused to use them.
Most of the things that can be found on the Internet are basically DirectoryLister/DirectoryLister Operations are similar and are placed in the same directory. Think about it or write it yourself??

 Directory program interface

Project address: Https://github.com/flxxyz/directory-lister
Demo web site: Http://cloud.flxxyz.com/

This program is applicable to developers who have certain PHP knowledge reserves. Please understand the use of composer first.

Make sure that you have installed PHP and do the following operations.

Class UNIX

Such systems as MacOSX, Ubuntu, CentOS, archlinux and Debian.

 PHP -i grep grep "/php.ini"

 Quasi UNIX system

Windows

If no environment variables are added, add the PHP directory to the environment variable!!!

 PHP -i findstr findstr "php.ini"

 Windows system

currency

Create a PHP file and write the following contents into it

  1.  < php
    echo phpinfo ();

    Browser access

     currency

  2.  Echo (str_replace (")," / ", str_replace (" ext "," php.ini ", ini_get (" extension_dir ")));

    Mu Yue Xi Dalao comment area gives out a kind of, understand the use.

In PHP, I used to think that it was 2 bytes. In the process of learning, I didn't know anything about character coding. I saw some other people say 2 bytes some time ago. But using strlen () or mb_strlen () to check the size of a Chinese character is 3 bits!!!

If you use substr () or mb_substr () to cut Chinese characters at this time, you will have garbled, so you need to know Unicode at this time.

      • -

English letter:

  • Encoding: GB2312, bytes: 1
  • Encoding: GBK, bytes: 1
  • Encoding: ISO-8859-1, bytes: 1
  • Encoding: UTF-8, bytes: 1
  • Encoding: UTF-16, bytes: 4

Chinese characters:

  • Encoding: GB2312, bytes: 2
  • Encoding: GBK, bytes: 2
  • Encoding: ISO-8859-1, bytes: 1
  • Encoding: UTF-8, bytes: 3
  • Encoding: UTF-16, bytes: 4
      • -

An interview with a character encoding question can be done, and the interview difficulty has been improved.

Unicode this industry standard is good. Basically, there are Unicode in the environment that is used now. Most of the spoken and written languages in the world are coded out, and the computer can simply present and process the text. We do not need to worry about what we see is garbled and tired of it.

The latest version of Unicode is June 20, 2017 10.0.0.

      • -
        Reference material:
  1. Http://www.unicode.org
  2. Http://www.unicode.org/standard/WhatIsUnicode.html
  3. Https://zh.wikipedia.org/wiki/Unicode

The official version of v1.2 is released. There is no connection to the new drop line connection.

Note: you need to install swoole extensions.

Having been idle for a long time, there is nothing to do now.

It took two days to do this. (copy)? QQ chat application

It is not very difficult to do it. Using the existing swoole extension can quickly build a IM application with open bag ready to eat. What you need to do is logical handling and privilege management.

I also used it here. Identicon To make random heads, think of people coming in and play a chicken feather account.

Ps: is not clear. Identicon You can look at it. Identicon wiki

      • -

If you have to say something like QQ, what can I do? I TM copied QQ.

 Chat room home page

Add a tolerant facial expression to make chat more interesting (I am not a fat house).

 Add a tolerant face.

Also specifically for the big (Hao) (SHI) (zhe) humanized add bucket chart mode, see whether I love you very much.

 Dou Tu Moss

      • -

This is the most basic chat room program, recognition, interest, all have, how to see your specific development, I cast the project address below.

Show address: Http://chat.flxxyz.com

Github: Https://github.com/flxxyz/php-chat-websocket

To the present Homestead Under directory, open Homestead.yml And then you know.

stay Site: Next, click the format to add the site.

 - map: homestead.app / / site domain name 
to: /home/vagrant/Code/Laravel/public / / Site Directory

If need be, you can Folders: Next, add the shared directory to facilitate local editing, and the virtual machine reads in real time.

 - map: E:\Work\virtualBox\homestead\site / / Windows users are directory of Virtual Opportunities after using this path 
to: /home/vagrant/Code/site / / open shared directory.

Bye bye (o)

See this prompt first to check if the configuration information is correct.

Step 1

Check the.Env in the root directory

 DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=root

Completed.


STAP 2

Check the database.php in the config directory.

 'mysql'= > [
'driver' = >'mysql', 
'host' = env >'DB_HOST'('127.0.0.1'), 
'port'= env >'DB_PORT' ('DB_PORT'), env ='DB_PORT' >'3306'> = (>).

Fill in the database name, user name and password.


Turn off service and open again.
If you don't succeed, you need to clear the configured cache and then turn on the service.

 PHP artisan config:clear
php artisan serve

In the process of learning, it is found that the time stamp of ORM's database is removed, and the local time difference is less than eight hours.

In the getDateFormat () function, set date_default_timezone_set ('PRC'); and ini_set ('date.timezone','Asia/Shanghai') are invalid.

See the manual, know the'timezone'parameter in config/app.php.

'timezone'= >'PRC' / / Asia/Shanghai, the time zone is set up for my great heavenly kingdom.