Re: loaded latest edition of Apache http server on XP, and installed php on that server...



rfhurley wrote:
On Feb 8, 7:53 pm, "rfhurley" <rfhur...@xxxxxxxxx> wrote:
On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:



rfhurley wrote:
On Feb 6, 11:50 pm, Siegfreed <s...@xxxxxxxxx> wrote:
rfhurley wrote:
How do I run a .php program? (I'm starting with the "hello world"
script)
You need to specify the document root (the directory that Apache will
look for files when asked to serve them) in your "httpd" configuration
file, which in turn is located in the "Conf" directory. The section
that control the "DocumentRoot" look like this:-
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
# Example:-
DocumentRoot "C:/my_chosen_php_directory"
Once you set up your "DocumentRoot", place the files you want to run in
there, and type:
http://localhost/your_file_name.phpintoaweb browser; orhttp://127.0.0.1/your_file_name.phpintoaweb browser.
OK, I went to the "httpd.conf" file, and added this:
# For PHP 5 do something like this:
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:\Program Files\PHP"
and then ran the "<?php phpinfo(); ?>" script. It ran (correctly) in
my browser, but then an error message came up, shutting down apache. I
turned apache back on; the same thing happened again-- but this time,
when I tried to turn it back on, an error message came up, telling me
the operation couldn't be performed (wouldn't run apache). I restarted
my computer; Apache wouldn't start again (same error message).
I removed the added lines from the "httpd.conf" file, and restarted
everything. Everything ran fine; but when I re-added the "LoadModule
php5_module..." code, it wouldn't start apache. What's going on? And
what do I do now?
What error message do you get?

Jerry,
I changed the line that read
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
to
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2.dll"
(the line I used when I was still able to start apache)

and I was able to load apache again, but when I ran the "<?php
phpinfo(); ?>" script, the error messages came up again & shut apache
down. I was able to transcribe the highlights of dialog boxes #s 2 & 3
(dialog box 1 was that standard Windows box), which read:

Error signature

szAppName: httpd.exe szAppVer: 2.2.4.0 szMadName: unknown
szModVer: 0.0.0.0 offset: 01ed2dc0

To view technical info...click here:

which brings up another dialog box, which reads:


Error Report Contents

The following files will be included in this error report:

C:\DOCUME~1\ROBERT~1\LOCALS~1\Temp\WERa0cf.dir00\httpd.exe.mdmp
C:\DOCUME~1\ROBERT~1\LOCALS~1\Temp\WERa0cf.dir00\appcompat.txt


One other thing:

There's a section of httpd.conf which reads:

#
# ServerName gives the name and port that the server uses to identify
itself.
# This can often be determined automatically, but we recommend you
specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP
address here.
#
ServerName www.glassangel.com.com:80

glassangel is my domain, which is hosted on laughingsquid.net. I don't
know what the ServerName attribute would be named on my machine. Would
this have any effect on anything?



The server name is just the name Apache responds to in the HTTP header. It needs to be your domain name at your host; for your local test it can be almost anything. It's not going to affect this problem.

I suspect you have a conflict between extensions. That is, you are trying to load two different versions of the module. For instance, PHP has a version of MySQL compiled in its extension. If you have another extension which has compiled a different version of MySQL, you will have a problem.

We already know PHP is one of the problems. I suggest you take out all other extensions and add them back one at a time until you get the error again. Or, alternatively, remove the extensions one at a time until it starts working.

And BTW (from another message) I don't take files, etc. by email. Leave it in the newsgroup so everyone can benefit. If anyone wants to do things privately it's billable at my normal rates :-).

You might also think about the Apache Users mailing list at www.apache.org. That's where the Apache experts are found, and know more about the internals.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: Why wont this script run??
    ... I forgot to say that if i start httpd by hand, ... I reinstalled apache, and it works. ... DocumentRoot /home/www/html ... ServerName mo.moso.dk ...
    (Fedora)
  • Problem recreating Virtual Hosts settings from Windows to BSD
    ... I was using Apache 2 on Windows 2003 server. ... The virtual hosts config portion of httpd.conf looked like: ... ServerName site1.no-ip.com ...
    (freebsd-questions)
  • Re: [Full-disclosure] Bug with .php extension?
    ... the behavior that is i.e. demonstrated on default installations of Apache, only that this time not mod_negotiation, but mod_mime is responsible. ... Unknown extensions contribute nothing, and since they're unknown, it isn't known which category they aren't known for, so nothing happens with them. ... - Disable PHP for the upload area (is this possible? ... you would want your user upload area to be in a totally different place from your DocumentRoot so you don't get anything set on DocumentRoot leaking into the writable subdirectory. ...
    (Full-Disclosure)
  • vhosts
    ... My dear, fellow BSD enthusiasts, ... # Almost any Apache directive may go into a VirtualHost container. ... ServerName www.thedestefanos.com ... DocumentRoot /usr/www ...
    (freebsd-questions)
  • Re: Why wont this script run??
    ... I reinstalled apache, and it works. ... > DirectoryIndex index.html index.htm.var index.htm ... DocumentRoot /home/www/html ... ServerName mo.moso.dk ...
    (Fedora)