Reputation: 1234
Apache 2.4.25 + php 5.6.30 + php 7.1.4 I did this successful, several times. But now php 5.6.30 cannot work, only php 7.1.4 works. Too strange...
httpd-vhosts.conf
AddType application/x-httpd-php .php
ScriptAlias /php-5.6.30/ "D:/Codes/webserver/php/php-5.6.30-Win32-VC11-x64/"
ScriptAlias /php-7.1.4/ "D:/Codes/webserver/php/php-7.1.4-Win32-VC14-x64/"
<Directory "D:\Codes\webserver\php">
Require all granted
</Directory>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:\Codes\wwwroot\tests\php71"
ServerName php71.local
ErrorLog "logs/php71-error.log"
CustomLog "logs/php71-access.log" common
<Directory "D:\Codes\wwwroot\tests\php71">
Action application/x-httpd-php "/php-7.1.4/php-cgi.exe"
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:\Codes\wwwroot\tests\php56"
ServerName php56.local
ErrorLog "logs/php56-error.log"
CustomLog "logs/php56-access.log" common
<Directory "D:\Codes\wwwroot\tests\php56">
Action application/x-httpd-php "/php-5.6.30/php-cgi.exe"
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Both index.php
<?php phpinfo(); ?>
I did this on my pc, ok.
Then I did this on my nb, ok.
I re-install nb's windows 10, ok.
Now I re-install pc's windows 10, not ok.
The page shows 500 Internal Server Error.
error log of php56 is:
End of script output before headers: php-cgi.exe
How to fix this?
I added everyone permission on php56 folder, not work.
Upvotes: 0
Views: 453
Reputation: 1234
I found the problem. Install: Microsoft Visual C++ 2008 SP1 Redistributable Package (x64) Visual C++ Redistributable for Visual Studio 2012 Update 4
Upvotes: 1