为了账号安全,请及时绑定邮箱和手机立即绑定

php服务器的塔建

标签:
PHP

1、获取安装包php.i686;

2、安装php.i686

rpm -ivh php.i686

3、配置apache让其支持php

vi

#

# AddType allows you to add to or override the MIME configuration

# file mime.types for specific file types.

#

#AddType application/x-tar .tgz

AddType application/x-httpd-php .php             \\新添加语句(前面有空格)

AddType application/x-httpd-php-source .phps     \\新添加语句(前面有空格)


4、配置PHP服务器

vi /etc/php.ini

; Whether or not to register the EGPCS variables as global variables.  You may

; want to turn this off if you don't want to clutter your scripts' global scope

; with user data.  This makes most sense when coupled with track_vars - in which

; case you can access all of the GPC variables through the $HTTP_*_VARS[],

; variables.

; You should do your best to write your scripts so that they do not require

; register_globals to be on;  Using form variables as globals can easily lead

; to possible security problems, if the code is not very well thought of.

; http://www.php.net/manual/en/ini.core.php#ini.register-globals

register_globals = On    \\把register_globalsA的值改为on


5、启重apache

service httpd restart


6、测试PHP是否安装成功

写一个php测试页面info.php,放在apache的根目录/var/www/html下,其内容如下

<?php

 phpinfo();

?>

在浏览器上输入127.0.0.1/info.php,如果能正常显示出php信息,则说明PHP安装成功!



点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消