Oracle 技术论坛 - Oracle 高手之路
http://www.orasql.com/bbs/

Mac 中配置PHP
http://www.orasql.com/bbs/viewtopic.php?f=14&t=2314
分页: 1 / 1

作者:  oracle_awen [ 2013-03-21 22:40 ]
文章标题 :  Mac 中配置PHP

打开终端,切换到root用户,使用apachectl打开自带的apache
Last login: Mon Dec 24 14:46:17 on console
steventekiMacBook-Pro:~ steven$ apachectl start
This operation requires root.
steventekiMacBook-Pro:~ steven$ su -
Password:
steventekiMacBook-Pro:~ root# apachectl start

修改/etc/apache2/httpd.conf,加载php模块
#loadModule php5_module libexec/apache2/libphp5.so

loadModule php5_module libexec/apache2/libphp5.so
steventekiMacBook-Pro:~ root# vim /etc/apache2/httpd.conf

创建php配置文件,可做相应的修改。然后使用phpinfo测试环境是否正常。
steventekiMacBook-Pro:~ root# cp /etc/php.ini.default /etc/php.ini
steventekiMacBook-Pro:~ root# cd /Library/WebServer/Documents/
steventekiMacBook-Pro:Documents root# vim phpinfo.php
steventekiMacBook-Pro:Documents root# cat phpinfo.php
<?php
phpinfo();
?>
steventekiMacBook-Pro:Documents root# apachectl restart


附件:
1.jpeg
1.jpeg [ 155.23 KiB | 被浏览 10196 次 ]

分页: 1 / 1 当前时区为 UTC + 8 小时
Powered by OraSql © 2011, 2012, oracle_awen
http://www.orasql.com/