logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Upgrading from Apache 2.2.15 to 2.4.3 and PHP 5.3.5 to 5.4.9
Author
99Titans



Joined: 04 Dec 2012
Posts: 7

PostPosted: Wed 05 Dec '12 16:12    Post subject: Upgrading from Apache 2.2.15 to 2.4.3 and PHP 5.3.5 to 5.4.9 Reply with quote

Hello. I am in need of some guidance. I am completely new to Apache and PHP.

I have been assigned to upgrade our Windows Web Servers which currently run Apache 2.2.15 and PHP 5.3.5.

I need to upgrade Apache to 2.4.3 and PHP to 5.4.9.

Currently I am working on a test server.
Here are the steps I have taken so far.
Stopped the Apache Service.
Stopped the Apache Monitor Process.
Installed MS Visual C++ 2010 SP1
Extracted the PHP Thread Safe package to the current PHP folders excluding the Original PHP.ini file.
Extracted the Apache Package to the current Apache directory structure excluding the Conf folder.
Renamed the directory to 2.4.3 instead of 2.2.
Uninstalled the Old Apache Service.
Installed the new Apache Service.
Updated the directory paths in the httpd.conf file.
Commented out some modules that are not used in the new version.
o #LoadModule authn_default_module modules/mod_authn_default.so
o #LoadModule authz_default_module modules/mod_authz_default.so

Added this dll (php5apache2_4.dll)to the E:\PHP Directory

I am currently stuck on the Apache Service not starting.
I have run httpd.exe in a cmd prompt. Here is the error I am getting.

e:\Apache2.4.3\bin>httpd.exe
httpd.exe: Syntax error on line 507 of E:/Apache2.4.3/conf/httpd.conf: Cannot load E:/PHP/php5apache2_2.dll into server: The specified procedure could not be fo
und.

Here is the Syntax for line 505 - 507:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "PHPIniDir "E:/PHP/""
LoadModule php5_module "E:/PHP/php5apache2_4.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

I haven't been able to figure out what to do next. Am I missing a module?


Last edited by 99Titans on Thu 06 Dec '12 23:26; edited 1 time in total
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Wed 05 Dec '12 16:23    Post subject: Reply with quote

Assume you are running Win32.

Be sure your download the corresponding php5apache2_4.dll with your php version.

Looks like you php directives are not ok, he is complaining that php5apache2_2.dl cannot be loaded.

- Copy php5apache2_4.dll to your php folder (eg. c:/php)

# Add to your httpd.conf

LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

Note: Remember to substitute the c:/php for your actual path to PHP in the above example.
Back to top
99Titans



Joined: 04 Dec 2012
Posts: 7

PostPosted: Wed 05 Dec '12 17:41    Post subject: Reply with quote

Yes, it is Win32.
I have downloaded the 5.4.9 dll from
http://www.apachelounge.com/download/win32/modules-2.4/php5apache2_4.dll-php-5.4-win32.zip

I copied php5apache2_4.dll to my PHP Folder (E:/PHP)

I added the recommended code to my httpd.conf and corrected my typos. It is listed below.:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "E:/PHP/"
LoadModule php5_module "E:/PHP/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

I get his error:
e:\Apache2.4.3\bin>httpd.exe
httpd.exe: Syntax error on line 507 of E:/Apache2.4.3/conf/httpd.conf: Cannot load E:/PHP/php5apache2_4.dll into server: The specified procedure could not be fo
und.

Did I miss something with the install? Am I missing a module? Should I have not manually edited the Service Path?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Wed 05 Dec '12 17:50    Post subject: Reply with quote

Assume you have installed the VC9 runtime as stated on the left at http://windows.php.net/download/

Anything in the Windows event viewer ?

Also a good idea is to start without any php extension enabled in php.ini.

What do you get when you run in a command window:

>httpd.exe -t
Back to top
99Titans



Joined: 04 Dec 2012
Posts: 7

PostPosted: Wed 05 Dec '12 18:23    Post subject: Reply with quote

I did install MS 2008 C++ Runtime as well as the VC9 Thread safe PAckage from apachelounge.

The event Viewer shows:
The Apache service named reported the following error:
>>> httpd.exe: Could not open configuration file E:/Apache2.2/conf/httpd.conf: The system cannot find the path specified. .

I renamed the Apache2.2 path. How do I get the httpd.exe to look in the updated path?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Wed 05 Dec '12 20:29    Post subject: Reply with quote

Btw. what OS you are using, Win7 ?

I think you mixed 2.2 and 2.4 in some way.

Editing the registry is not always a good idea. Better is to is to do an uninstall of a service with >httpd -k uninstall and install the one one for 2.4.
Back to top
99Titans



Joined: 04 Dec 2012
Posts: 7

PostPosted: Wed 05 Dec '12 20:34    Post subject: Reply with quote

I was wondering if that was a bad move.
I am on Windows Server Standard 32bit.
I will give that a try.
Back to top
99Titans



Joined: 04 Dec 2012
Posts: 7

PostPosted: Thu 06 Dec '12 23:33    Post subject: Reply with quote

I reverted back to my snapshot and started over. The difference this time was uninstalling the Apache service and installing the new one.

Getting closer.
Back to top


Reply to topic   Topic: Upgrading from Apache 2.2.15 to 2.4.3 and PHP 5.3.5 to 5.4.9 View previous topic :: View next topic
Post new topic   Forum Index -> Apache