Reputation: 438
I recently downloaded the latest version of AppServ (Appserv8
) for Windows.
It installs Apache 2.4
, MySQL 5.7
and both version of PHP5
and PHP7
. After installing, the used version of PHP is 5.
I've tried to switch the version using the script "PHP Version Switch" provided with the installation but it seems not working.
I've tried to manually edit the http.conf
file in Apache24
folder but without results.
With these lines Apache starts normally with PHP5:
LoadModule php5_module C:/AppServ/php5/php5apache2_4.dll
PHPIniDir "C:/AppServ/php5/"
If I edit with:
LoadModule php7_module C:/AppServ/php7/php7apache2_4.dll
PHPIniDir "C:/AppServ/php7/"
When I try to start Apache, I obtain the following error:
httpd.exe: Syntax error on line 180 of C:/Appserv/Apache24/conf/httpd.conf: Cannot load C:/Appserv/php7/php7apache2_4.dll into server: Impossibile trovare il modulo specificato.
(Part of the error is in italian: unable to find the specified module)
Note that the dll is in the folder as specified in the path. I'm stuck with this error and I don't know where I have to modify configuration file (if is this the problem).
EDIT1: Somewhere I've found this discussion in which the author explain that, because of a dependencies of Visual C++, the DLL can be not readable. I checked my system, I cleaned it from multiple installation of Microsoft Visual C++ redistributable and I tried to install x64 or x86 versions.
With the x86 version, I have the previous problem. With the x64 version, I can't start Apache because of a missing dll: it should be because apache is x86 version (I'm not sure of this).
EDIT2:
As suggested from @chugadie, I tried to use dependencywalker to trace dependencies.
I found several missing files with prefix API-MS-WIN-CRT
.
Now I'm trying to fix but I have several problems with dll which are x86 and x64. I think the best way is to reinstall all components in x64 architecture.
Any help is very appreciated.
Upvotes: 2
Views: 11159
Reputation: 125
On AppServ folder on Start Menu (or Win Key + S) you must sear for PHP Version Switch and it will request admin privileges (if you deny it, it won't work), then it will show a cmd console rquesting you the PHP version to set on Apache, press 7 to switch PHP 7 or press 5 to switch PHP5.
If you did this and it won't work you should undo changes you did it on AppServ files.
Upvotes: 5
Reputation: 480
I had the same problem with happy end. My solution:
Arrivederci e buona fortuna.
Upvotes: 2