I'd like to make PHP5.3.8
and Apache2.4
start under the windows 64bit
and the xampp
environment, when apache_start.bat
is performed by command pronto , the following error occurs, and Apache
can't be started.
C:\xampp>apache_start.bat
Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...
httpd.exe: Syntax error on line 187 of C:/xampp/apache/conf/httpd.conf:
Cannot load C:xampp/php/php5apache2_4.dll into server:
\x8ew\x92\xe8\x82\xb3\x82\xea\x82\xbd\x83\x82\x83W\x83\x85\x81[\x83\x8b\x82\xaa\x8c\xa9\x82\xc2\x82\xa9\x82\xe8\x82\xdc\x82\xb9\x82\xf1\x81B
Apache konnte nicht gestartet werden
Apache could not be started
The one which is the cause checked the error contents, and found out that binary of PHP
and Apache
doesn't match. So the following command was carried out and binary of PHP
and Apache
was checked.
C:\xampp > cd C:\xampp\apache\bin
C:\xampp\apache\bin > httpd -v
Server version: Apache/2.4.41 (Win64)
Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
C:\xampp\apache\bin > cd C:\xampp
C:\xampp > php -r "echo PHP_INT_SIZE;"
4
When the investigation was continued on the Inte.net, when it could be settled when Visual C++ Redistributable for Visual Studio 2012 Update 4 was installed, I had that, so x64
added to the Windows was installed, but it couldn't be settled.
I'd like to tell me the way which can start PHP5.3.8
and Apache2.4
by the environment of such windows 64bit
and xampp
.
I worked by the following procedure.
Installation of PHP5.3.8
xampp-win32-1.7.7-VC9.zip
is downloaded from SourceForge .
php
of xampp-win32-1.7.7-VC9.zip\xampp
, change the name to php53
and keep after C:\xampp\
.
Movement of httpd-xampp.conf
xampp-win32-1.7.7-VC9.zip\xampp\apache\conf\extra\httpd-xampp.conf
, change the name to httpd-xampp.cof53
and keep after C:\xampp\apache\conf\extra\
.
List itemInstallation of php5apache2_4.dll
.
php5apache2_4.dll-php-5.3-win32.zip
is downloaded from Apache Additional downloads .
I move php5apache2_4.dll
of php5apache2_4.dll-php-5.3-win32.zip\PHP 5.3.10\
to C:\xampp\php53\
.
And line 18 of the C:\xampp\apache\conf\extra\httpd-xampp.conf53
are changed to LoadModule php5_module "/xampp/php/php5apache2_4.dll"
from LoadModule php5_module "/xampp/php/php5apache2_2.dll"
.
Edit of httpd.conf
.
The following contents are added to C:\xampp\apache\conf\httpd.conf
.
# Dynamic Shared Object For LoadModule crowd who has that in (DSO) Support (line 187).
LoadModule php5_module "C:PHP/php5apache2_4.dll"
# In the <IfModule mime_module>, (line 450,451)
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# Most, the bottom
PHPIniDir "C:/xampp/php"
Edit of php.ini
php.ini
of C:\xampp\php
, the name is changed to php.ini - origin
.
And, php.ini - develop
, the name is changed to php.ini
, ; extension_dir ="ext"
; extension_dir ="ext"
,under the extension_dir = "C:\xampp\php\ext"
is added.
Making of a symbolic link .
C:\xampp\php
, the name is changed to php - origin
.
C:\xampp\apache\conf\extra\httpd-xampp.conf
, the name is changed to httpd-xampp.conf - origin
.
And a symbolic link is made by the next command.
cd C:\xampp
mklink C:\xampp\apache\conf\extra\httpd-xampp.conf C:\xampp\apache\conf\extra\httpd-xampp.conf53
mklink /D C:\xampp\php C:\xampp\php53
Thank you.
Nr.1 if you load stuff from xampp/php you need to place it there and not in php53.
Nr.2 your httpd.conf looks broken to me. I wouldn't try to load the PHP module from there again as it's already being loaded by the distinct PHP config file. But even if you do you should make sure to use a valid path:
C:PHP/php5apache2_4.dll
Is not a valid path on Windows. There needs to be a slash ( /
) behind the :
.
But even if there was a slash, you never mentioned there being a C:\PHP
folder on your system. So far you only ever mentioned the C:\xampp
and C:\xampp\php
and C:\xampp\php53
folders.
If removing the LoadModule statement alltogether doesn't help, maybe try entering a valid path instead. (Replacing the Windows-typical backslash with a forward-slash is definitely inteneded and should be kept that way when changing the path inside the httpd.conf or any other Apache/PHP config files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.