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: Issues with IIS and Apache on same Windows Server
Author
penra



Joined: 31 Oct 2011
Posts: 4

PostPosted: Mon 31 Oct '11 20:58    Post subject: Issues with IIS and Apache on same Windows Server Reply with quote

We use IIS and Apache on the same server, both webservers were using the same PHP Version 5.2.14. Now we need to use APC and in order to do so must upgrade Apache and PHP.
Upgraded Apache to the Apache Lounge binaries and both versions work fine with PHP 5.2.14, when we update PHP to Version 5.3.8 NTS, Apache refuses to start.
Is there a recommended version and method for using the same PHP with both IIS and Apache?

Windows 2003 R2
IIS 6
Apache 2.2.21 (Apache Lounge binary)
Back to top
Steffen
Moderator


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

PostPosted: Mon 31 Oct '11 21:07    Post subject: Reply with quote

Any clue in the Windows Evenet, Apache and/or php log(s).

Do you run with php as module or fcgid ?

Steffen
Back to top
penra



Joined: 31 Oct 2011
Posts: 4

PostPosted: Mon 31 Oct '11 21:58    Post subject: Reply with quote

from httpd.conf:

ScriptAlias /php/ "C:/PHP/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/PHP/php.exe"
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
SetEnv PHPRC "C:/PHP"
#PHPIniDir "C:/PHP"

<Directory "c:/PHP/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

The error was like:
Faulting application httpd.exe, version 2.2.21.0, faulting module php5ts.dll, version 5.3.8.0, fault address 0x000956d6.
Back to top
Steffen
Moderator


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

PostPosted: Mon 31 Oct '11 22:18    Post subject: Reply with quote

Looks like you going to run as module, then you need the VC9 x86 Thread Safe form php.net.

Try, assuming you php.ini is at C:/PHP:

LoadModule php5_module "C:/PHP/php5apache2_2.dll"
PHPINIDir C:/PHP/php.ini
AddHandler application/x-httpd-php .php

And remove the other lines you have.



Not sure why you have <Directory "c:/PHP/"> ....
You can remove it.

Steffen
Back to top
penra



Joined: 31 Oct 2011
Posts: 4

PostPosted: Mon 31 Oct '11 22:42    Post subject: Reply with quote

I will try tonight, thanks for help.

In this case php.ini is in c:\windows\php.ini.
Any issues with running IIS in the ThreadSafe version?
Or should I consider running NTS for IIS and TS for Apache?
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 685

PostPosted: Mon 31 Oct '11 22:46    Post subject: Reply with quote

To avoid eventually conflicts, looks to me safer to have two versions of php running.

I do not know about IIS and PHP, just try it Smile


Steffen
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Tue 01 Nov '11 5:55    Post subject: Reply with quote

On IIS use wincache
On Apache use Apc
Back to top
penra



Joined: 31 Oct 2011
Posts: 4

PostPosted: Wed 02 Nov '11 7:20    Post subject: Reply with quote

I tried running a TS VC9 for Apache, separate from NTS VC9 for IIS, but Apache insists on using C:\windows as the PHP Configuration folder. The php.ini is looking at the correct install of PHP but the version is reporting the "IIS" version.
Does that make sense?
Regedit reveals a pointer to C:\windows\php.ini, should I remove it?
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 685

PostPosted: Wed 02 Nov '11 11:54    Post subject: Reply with quote

Maybe you mixed up the ini's. Best to have only two ini's on your system.

You can see with phpinfo script which ini is loaded at the header: Loaded Configuration File:

<?php
phpinfo();
?>

Steffen
Back to top


Reply to topic   Topic: Issues with IIS and Apache on same Windows Server View previous topic :: View next topic
Post new topic   Forum Index -> Apache