search
Homephp教程php手册如何使用动态共享对象的模式来

如何使用动态共享对象的模式来

Jun 13, 2016 am 10:10 AM
linuxphpunixsuperioruseshareddynamichowinstallobjectmatchoperating systemmodelofPass

PHP 通常被安装在 Linux/Unix 操作系统上,并且搭配 Apache 服务器一起使用。在将 PHP 与 Apache 服务器一起安装的时候,你有三种不同的安装方式可以选择:静态模块,动态共享对象(Dynamic Shared Object, DSO)以及 CG
I 程序执行文件。
 
在这里我建议大家使用动态共享对象的模式来安装 PHP,这是因为这种安装方式为日后的维护与升级提供了极大的便利。假设你一开始安装 PHP 的时候,只加入了PHP 的数据库相关模块。几天以后你决定再加装 PHP 的编码功能相关模块,这时候你只需要在你的系统命令列输入 make clean 指令,然后输入新的 PHP 设定选项,然后再输入 make 与 make install 指令,接下来系统就会产生一个新的 PHP 动态共享对象,并且安装到 Apache 服务器所指定的适当目录位置去了。接下来你要做的只是重新激活 Apache 服务器就行了,你就不需要把 Apache 服务器整个重新编译过。
 
下面几个基本步骤可以让你安装一套全新的 Apache 服务器,并且内含 PHP 动态加载模块:
1.到 http://www.apache.org/dist/下载最新版本的 Apache 服务器原始码。
 
2.将取得的档案复制到某个有意义的目录位置,例如 /usr/local/ 或者 /opt/ ,或者其它你觉得适当的目录位置。
 
3.将取得的档案解压缩,解开以后你会得到一些 *.tar 档案。
 
4.输入下面的指令将这些 *.tar 档案解开,并且将解开的档案放置到一个名叫 apache_[version] 的目录位置:
tar -xvf apache_[version].tar
5.输入 cd 指令将工作目录切换到 /usr/local/apache_[version](如果你在上一个步骤把 *.tar 档案解到其它不同目录,那么就切换到你所指定的目录去)
6. 输入下面的指令准备编译程序,记得将下面指令里面的 [path] 部分代换成你自己的目录名称,例如 /usr/local/apache[version] (不要加上最后面的斜线!)。这个步骤所做的工作是激活 mod_so,如此一来 Apache服务器才可以使用动态共享对象。
 
./configure --prefix=[path] --enable-module=so
7.等到系统回到命令提示符号,输入 make,然后继续等候系统回到命令提示符号。
 
8.输入 make install指令。
 
此时编译程序将会产生最后需要用到的目录与档案,完成以后会再度回到命令提示符号。
 
接下来可以开始安装 PHP 了:
1.到 PHP 官方网站:http://www.php.net/downloads.php 下载最新版本的 PHP 原始程序代码。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)