简体   繁体   English

将PHP添加到Apache Web服务器?

[英]Adding PHP into Apache web server?

So I installed Apache using the typical commands: 因此,我使用典型命令安装了Apache:

./configure
make 
make install

Then I downloaded PHP version 5.5.2 and did the same thing, now from command line I get this output: 然后我下载了PHP 5.5.2版并做了同样的事情,现在从命令行中得到以下输出:

PHP 5.5.2 (cli) (built: Aug 22 2013 10:47:20)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies

Now I have to tell Apache to use PHP, but I don't have modules/libphp5.so as the manual at http://www.php.net/manual/en/install.unix.apache2.php says. 现在,我不得不告诉Apache使用PHP,但是我没有模块/libphp5.so,如http://www.php.net/manual/en/install.unix.apache2.php上的手册所述。 Im using SUSE linux by the way. 即时通讯我正在使用SUSE linux。

Edit: libphp5.so came with the php distribution, but if you add it that way it promts this: 编辑:libphp5.so附带了php发行版,但是如果以这种方式添加它,则会提示:

httpd: Syntax error on line 147 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: core_globals_id

So I solved it, actually it was a bad installation. 所以我解决了,实际上这是一个错误的安装。 I did: 我做了:

make clean
make
make install

and everything worked fine. 而且一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM