zoukankan      html  css  js  c++  java
  • phpstudy(小皮面板)和phpstudy2018 配置php的区别

    phpstudy(小皮面板)和phpstudy2018 配置php的区别

    一、总结

    一句话总结:

    phpstudy(小皮面板) 和 phpstudy2018 只是引入的php的位置不同,但是核心代码还是一样的

    1、apache中配置php的核心代码?

    分别设置FcgidInitialEnv、AddHandler和FcgidWrapper
    FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts"
    AddHandler fcgid-script .php
    FcgidWrapper "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php

    二、phpstudy2018中:apache配置文件中怎么配置php

    这是在phpstudy2018中

    LoadModule fcgid_module modules/mod_fcgid.so
    <IfModule fcgid_module>
    Include conf/extra/httpd-fcgid.conf
    FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy/PHPTutorial/php/php-7.2.1-nts/"
    AddHandler fcgid-script .php
    FcgidWrapper "D:/software/coding/php/phpstudy/PHPTutorial/php/php-7.2.1-nts/php-cgi.exe" .php
    </IfModule>

    最后配置域名的时候:

    <VirtualHost *:80>
        DocumentRoot "D:softwarecodingphpphpstudyPHPTutorialWWWks"
        ServerName ks.com
        ServerAlias 
      <Directory "D:softwarecodingphpphpstudyPHPTutorialWWWks">
          Options FollowSymLinks ExecCGI
          AllowOverride All
          Order allow,deny
          Allow from all
         Require all granted
         DirectoryIndex index.php index.html login.html
      </Directory>
    </VirtualHost>

    phpstudy2018 配置php核心代码:

    FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy/PHPTutorial/php/php-7.2.1-nts/"
    AddHandler fcgid-script .php
    FcgidWrapper "D:/software/coding/php/phpstudy/PHPTutorial/php/php-7.2.1-nts/php-cgi.exe" .php

    三、phpstudy小皮面板中:apache配置文件中怎么配置php

    直接在配置域名的时候指定了php

     1 <VirtualHost *:80>
     2     DocumentRoot "D:/software/coding/php/phpstudy_191125/phpstudy_pro/WWW/ks"
     3     ServerName ks.com
     4     ServerAlias 
     5     FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts"
     6     AddHandler fcgid-script .php
     7     FcgidWrapper "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php
     8   <Directory "D:/software/coding/php/phpstudy_191125/phpstudy_pro/WWW/ks">
     9       Options FollowSymLinks ExecCGI
    10       AllowOverride All
    11       Order allow,deny
    12       Allow from all
    13       Require all granted
    14       DirectoryIndex index.php index.html login.html
    15   </Directory>
    16   ErrorDocument 400 /error/400.html
    17   ErrorDocument 403 /error/403.html
    18   ErrorDocument 404 /error/404.html
    19   ErrorDocument 500 /error/500.html
    20   ErrorDocument 501 /error/501.html
    21   ErrorDocument 502 /error/502.html
    22   ErrorDocument 503 /error/503.html
    23   ErrorDocument 504 /error/504.html
    24   ErrorDocument 505 /error/505.html
    25   ErrorDocument 506 /error/506.html
    26   ErrorDocument 507 /error/507.html
    27   ErrorDocument 510 /error/510.html
    28 </VirtualHost>

    phpstudy(小皮面板) 配置php核心代码:

    FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts"
    AddHandler fcgid-script .php
    FcgidWrapper "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php

    四、总结

    phpstudy2018 配置php核心代码:

    FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy/PHPTutorial/php/php-7.2.1-nts/"
    AddHandler fcgid-script .php
    FcgidWrapper "D:/software/coding/php/phpstudy/PHPTutorial/php/php-7.2.1-nts/php-cgi.exe" .php

    phpstudy(小皮面板) 配置php核心代码:

    FcgidInitialEnv PHPRC "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts"
    AddHandler fcgid-script .php
    FcgidWrapper "D:/software/coding/php/phpstudy_191125/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php

    phpstudy(小皮面板)和phpstudy2018只是引入的php的位置不同,但是核心代码还是一样的

    五、参考资料

    1、apache配置文件中怎么配置php

    yum安装的话配置文件/etc/httpd/conf.d/php.conf

    <IfModule prefork.c>
    LoadModule php5_module modules/libphp5.so
    </IfModule>
    <IfModule worker.c>
    LoadModule php5_module modules/libphp5-zts.so
    </IfModule>

     
  • 相关阅读:
    如何解决python连接数据库编码问题(python传数据到mysql乱码)'ascii' codec can't encode _mysql_exceptions.OperationalError: (1366, "Incorrect string value:?
    git 和 github 链接
    python 链接 redis 失败 由于目标计算机积极拒绝,无法连接
    假设检验,alpha,p值 通俗易懂的的理解。
    python 爬虫学习之路
    SQL邮件服务(解决各种疑难杂症)+案例 + 使用SQLserver 邮件系统发送SQL代理作业执行警告
    使用tomcat,不能连接localhost/8080的解决办法
    制作R中分词的字典的办法
    Windos 下python2.7安装 pymssql 解决方案
    R语言做相关性分析
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/12073961.html
Copyright © 2011-2022 走看看