简体   繁体   中英

How to install PHP5 on Apache 1.335

It's been a long time since I installed PHP or Apache, maybe 10 years. Now I downloaded PHP5, but I cant get it to work on my Apache 1.335 version. I dont want to change my Apache version because, I tried, but I just fail at installing, I have tried numerous times in the past too, but somehow I just fail at it every single time. The only version I have got working was 1.335, so I've got sticked in it for many years. I tried to install newest apache maybe a month ago, but I just failed again. Took me 3 hours and... failure. I browsed the whole internet to see guides but they all were broken one way or another.

So, now when I put these lines in the end of "httpd.conf" file in Apache:

ScriptAlias /php/ "d:/php543/"
Action application/x-httpd-php "/php543/php.exe"

LoadModule php5_module "d:/php543/php5apache2_2.dll" #<-- line 1054
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

It says when I execute Apache:

Syntax error on line 1054 of d:/apache1335/conf/httpd.conf:
Cannot load d:/php543/php5apache2_2.dll into server: (126) file not found

But the file exists. I had copied php5ts.dll into "windows/system32" folder and php.ini into "windows" folder.

I have tried "EasyPHP" in the past, but I really hated that thing, it just made things harder. I also have tried newer Apache versions in the past, but the ones I got working, had something annoying in them, cant remember exactly what but why on earth I would have sticked with ancient version if the newer were fine?

You are trying to load an apache 2.2 module into apache 1. The probability of success on that operation is pretty low.

I would recommend you upgrade, apache 1.335 probably has a load of bugs as well. If you can't get newer versions working, it is unlikely you'll get an older version working as not much has changed in the install procedures.

If you are having problems installing apache, can I suggest using either http://www.wampserver.com/en/ or http://www.apachefriends.org/en/xampp.html I haven't used XAMPP but WAMP has PHP, Apache, MySQL all bundled up in 1 easy installer. It works straight out of the box with no configuration changes, although of course you are oging to be wanting to change some of the configuration.. which it provides a nice systray icon for easy configuration (for the most commonly used configuration options, you can change it straight within the systray icon without even opening up the config files)

One feature I love about WAMP is that it has xDebug preinstalled and configured out of the box, I remember trying to set it up manually my first time and it was a PITA

Eventually you will probably want to install the individual components, but as a starter kit, they really are great options.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM