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:\software\coding\php\phpstudy\PHPTutorial\WWW\ks"
    ServerName ks.com
    ServerAlias 
  <Directory "D:\software\coding\php\phpstudy\PHPTutorial\WWW\ks">
      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>

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM