Author |
|
penra
Joined: 31 Oct 2011 Posts: 4
|
Posted: Mon 31 Oct '11 20:58 Post subject: Issues with IIS and Apache on same Windows Server |
|
|
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: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 31 Oct '11 21:07 Post subject: |
|
|
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
|
Posted: Mon 31 Oct '11 21:58 Post subject: |
|
|
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: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 31 Oct '11 22:18 Post subject: |
|
|
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
|
Posted: Mon 31 Oct '11 22:42 Post subject: |
|
|
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: 692
|
Posted: Mon 31 Oct '11 22:46 Post subject: |
|
|
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
Steffen |
|
Back to top |
|
Kanashii
Joined: 17 Jul 2006 Posts: 155 Location: Porando
|
Posted: Tue 01 Nov '11 5:55 Post subject: |
|
|
On IIS use wincache
On Apache use Apc |
|
Back to top |
|
penra
Joined: 31 Oct 2011 Posts: 4
|
Posted: Wed 02 Nov '11 7:20 Post subject: |
|
|
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: 692
|
Posted: Wed 02 Nov '11 11:54 Post subject: |
|
|
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 |
|