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: Apache2 won't run after installing PHP
Author
Tinhare



Joined: 29 Oct 2006
Posts: 5

PostPosted: Sun 29 Oct '06 16:18    Post subject: Apache2 won't run after installing PHP Reply with quote

Hi all,
I have installed Apache and run it as a service and all was OK. BTW didn't use the MSI. I have it installed in J:/apache. I then installed PHP into j:/php and following the instructions provided by pnllan at http://www.apachelounge.com/viewtopic.php?t=570. I also downloaded the new php5apache2.dll file and placed it in the j:/php directory after renaming the original to *.dll.old.

I also ran regsvr32 on php5activescript.dll to register it and then created and ran test.wsf with no problems.

However Apache refuses to start with no error message and nothing in the error log.

Here are the relevant portions (as far as I'm aware) of the httpd.conf and the php.ini files.

httpd.conf

# For PHP 5 do something like this:
LoadModule php5_module "j:/php/php5apache2.dll"
AddType application/x-httpd-php .php

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

If I REM out the above lines then Apache runs

php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = "J:\php\includes"

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root = "j:\apache\htdocs"

Path Statement:-

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;J:\php

Any help would be appreciated.

Thanks.
Back to top
Tinhare



Joined: 29 Oct 2006
Posts: 5

PostPosted: Sun 29 Oct '06 16:40    Post subject: Here is an update Reply with quote

Having a look in the Windows event viewer I have the following entries :-

Description:
The Apache service named reported the following error:
>>> httpd.exe: Syntax error on line 487 of J:/apache/conf/httpd.conf: Cannot load J:/php/php5apache2.dll into server: The specified module could not be found. .

and

Description:
The Apache service named reported the following error:
>>> Invalid command 'PHPIniDir', perhaps misspelled or defined by a module not included in the server configuration .
Back to top
Steffen
Moderator


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

PostPosted: Sun 29 Oct '06 16:55    Post subject: Reply with quote

Maybe you can first try with the default locations as mentioned in the guide from pnllan. And follow exactly his instructions.

I am wondering why you did: regsvr32 on php5activescript.dll ?

You can leave out in php.ini: doc_root = "j:\apache\htdocs"
Back to top
Tinhare



Joined: 29 Oct 2006
Posts: 5

PostPosted: Sun 29 Oct '06 17:15    Post subject: Reply with quote

Thanks for the reply.

Was just about to reinstall into defaults. However, that doesn't solve the problem really. I want it installed on J: as it is a mirrored raid drive, also I hate installing stuff on C: as, I'm sure you know, Windows does need to be reloaded from time to time cause it sux.

As for running regsvr32 on php5activescript.dll I did this, not knowing any better, according to the install.txt file for php.

Quote:
ActiveScript

This section contains notes specific to the ActiveScript installation.

ActiveScript is a windows only SAPI that enables you to use PHP script
in any ActiveScript compliant host, like Windows Script Host,
ASP/ASP.NET, Windows Script Components or Microsoft Scriptlet control.

As of PHP 5.0.1, ActiveScript has been moved to the PECL repository.
You may download this PECL extension DLL from the PHP Downloads page
or at http://snaps.php.net/.

Note: You should read the manual installation steps first!

After installing PHP, you should download the ActiveScript DLL
(php5activescript.dll) and place it in the main PHP folder (e.g.
C:\php).

After having all the files needed, you must register the DLL on your
system. To achieve this, open a Command Prompt window (located in the
Start Menu). Then go to your PHP directory by typing something like cd
C:\php. To register the DLL just type regsvr32 php5activescript.dll.


Have Removed the include from php.ini

Cheers
Back to top
Tinhare



Joined: 29 Oct 2006
Posts: 5

PostPosted: Sun 29 Oct '06 18:19    Post subject: Reply with quote

Ok, cool up and running. Now the next problem is to get it to run from J:.
Back to top
Tinhare



Joined: 29 Oct 2006
Posts: 5

PostPosted: Sun 29 Oct '06 18:38    Post subject: Reply with quote

Here is an update.

Stopped the Apache2 service
Uninstalled the service using c:\apache2\bin\httpd.exe -k uninstall -n apache2
copied the Apache2 directory from C: to J:
edited the httpd.conf file
did a search on C:/apache2 and replaced with j:/apache2
also changed the path for php from c:/ to j:/
copied the php directory from c: to J:
edited the php.ini file
changed the extension to extension_dir = "j:\php\ext" from extension_dir = "c:\php\ext"

All seems to be working OK.
Back to top


Reply to topic   Topic: Apache2 won't run after installing PHP View previous topic :: View next topic
Post new topic   Forum Index -> Apache