PHP安装的一些库

来源:互联网 发布:daxulu域名更换 编辑:程序博客网 时间:2024/05/01 23:08

whereis XXX :可以查找每一个文件的位置


mysql>quit

mysql>exit

mysql>\g

mysql>\h

mysql>\c



卸载mysql

后输入“rpm -qa|grep -i mysql”,如果系统返回为空,则说明卸载已经完成。然后就可以安装新版本了。


Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: us



make[4]: Entering directory `/home/php_sourse/libxml2-2.9.1/python'
  CC     libxml.lo
libxml.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[4]: *** [libxml.lo] Error 1
make[4]: Leaving directory `/home/php_sourse/libxml2-2.9.1/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/php_sourse/libxml2-2.9.1/python'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/php_sourse/libxml2-2.9.1/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/php_sourse/libxml2-2.9.1'
make: *** [all] Error 2

没装python文件


--with-xx--with-xx-dir--with-xx-dir=【】这三种是不是都一样?如果不一样分别是什么含义?

//--with-apxs2 是指定 apache2 的配置程序路径,php编译程序会通过这个程序查找apache的相关路径--with-libxml-dir 指向的是 libxml2 的库路径--with-gd 指静态编译gd库--with-png-dir 指定 libpng 的路径综上所述,带着-dir的一般是用于指定库文件路径,没有的话可能是启用某些特性或者指向某特定路径。

//--with XX的意思就是需要引用哪些模块其中PHP的话就要 --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf && make && make install就是PHP需要引用这些模块 这样是定义一个引用

//--whit-依赖包名称=依赖包目录


请问xml文件有什么作用?

//XML也是一种数据库   多用于FLASH与动态语言之间的连接  比方asp和FLASH一起制作FLASH网站就需要用到XML 另外你下载很多FLASH网页播放器都有一个XML的文件来存放歌曲路径   而FLASH可以读取这个XML文件  根据XML的节点来获取播放路径

//xml功能太强大了,举几个例子吧 1、可以做为数据库存储数据 读操作: 假如你的web应用程序里有一个Products.xml,你可以用DataSet来读取这个xml,然后绑定到DataList,DataGrid等的控件上 写操作: 如果你建立一个购物车的DataTable,就可以将它写入到xml文件中去 2、如果你会用xsl,可以将xml整合到首页上,让你更新网页更容易,也很容易管理,样式改动也方便 3、关于xml的技术太多了,xpath,xquery,xslt等等,包括语音标记、矢量图标记等等,详情请参照 www.w3.org 4、一般的说,xml已经广泛的应用,你用的office软件保存的doc,xls等等的格式背后都是xml标记,一些矢量图的软件Visio,做出的图形其实都是基于xml技术的,ajax技术也是基于xml技术的 5、忘了最重要的一个未来会大大发展的技术,web services,实质也是xml的一种应用


安装php编译make时出现错误:

Fatal error: X11/xpm.h: No such file or directory
//是说xpm.h文件找不到,www.linuxidc.com通过一下命令更新Ubuntu后再次执行make就没有问题了。

sudo apt-get install libxpm-dev 
再编译make:
// /home/php-5.5.13/ext/gd/gd.c:1330: undefined reference to `XpmLibraryVersion'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
问题说明:这是提示gd库不支持xpm

重新编译gd

./configure --prefix=/usr/local/phptool/libgd-2.1.0/ --with-zlib=/usr/local/phptool/zlib-1.2.8/ --with-jpeg=/usr/local/phptool/jpeg-6b/ --with-freetype=/usr/local/phptool/freetype-2.4.12/ --with-png=/usr/local/phptool/libpng1.6.12/

make

make install

再编译php

./configure --prefix=/usr/local/php5513/ --with-apxs2=/usr/local/apache2.2.25/bin/apxs --disable-debug --enable-safe-mode --enable-xml --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/phptool/libxml2-2.9.1/ --with-gd=/usr/local/phptool/libgd-2.1.0/ --with-zlib=/usr/local/phptool/zlib-1.2.8/ --with-zlib-dir=/usr/local/phptool/zlib-1.2.8/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock --disable-posix --with-config-file-path=/usr/local/lib --with-jpeg-dir=/usr/local/phptool/jpeg-6b/ --with-curl=/usr/local/phptool/curl-7.37.0/ --enable-zip --enable-mbstring --enable-pdo --with-pdo-mysql=/usr/local/mysql/ --enable-soap --with-png-dir=/usr/local/phptool/libpng1.6.12/ --with-freetype-dir=/usr/local/phptool/freetype-2.4.12/ --enable-zip --enable-json --enable-sockets --with-iconv

make

make install

没有错误

***************省略************
2 -lcrypt  -o sapi/cgi/php-cgi
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
directorygraphiterator.inc
pharcommand.inc
directorytreeiterator.inc
clicommand.inc
phar.inc

Build complete.
Don't forget to run 'make test'.


root@ubuntu:/home/php-5.5.13# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2.2.25/build/instdso.sh SH_LIBTOOL='/usr/local/apache2.2.25/build/libtool' libphp5.la /usr/local/apache2.2.25/modules
/usr/local/apache2.2.25/build/libtool --mode=install cp libphp5.la /usr/local/apache2.2.25/modules/
cp .libs/libphp5.so /usr/local/apache2.2.25/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/apache2.2.25/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /home/php-5.5.13/libs'
chmod 755 /usr/local/apache2.2.25/modules/libphp5.so
[activating module `php5' in /usr/local/apache2.2.25/conf/httpd.conf]
Installing shared extensions:     /usr/local/php5513/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CLI binary:        /usr/local/php5513/bin/
Installing PHP CLI man page:      /usr/local/php5513/php/man/man1/
Installing PHP CGI binary:        /usr/local/php5513/bin/
Installing PHP CGI man page:      /usr/local/php5513/php/man/man1/
Installing build environment:     /usr/local/php5513/lib/php/build/
Installing header files:          /usr/local/php5513/include/php/
Installing helper programs:       /usr/local/php5513/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php5513/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php5513/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.11
[PEAR] Console_Getopt - already installed: 1.3.1
[PEAR] PEAR           - already installed: 1.9.4
Wrote PEAR system config file at: /usr/local/php5513/etc/pear.conf
You may want to add: /usr/local/php5513/lib/php to your php.ini include_path
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.1
/home/php-5.5.13/build/shtool install -c ext/phar/phar.phar /usr/local/php5513/bin
ln -s -f /usr/local/php5513/bin/phar.phar /usr/local/php5513/bin/phar
Installing PDO headers:          /usr/local/php5513/include/php/ext/pdo/

看make install可以看到每个文件的安装地址

重要:http://www.php1.cn/article/8054.html安装参考。

核心配置选项列表

杂项选项

--enable-debug 
编译时加入调试符号。 

--with-layout=TYPE 
设置被安装文件的布局。TYPE 是 PHP(默认)或 GNU。 

--with-pear=DIR 
在 DIR(默认为 PREFIX/lib/php)中安装 PEAR。 

--without-pear 
不安装 PEAR。 

--enable-sigchild 
使用 PHP 自带的 SIGCHLD 处理器。 

--disable-rpath 
禁用在搜索路径中传递其他运行库。 

--enable-libgcc 
启用 libgcc 的精确链接。 

--enable-php-streams 
包含试验性的 PHP 流。不要使用此选项,除非是要测试代码! 

--with-zlib-dir[=DIR] 
定义 zlib 的安装目录。 

--enable-trans-sid 
启用透明 session id 传输。仅适用于 PHP 4.1.2 或更低版本。PHP 4.2.0 以后,透明 sid 功能默认被编译其中。 

--with-tsrm-pthreads 
使用 POSIX 线程(默认)。 

--enable-shared[=PKGS] 
编译共享库 [default=yes]。 

--enable-static[=PKGS] 
编译静态库 [default=yes]。 

--enable-fast-install[=PKGS] 
为快速安装优化 [default=yes]。 

--with-gnu-ld 
假设 C 编译器使用 GNU ld [default=no]。 

--disable-libtool-lock 
避免锁死(可能破坏并联的编译)。 

--with-pic 
尝试仅使用 PIC/非 PIC 对象 [default=use both]。 

--enable-memory-limit 
编译内存限制支持功能。 

--disable-url-fopen-wrapper 
禁用 URL 形式的 fopen 封装协议。该协议允许通过 HTTP 或者 FTP 访问文件。 

--enable-versioning 
仅导出必须的符号。查看 INSTALL 文件以获得更多信息。 

--with-imsp[=DIR] 
包含 IMSP 支持(DIR 是 IMSP 的 include 目录和 libimsp.a 所在目录)。此选项仅在 PHP 3 中有效! 

--with-mck[=DIR] 
包含 Cybercash MCK 支持。DIR 是 cybercash mck 的编译目录,默认为 /usr/src/mck-3.2.0.3-linux。更多帮助情查看 extra/cyberlib 内的文件。此选项仅在 PHP 3 中有效! 

--with-mod-dav=DIR 
通过 Apache 的 mod_dav 实现对 DAV 的支持。DIR 是 mod_dav 的安装目录 (仅对以 Apache 模块方式安装的 PHP 有效)。此选项仅在 PHP 3 中有效! 

--enable-debugger 
编译远程调试功能。此选项仅在 PHP 3 中有效! 

--enable-versioning 
利用 Solaris 2.x 和 Linux 提供的版本管理(versioning)和范围(scoping)。此选项仅在 PHP 3 中有效! 

PHP 选项--enable-maintainer-mode 
对偶然安装一下的情形启用此选项,使得不检查编译规则和依赖关系。 

--with-config-file-path=PATH 
设置 php.ini 的搜索路径。默认为 PREFIX/lib。 

--enable-safe-mode 
默认启用安全模式。 

--with-exec-dir[=DIR] 
在安全模式时仅允许在 DIR 目录中执行。默认目录为 /usr/local/php/bin。 

--enable-magic-quotes 
默认启用 magic quotes。 

--disable-short-tags 
默认禁用短形式的开始标签 <? 。 

SAPI 选项下面的列表包含 PHP 可用的SAPI(服务器应用编程接口)。 

--with-aolserver=DIR 
指定 AOLserver 的安装路径。 

--with-apxs[=FILE] 
编译共享的 Apache 模块。FILE 是可选的 Apache apxs 工具的路径,默认指向 apxs。请确认指定的 apxs 已经安装在服务器中,并且它不是 Apache 源码包中的那个 apxs。 

--with-apache[=DIR] 
编译静态 Apache 模块。DIR 是 Apache 编译目录的顶层,默认为 /usr/local/apache。 

--with-mod_charset 
启用 mod_charset 的转换表(俄文的 Apache 使用)。 

--with-apxs2[=FILE] 
编译共享的 Apache 2.0 模块。FILE 是可选的 Apache apxs 工具的路径,默认指向 apxs。 

--with-caudium=DIR 
为使用 Caudium 编译 PHP 为一个 Pike 模块。DIR 是 Caudium 服务器目录,默认为 /usr/local/caudium/server。 

--disable-cli 
PHP 4.3.0 之后的版本有效。禁止编译 PHP 的 CLI 版本(使用它将同时强制使用 --without-pear 选项)。更多信息请查考 PHP 的命令行模式。 

--enable-embed[=TYPE] 
启用编译嵌入的 SAPI 库。TYPE 或者为 shared 或者为 static,默认为 shared。PHP 4.3.0 之后的版本有效。 

--with-fhttpd[=DIR] 
编译 fhttpd 模块。DIR 是 fhttpd 源代码目录,默认为 /usr/local/src/fhttpd。PHP 4.3.0 及以后的版本此选项不再有效。 

--with-isapi=DIR 
为 Zeus 服务器以 ISAPI 模块方式编译 PHP。 

--with-nsapi=DIR 
指定 Netscape/iPlanet/SunONE 的安装目录。 

--with-phttpd=DIR 
还没有信息。 

--with-pi3web=DIR 
为 Pi3Web 服务器编译 PHP 模块。 

--with-roxen=DIR 
以 Pike 模块方式编译 PHP。DIR 是 Roxen 的根目录,默认为 /usr/local/roxen/server。 

--enable-roxen-zts 
使用 Zend 线程安全(ZTS)编译 Roxen 模块。 

--with-servlet[=DIR] 
包含 servlet 支持。DIR 是 JSDK 的安装目录。此 SAPI 要求 java 扩展必须作为共享模块编译到 PHP 中。 

--with-thttpd=SRCDIR 
编译 PHP 为 thttpd 模块。 

--with-tux=MODULEDIR 
编译 PHP 为 TUX 模块(仅在 Linux 下有效)。 

--with-webjames=SRCDIR 
编译 PHP 为 WebJames 模块(仅在 RISC 操作系统中有效)。 

--disable-cgi 
禁止编译 CGI 版本的 PHP。PHP 4.3.0 之后的版本有效。 

--enable-force-cgi-redirect 
启用内部服务器重定向的安全检测。如果在 Apache 下使用 CGI 版本的 PHP,请启用该选项。 

--enable-discard-path 
如果启用该选项,PHP CGI 目录可以安全的放在 web 目录树的外面,人们无法避开 .htaccess 的安全限制。 

--with-fastcgi 
编译 PHP 为 FastCGI 应用程序。PHP 4.3.0 及以后的版本此选项不再有效,应该使用 --enable-fastcgi 选项。 

--enable-fastcgi 
如果启用,CGI 模块将被编译为支持 FastCGI。PHP 4.3.0 之后的版本有效。 


--disable-path-info-check 
如果该选项被禁用,例如 /info.php/test?a=b 形式的路径将不能工作。PHP 4.3.0 之后的版本有效。 Apache 手册。

0 0
原创粉丝点击