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 -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Apache crashes when trying to load PHP module
Author
dala



Joined: 05 May 2011
Posts: 2

PostPosted: Thu 05 May '11 12:27    Post subject: Apache crashes when trying to load PHP module Reply with quote

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

PostPosted: Thu 05 May '11 12:47    Post subject: Reply with quote

The Backslash is escaping the doublequote...

You can change the line to
Code:
PHPIniDir C:/PHP
Back to top
dala



Joined: 05 May 2011
Posts: 2

PostPosted: Thu 05 May '11 13:00    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 05 May '11 14:04    Post subject: Reply with quote

What is in your error log?

What is in the windows event log?
Back to top
Giles



Joined: 09 May 2011
Posts: 4

PostPosted: Mon 09 May '11 12:04    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 09 May '11 13:50    Post subject: Reply with quote

@Giles: What do you get starting apache with httpd -S ??
Back to top
Giles



Joined: 09 May 2011
Posts: 4

PostPosted: Tue 10 May '11 1:08    Post subject: Reply with quote

No error is found Confused

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

PostPosted: Fri 13 May '11 21:43    Post subject: Reply with quote

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

PostPosted: Sat 14 May '11 0:45    Post subject: Reply with quote

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


Reply to topic   Topic: Apache crashes when trying to load PHP module View previous topic :: View next topic
Post new topic   Forum Index -> Other Software