Windows和Linux上安装php7并安装yaf
Windows和Linux上安装php7并安装yaf
windows
1.windows上安装 php7 alpha 只需要从官网上 http://windows.php.net/qa/ 下载然后直接配置就可以,如果你不会你可以下载 PHP Manager,直接配置就可以了。这个时候需要测试,打开命令行窗口,然后到你的 php7 目录下,php -m 如果弹出如下的窗口
这时候因为你缺少 Visual C++ Redistributable Package for Visual Studio 2015 你可以点击这里下载 http://www.microsoft.com/zh-CN/download/details.aspx?id=46881,安装后就可以了。
2.windows版Yaf下载地址:https://pecl.php.net/package/yaf/3.0.2/windows
linux
Linux 和以前一样安装,但是你会发现 php7 alpha 并不和以前 dev 一样,少了 --with-mysql 的选项,也就是不加载这个扩展了,以后就用 mysqli 和 Pdo 吧
从官方下载安装包 https://downloads.php.net/~ab/
wget https://downloads.php.net/~ab/php-7.0.0alpha1.tar.gz#解压tar zxf php-7.0.0alpha1.tar.gz#进入目录cd php-7.0.0alpha1#configure--prefix=/usr/local/php7 \--with-config-file-path=/usr/local/php7/etc \--enable-fpm \--with-fpm-user=www \--with-fpm-group=www \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-pdo-mysql=/usr/local/mysql/ \--with-iconv-dir \--with-freetype-dir \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-libxml-dir \--disable-rpath \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--with-curl \--enable-mbregex \--enable-mbstring \--with-mcrypt \--enable-ftp \--with-gd \--enable-gd-native-ttf \--with-openssl \--with-mhash \--enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-zip--enable-soap \--without-pear \--with-gettext \--disable-fileinfo \--enable-maintainer-zts#编译安装make ZEND_EXTRA_LIBS='-liconv' && make install#配置cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php7-fpmcp php.ini-production /usr/local/php7/etc/php.ini#然后在自己配置下php-fpm.conf
安装YAF
#下载git clone https://github.com/laruence/php-yaf.gitcd php-yaf#查看所有分支,这时候你就看到了php7的分支git branch -agit checkout -b php7 origin/php7#开始编译安装/usr/local/php7/bin/phpize./configure --with-php-config=/usr/local/php7/bin/php-configmake && make install#配置vim /usr/local/php7/etc/php.ini #加入如下这行extension = 安装完成显示的目录地址/yaf.so
在php.ini里增加以下配置
[yaf]
yaf.use_namespace = TRUE
yaf.use_spl_autoload = TRUE
原文转自我的博客:http://www.widuu.com/archives/06/1209.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Following its high-profile acquisition by Facebook in 2012, Instagram adopted two sets of APIs for third-party use. These are the Instagram Graph API and the Instagram Basic Display API.As a developer building an app that requires information from a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio
