Connecting Tech Pros Worldwide Help | Site Map

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

rfhurley
Guest
 
Posts: n/a
#1: Feb 6 '07
How do I run a .php program? (I'm starting with the "hello world"
script)

Benjamin
Guest
 
Posts: n/a
#2: Feb 7 '07

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


On Feb 6, 3:32 pm, "rfhurley" <rfhur...@yahoo.comwrote:
Quote:
How do I run a .php program? (I'm starting with the "hello world"
script)
Well, put your .php file in the document root of the webserver (eg. c:
\Program Files\Apache Software Foundation\Apache2.2\htdocs) and type
http://localhost/youfilename.php into a web browser.

rfhurley
Guest
 
Posts: n/a
#3: Feb 7 '07

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


On Feb 6, 7:24 pm, "Benjamin" <musiccomposit...@gmail.comwrote:
Quote:
On Feb 6, 3:32 pm, "rfhurley" <rfhur...@yahoo.comwrote:How do I run a .php program? (I'm starting with the "hello world"
Quote:
script)
>
Well, put your .php file in the document root of the webserver (eg. c:
\Program Files\Apache Software Foundation\Apache2.2\htdocs) and typehttp://localhost/youfilename.phpinto a web browser.
Benjamin,
Thank you for responding. OK, I put the php doc in the correct folder,
where localhost is able to fid it, but it just reads out the code. Do
I have to configure the PHP in a certain way for the script to work?
btw, the script reads: "<?php phpinfo(); ?>" (quotation marks mine)

Justin
Guest
 
Posts: n/a
#4: Feb 7 '07

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


rfhurley wrote:
Quote:
On Feb 6, 7:24 pm, "Benjamin" <musiccomposit...@gmail.comwrote:
Quote:
>On Feb 6, 3:32 pm, "rfhurley" <rfhur...@yahoo.comwrote:How do I run a .php program? (I'm starting with the "hello world"
Quote:
>>script)
>Well, put your .php file in the document root of the webserver (eg. c:
>\Program Files\Apache Software Foundation\Apache2.2\htdocs) and typehttp://localhost/youfilename.phpinto a web browser.
>
Benjamin,
Thank you for responding. OK, I put the php doc in the correct folder,
where localhost is able to fid it, but it just reads out the code. Do
I have to configure the PHP in a certain way for the script to work?
btw, the script reads: "<?php phpinfo(); ?>" (quotation marks mine)
>

sounds like you haven't told apache what to do with .php files.

Re read the installation details for php and what you need to put in the
hpptd.conf file to get Apache processing php files.

Regards

Justin
Siegfreed
Guest
 
Posts: n/a
#5: Feb 7 '07

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


rfhurley wrote:
Quote:
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.php into a web browser; or
http://127.0.0.1/your_file_name.php into a web browser.
Steve
Guest
 
Posts: n/a
#6: Feb 7 '07

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


On Wed, 07 Feb 2007 20:29:51 +1300, Justin wrote:
Quote:
rfhurley wrote:
Quote:
>On Feb 6, 7:24 pm, "Benjamin" <musiccomposit...@gmail.comwrote:
Quote:
>>On Feb 6, 3:32 pm, "rfhurley" <rfhur...@yahoo.comwrote:How do I run a .php program? (I'm starting with the "hello world"
>>>script)
>>Well, put your .php file in the document root of the webserver (eg. c:
>>\Program Files\Apache Software Foundation\Apache2.2\htdocs) and typehttp://localhost/youfilename.phpinto a web browser.
>>
>Benjamin,
>Thank you for responding. OK, I put the php doc in the correct folder,
>where localhost is able to fid it, but it just reads out the code. Do
>I have to configure the PHP in a certain way for the script to work?
>btw, the script reads: "<?php phpinfo(); ?>" (quotation marks mine)
>>
>
>
sounds like you haven't told apache what to do with .php files.
>
Re read the installation details for php and what you need to put in the
hpptd.conf file to get Apache processing php files.
>
Regards
>
Justin
You need to add php support to apache as well... pretty simple to do, but
specific to OS. The manual is pretty helpful at this point.

rfhurley
Guest
 
Posts: n/a
#7: Feb 8 '07

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


On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
Quote:
rfhurley wrote:
Quote:
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.phpinto a web browser; orhttp://127.0.0.1/your_file_name.phpinto a web 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?

Jerry Stuckle
Guest
 
Posts: n/a
#8: Feb 9 '07

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


rfhurley wrote:
Quote:
On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
Quote:
>rfhurley wrote:
Quote:
>>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.phpinto a web browser; orhttp://127.0.0.1/your_file_name.phpinto a web 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?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
rfhurley
Guest
 
Posts: n/a
#9: Feb 9 '07

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


On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Quote:
rfhurley wrote:
Quote:
On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
Quote:
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:-
>
Quote:
Quote:
# 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:-
>
Quote:
Quote:
DocumentRoot "C:/my_chosen_php_directory"
>
Quote:
Quote:
Once you set up your "DocumentRoot", place the files you want to run in
there, and type:
>
Quote:
Quote:
>http://localhost/your_file_name.phpintoa web browser; orhttp://127.0.0.1/your_file_name.phpintoa web browser.
>
Quote:
OK, I went to the "httpd.conf" file, and added this:
>
Quote:
# For PHP 5 do something like this:
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
AddType application/x-httpd-php .php
>
Quote:
# configure the path to php.ini
PHPIniDir "C:\Program Files\PHP"
>
Quote:
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).
>
Quote:
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?
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Not much to report. At this point Apache won't even start if I change
"httpd.conf" to add the "LoadModule_php5" code. Before, I had to plow
through a couple of levels of error message to even get to an
indecipherable explanation.
I try again, though, and see if I can get something.

rfhurley
Guest
 
Posts: n/a
#10: Feb 9 '07

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


On Feb 8, 7:53 pm, "rfhurley" <rfhur...@yahoo.comwrote:
Quote:
On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>
>
>
Quote:
rfhurley wrote:
Quote:
On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>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:-
>
Quote:
Quote:
># 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:-
>
Quote:
Quote:
>DocumentRoot "C:/my_chosen_php_directory"
>
Quote:
Quote:
>Once you set up your "DocumentRoot", place the files you want to run in
>there, and type:
>
Quote:
Quote:
>>http://localhost/your_file_name.phpintoaweb browser; orhttp://127.0.0.1/your_file_name.phpintoaweb browser.
>
Quote:
Quote:
OK, I went to the "httpd.conf" file, and added this:
>
Quote:
Quote:
# For PHP 5 do something like this:
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
AddType application/x-httpd-php .php
>
Quote:
Quote:
# configure the path to php.ini
PHPIniDir "C:\Program Files\PHP"
>
Quote:
Quote:
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).
>
Quote:
Quote:
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?
>
Quote:
What error message do you get?
>
Quote:
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\h ttpd.exe.mdmp
C:\DOCUME~1\ROBERT~1\LOCALS~1\Temp\WERa0cf.dir00\a ppcompat.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?

Jerry Stuckle
Guest
 
Posts: n/a
#11: Feb 9 '07

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


rfhurley wrote:
Quote:
On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Quote:
>rfhurley wrote:
Quote:
>>On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>>>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.phpintoa web browser; orhttp://127.0.0.1/your_file_name.phpintoa web 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?
>>
>--
>==================
>Remove the "x" from my email address
>Jerry Stuckle
>JDS Computer Training Corp.
>jstuck...@attglobal.net
>==================
>
Not much to report. At this point Apache won't even start if I change
"httpd.conf" to add the "LoadModule_php5" code. Before, I had to plow
through a couple of levels of error message to even get to an
indecipherable explanation.
I try again, though, and see if I can get something.
>
You said you got an error message before. Do you remember what it was?

What do you get if you do a syntax check the Apache configuration file?
Use the -t parameter to the startup command.

And what's in your Apache error log?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
rfhurley
Guest
 
Posts: n/a
#12: Feb 9 '07

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


On Feb 8, 8:43 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Quote:
rfhurley wrote:
Quote:
On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Quote:
rfhurley wrote:
>On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>>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?
>
Quote:
Quote:
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
>
Quote:
Not much to report. At this point Apache won't even start if I change
"httpd.conf" to add the "LoadModule_php5" code. Before, I had to plow
through a couple of levels of error message to even get to an
indecipherable explanation.
I try again, though, and see if I can get something.
>
You said you got an error message before. Do you remember what it was?
>
What do you get if you do a syntax check the Apache configuration file?
Use the -t parameter to the startup command.
>
And what's in your Apache error log?
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
I sent an email to your email address to enquire whether I could send
you some files to look at. Also, how do you use the -t parameter on
Windows? (it looks like a UNIX flag, which I'm not really fluent with
either...)

R

Siegfreed
Guest
 
Posts: n/a
#13: Feb 9 '07

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


rfhurley wrote:
Quote:
On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>
Quote:
>>rfhurley wrote:
>>
Quote:
>>>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.phpinto a web browser; orhttp://127.0.0.1/your_file_name.phpinto a web 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?
>
Problably the module you are using is not compatible with Apache.

In my machine I have php version 6 and apache version 2.2 - consequently
I use:

"LoadModule php5_module c:/programs/php/php6apache2_2.dll".

Please note:- Unlike you, I use forward slashes.

It works like a clock.

rfhurley
Guest
 
Posts: n/a
#14: Feb 9 '07

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


On Feb 8, 9:46 pm, Siegfreed <s...@freed.orgwrote:
Quote:
rfhurley wrote:
Quote:
On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>
Quote:
Quote:
>rfhurley wrote:
>
Quote:
Quote:
>>How do I run a .php program? (I'm starting with the "hello world"
>>script)
>
Quote:
Quote:
>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:-
>
Quote:
Quote:
># 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:-
>
Quote:
Quote:
>DocumentRoot "C:/my_chosen_php_directory"
>
Quote:
Quote:
>Once you set up your "DocumentRoot", place the files you want to run in
>there, and type:
>
Quote:
Quote:
>http://localhost/your_file_name.phpintoa web browser; orhttp://127.0.0.1/your_file_name.phpintoa web browser.
>
Quote:
OK, I went to the "httpd.conf" file, and added this:
>
Quote:
# For PHP 5 do something like this:
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
AddType application/x-httpd-php .php
>
Quote:
# configure the path to php.ini
PHPIniDir "C:\Program Files\PHP"
>
Quote:
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).
>
Quote:
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?
>
Problably the module you are using is not compatible with Apache.
>
In my machine I have php version 6 and apache version 2.2 - consequently
I use:
>
"LoadModule php5_module c:/programs/php/php6apache2_2.dll".
>
Please note:- Unlike you, I use forward slashes.
>
It works like a clock.
Do you run Windows XP? I noticed you wrote "c:programs/..." rather
than "c:/Program Files/..." should I try this?

rfhurley
Guest
 
Posts: n/a
#15: Feb 9 '07

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


On Feb 8, 9:46 pm, Siegfreed <s...@freed.orgwrote:
Quote:
rfhurley wrote:
Quote:
On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>
Quote:
Quote:
>rfhurley wrote:
>
Quote:
Quote:
>>How do I run a .php program? (I'm starting with the "hello world"
>>script)
>
Quote:
Quote:
>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:-
>
Quote:
Quote:
># 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:-
>
Quote:
Quote:
>DocumentRoot "C:/my_chosen_php_directory"
>
Quote:
Quote:
>Once you set up your "DocumentRoot", place the files you want to run in
>there, and type:
>
Quote:
Quote:
>http://localhost/your_file_name.phpintoa web browser; orhttp://127.0.0.1/your_file_name.phpintoa web browser.
>
Quote:
OK, I went to the "httpd.conf" file, and added this:
>
Quote:
# For PHP 5 do something like this:
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
AddType application/x-httpd-php .php
>
Quote:
# configure the path to php.ini
PHPIniDir "C:\Program Files\PHP"
>
Quote:
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).
>
Quote:
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?
>
Problably the module you are using is not compatible with Apache.
>
In my machine I have php version 6 and apache version 2.2 - consequently
I use:
>
"LoadModule php5_module c:/programs/php/php6apache2_2.dll".
>
Please note:- Unlike you, I use forward slashes.
>
It works like a clock.
btw... I tried forward slashes too. the results were identical

otrWalter@gmail.com
Guest
 
Posts: n/a
#16: Feb 9 '07

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


go to...

http://web.torres.ws/walters_way

I have a complete set of docs on how to install and configure:

* Apache (with virtual hosts)
* mySQL
* Perl (with MODperl)
* PHP (with PEAR)
* Python
* SSH2
* CVS (with SSH keys)
* GPG

It might help you in the long run

Walter

Jerry Stuckle
Guest
 
Posts: n/a
#17: Feb 9 '07

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


rfhurley wrote:
Quote:
On Feb 8, 7:53 pm, "rfhurley" <rfhur...@yahoo.comwrote:
Quote:
>On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>>
>>
>>
Quote:
>>rfhurley wrote:
>>>On Feb 6, 11:50 pm, Siegfreed <s...@freed.orgwrote:
>>>>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\h ttpd.exe.mdmp
C:\DOCUME~1\ROBERT~1\LOCALS~1\Temp\WERa0cf.dir00\a ppcompat.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@attglobal.net
==================
rfhurley
Guest
 
Posts: n/a
#18: Feb 9 '07

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


On Feb 9, 12:03 am, otrWal...@gmail.com wrote:
Quote:
go to...
>
http://web.torres.ws/walters_way
>
I have a complete set of docs on how to install and configure:
>
* Apache (with virtual hosts)
* mySQL
* Perl (with MODperl)
* PHP (with PEAR)
* Python
* SSH2
* CVS (with SSH keys)
* GPG
>
It might help you in the long run
>
Walter
Thank you. I will check into this. I'm completely new to running a
server, so there might be (a lot) more questions coming.

Rob

rfhurley
Guest
 
Posts: n/a
#19: Feb 9 '07

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


On Feb 6, 1:32 pm, "rfhurley" <rfhur...@yahoo.comwrote:
Quote:
How do I run a .php program? (I'm starting with the "hello world"
script)
Thank you to everyone who posted here! I received a suggestion (on
apache forum) to try out apachefriends.org. They have an all-you-can-
eat (PHP/Pear, Perl, MySQL, etc.) Apache distro called XAMPP, which I
was told was easy to use. So I downloaded it and, lo & behold, it
WORKED! Right out of the box. I recommend this distribution highly for
those cognitively-impaired newbies such as myself. For the time being
I just want to test out my Perl & PHP scripts on a server. When I want
to get into the nuts 'n' bolts of serverdom, I'll probable be using a
Linux distribution for the operating system.

Again, thanks to all those who made suggestions! I greatly appreciate
the help.

Closed Thread