Author |
|
dala
Joined: 05 May 2011 Posts: 2
|
Posted: Thu 05 May '11 12:27 Post subject: Apache crashes when trying to load PHP module |
|
|
I downloaded and installed httpd-2.2.17-win32-x86-ssl.zip from apachelounge.
The server works fine.
Then I downloaded and installed PHP 5.3.6 (VC9 x86 Thread Safe) from php.net.
I ran the installer, and installed PHP as an Apache module.
The installed adds the following lines at the end of httpd.conf:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\PHP\"
LoadModule php5_module "C:\PHP\php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
But when these lines are added, Apache wont start (no errormessage in the log since Apache just crashes).
I even commented out the line 'LoadModule php5_module "C:\PHP\php5apache2_2.dll"', so that the only new line is
'PHPIniDir "C:\PHP\"'.
Still Apace crashes.
In other words, Apache seem to crash even before it attempts to load the module. The directive 'PHPIniDir "C:\PHP\"' causes Apache to crash. (When I comment out this line as well, Apache starts as normal.)
Does anyone know what might be wrong?
Thanks in advance for any help! |
|
Back to top |
|
Virsacer
Joined: 16 Jan 2010 Posts: 108 Location: Germany, Darmstadt
|
Posted: Thu 05 May '11 12:47 Post subject: |
|
|
The Backslash is escaping the doublequote...
You can change the line to |
|
Back to top |
|
dala
Joined: 05 May 2011 Posts: 2
|
Posted: Thu 05 May '11 13:00 Post subject: |
|
|
Thanks for answer, but it didn't help. Apache still crashes even if I write it like you said. Again, if the line is removed, Apache starts. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 05 May '11 14:04 Post subject: |
|
|
What is in your error log?
What is in the windows event log? |
|
Back to top |
|
Giles
Joined: 09 May 2011 Posts: 4
|
Posted: Mon 09 May '11 12:04 Post subject: |
|
|
Hello,
I have exactly the same symptoms as described by dala.
Though I am using a different version of PHP (php-5.2.17-Win32-VC6-x86.msi).
I can add an additional clue for this problem (at least in my case): the httpd server starts when invoked with the command line (not as a service). I can connect to it and browse the HTML files. But PHP is not active (I get the raw php files) though the 2 lines added by the install of PHP are NOT commented.
And to answer to the question above (in my case) there is no httpd log at all. Httpd does not even create the log file.
But it reports an error to Windows:
Quote: | The Apache service named reported the following error:
>>> Invalid command 'PHPIniDir', perhaps misspelled or defined by a module not included in the server configuration . |
As if the LoadModule php5_module line were ignored... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 09 May '11 13:50 Post subject: |
|
|
@Giles: What do you get starting apache with httpd -S ?? |
|
Back to top |
|
Giles
Joined: 09 May 2011 Posts: 4
|
Posted: Tue 10 May '11 1:08 Post subject: |
|
|
No error is found
Quote: | VirtualHost configuration:
127.0.0.1:80 is a NameVirtualHost
default server temple (C:/APMSserver/Apache/conf/httpd.conf:467)
port 80 namevhost temple (C:/APMSserver/Apache/conf/httpd.conf:467)
port 80 namevhost crypte (C:/APMSserver/Apache/conf/httpd.conf:481)
port 80 namevhost jideriel (C:/APMSserver/Apache/conf/httpd.conf:495)
port 80 namevhost sql (C:/APMSserver/Apache/conf/httpd.conf:509)
Syntax OK |
|
|
Back to top |
|
Giles
Joined: 09 May 2011 Posts: 4
|
Posted: Fri 13 May '11 21:43 Post subject: |
|
|
I suspect that the problem was coming from an invalid XP installation.
When checking dependencies of PHP DLL, in the tree, I found one Windows DLL depending on another DLL with one missing entry.
I checked the DLL versions and I discovered that the caller was a in version 6 which is the VISTA mark I believe.
I have re-installed a fresh XP and I have no more problem.
I don't know if dala's original problem had the exact same wrong DLL. But it may be a missing DLL or DLL entry issue too |
|
Back to top |
|
Giles
Joined: 09 May 2011 Posts: 4
|
Posted: Sat 14 May '11 0:45 Post subject: |
|
|
Well though it works I just verified that I have still the DLL in version 6 referring to an inexistant entry. This seems normal with XP SP3.
So I don't know why it did not work. Anyway, the full re-installation fixed the issue. |
|
Back to top |
|