php5 apache config

apache

  1.path:加入apache的环境

  2.修改 httpd.conf :

  • 找到DirectoryIndex index.html 在后面加入 index.htm index.php index.html.var
  • ScriptAlias /php/ "d:/PC_webserver/php5/"
  • AddType application/x-httpd-php .php3
  • AddType application/x-httpd-php .php
  • AddType application/x-httpd-php .phtml
  • Action application/x-httpd-php "/php/php-cgi.exe"
  • 注意,如果安装后出现You don''t have permission to access / on this server.或者出现无法运行php文件的情况下查找httpd.conf中的
    Deny from all
    改为
    Allow from all

php5

  1.配置php.ini了

  • 找到extension_dir = "./" 改为extension_dir = "D:/PC_webserver/php5/ext"
  • ;extension=php_mbstring.dll
    ;extension=php_mysql.dll
    ;extension=php_gd2.dll
    将'';''去掉改为
  • 找到;session.save_path = "/tmp"
    将'';''去掉 设置你保存session的目录,如
    session.save_path = " D:/PC_webserver/php5/session";
    注意:在这里需要手工添加 session这个文件夹
原文地址:https://www.cnblogs.com/toto/p/1683548.html