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>