2012-05-04 84 views
0

我需要添加http://us3.php.net/xsl該模塊到我的PHP,但我真的很困惑我如何真正做到這一點?它通過該鏈接安裝'PHP 5默認包含XSL擴展,並且可以通過將參數--with-xsl [= DIR]添加到配置行來啓用。 DIR是libxslt安裝目錄。'但不確定這些文件將在哪裏?我有一個VPS和訪問WHM Cpanel,我可以從那裏做到這一點?我碰到的軟件,安裝模塊位WHM,但得到這不是我想要的感覺...真搞不清楚安裝PHP模塊

+0

這是更多的服務器配置問題,而不是編程問題。 – psynnott

回答

2

轉到WHM - >軟件 - > EasyApache(Apache的更新)

在EasyApache頁面上,選擇開始自定義基於輪廓現在,和一對夫婦的屏幕後,選擇詳盡的選項列表。選擇你想要安裝的模塊,XSL,並繼續重新編譯。

1

您需要手動編譯PHP,如果你想要,你目前還沒有任何模塊。有很多教程如何做到這一點,例如,如果你的Apache 2作爲web服務器,然後按照這個網頁上php.net:http://www.php.net/manual/en/install.unix.apache2.php

當你編譯PHP,命令做的一個是

./configure 

中,你可以(和大多數webhostings做)提供很多很多的參數,它說你想要的模塊安裝和哪些功能PHP可以使用。它可能看起來像這樣:

./configure '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/lib' '--with-apxs' '--with-iconv=/usr/local/php' '--with-openssl=/usr' '--with-zlib=/usr' '--with-mysql' '--with-pgsql=/Users/marc/cvs/entropy-php4/php-module/build/postgresql-build' '--enable-cgi' '--with-gd' '--with-png-dir=/usr/local/php' '--with-freetype-dir=/usr/local/php' '--with-t1lib=/usr/local/php' '--with-jpeg-dir=/usr/local/php' '--with-tiff-dir=/usr/local/php' '--with-curl=/usr/local/php' '--with-mcal=/usr/local/php' '--with-mcrypt=/usr/local/php' '--with-mhash=/usr/local/php' '--with-pdflib=/usr/local/php' '--with-imap=../imap-2002d' '--with-imap-ssl=/usr' '--with-expat-dir=/usr/local/php' '--with-gettext=/usr/local/php' '--with-dom=/usr/local/php' '--with-dom-xslt=/usr/local/php' '--with-dom-exslt=/usr/local/php' '--with-xslt-sablot=/usr/local/php' '--with-mime-magic=/usr/local/php/etc/magic.mime' '--with-mssql=/usr/local/php' '--with-fbsql=/Users/marc/cvs/entropy-php4/php-module/build/frontbase-build/Library/FrontBase' '--with-ming=/Users/marc/cvs/entropy-php4/php-module/build/ming-build' '--enable-xslt' '--with-ldap' '--with-xml' '--with-xmlrpc' '--with-iodbc=/usr' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-trans-sid' '--enable-exif' '--enable-wddx' '--enable-ftp' '--enable-mbstring' 

它這個例子中有很多啓用模塊。您還可以看到「配置行」用於在phpinfo中編譯當前版本的PHP(它位於頂部,第三行)。