By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,053 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,053 IT Pros & Developers. It's quick & easy.

[NEWBEE] PHP5 RC1 install problem

P: n/a
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php

How do I get this corrected? Any help will be appreciated!

gk
Jul 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
isn't that the only thing thats supposed to print on the page? or am i
missing something...

"Gene Kahn" <je*****@yahoo.com> wrote in message
news:4d**************************@posting.google.c om...
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php

How do I get this corrected? Any help will be appreciated!

gk

Jul 17 '05 #2

P: n/a
On 27 Mar 2004 09:12:52 -0800, je*****@yahoo.com (Gene Kahn) wrote:
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php


Just to be clear - you say you "re-started" Apache - how exactly did you do
this? Did you Stop and then Start it, or did you use Restart?

You have to completely stop then start to get it to load new modules.

If not that, then check both the Apache error_log and the Windows event log
(the Application section of it).

Does PHP show in the server signature? Or in server-info? (Look in httpd.conf
for how to enable this if you haven't got it set up).

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #3

P: n/a
Sorry. My message was not too clear. It only prints;

Today's date:

It should print:

Today's date: "DATE"

where DATE is today's date in the format specified. So it looks like
the PHP script was not run at all.

gk
"kingofkolt" <je****@comcast.net> wrote in message news:<3Ji9c.17908$w54.130994@attbi_s01>...
isn't that the only thing thats supposed to print on the page? or am i
missing something...

"Gene Kahn" <je*****@yahoo.com> wrote in message
news:4d**************************@posting.google.c om...
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php

How do I get this corrected? Any help will be appreciated!

gk

Jul 17 '05 #4

P: n/a
Hi,
Yes, I stopped the Apache service and then re-started it, using the
Apache Monitor.

With respect to enabling the server signature (which i know nothing
about), there is this line in httpd.conf. Is that all there is to
enabling it?

ServerSignature On

I checked the Windows applications event log, and, yeah, it reports an
error on Apache Service as source and event number 3299.

The Apache error log file says (I had to shut it down to be able to
read it).

[Sat Mar 27 17:43:02 2004] [notice] Parent: Created child process 3740
[Sat Mar 27 17:43:02 2004] [notice] Child 3740: Child process is
running
[Sat Mar 27 17:43:02 2004] [notice] Child 3740: Acquired the start
mutex.
[Sat Mar 27 17:43:02 2004] [notice] Child 3740: Starting 250 worker
threads.
[Sat Mar 27 17:49:14 2004] [notice] Parent: Received shutdown signal
-- Shutting down the server.
[Sat Mar 27 17:49:14 2004] [notice] Child 3740: Exit event signaled.
Child process is ending.
[Sat Mar 27 17:49:15 2004] [notice] Child 3740: Released the start
mutex
[Sat Mar 27 17:49:16 2004] [notice] Child 3740: Waiting for 250 worker
threads to exit.
[Sat Mar 27 17:49:16 2004] [notice] Child 3740: All worker threads
have exited.
[Sat Mar 27 17:49:16 2004] [notice] Child 3740: Child process is
exiting
[Sat Mar 27 17:49:16 2004] [notice] Parent: Child process exited
successfully.

Thanks for your help.
gk
Andy Hassall <an**@andyh.co.uk> wrote in message news:<qs********************************@4ax.com>. ..
On 27 Mar 2004 09:12:52 -0800, je*****@yahoo.com (Gene Kahn) wrote:
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php


Just to be clear - you say you "re-started" Apache - how exactly did you do
this? Did you Stop and then Start it, or did you use Restart?

You have to completely stop then start to get it to load new modules.

If not that, then check both the Apache error_log and the Windows event log
(the Application section of it).

Does PHP show in the server signature? Or in server-info? (Look in httpd.conf
for how to enable this if you haven't got it set up).

Jul 17 '05 #5

P: n/a
Hi,

in my previous email, i said that the Windows Event log shows the 3299
error on Apache Service. Please disregard that statement. That was an
earlier error triggered by the AddModule command:

LoadModule php5_module c:/php/php5apache2.dll
#AddModule mod_php5.c
AddType application/x-httpd-php .php

There is no mod_php5.c in the distribution, and when I commented this
line, as shown, the error disappeared.

gk

Andy Hassall <an**@andyh.co.uk> wrote in message news:<qs********************************@4ax.com>. ..
On 27 Mar 2004 09:12:52 -0800, je*****@yahoo.com (Gene Kahn) wrote:
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php


Just to be clear - you say you "re-started" Apache - how exactly did you do
this? Did you Stop and then Start it, or did you use Restart?

You have to completely stop then start to get it to load new modules.

If not that, then check both the Apache error_log and the Windows event log
(the Application section of it).

Does PHP show in the server signature? Or in server-info? (Look in httpd.conf
for how to enable this if you haven't got it set up).

Jul 17 '05 #6

P: n/a
On 27 Mar 2004 17:14:59 -0800, je*****@yahoo.com (Gene Kahn) wrote:
Andy Hassall <an**@andyh.co.uk> wrote in message news:<qs********************************@4ax.com>. ..
On 27 Mar 2004 09:12:52 -0800, je*****@yahoo.com (Gene Kahn) wrote:
It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php


Just to be clear - you say you "re-started" Apache - how exactly did you do
this? Did you Stop and then Start it, or did you use Restart?

You have to completely stop then start to get it to load new modules.

If not that, then check both the Apache error_log and the Windows event log
(the Application section of it).

Does PHP show in the server signature? Or in server-info? (Look in httpd.conf
for how to enable this if you haven't got it set up).


Yes, I stopped the Apache service and then re-started it, using the
Apache Monitor.

With respect to enabling the server signature (which i know nothing
about), there is this line in httpd.conf. Is that all there is to
enabling it?

ServerSignature On


Yes, and also make sure you've got:

expose_php = On

... in your php.ini (this is the default anyway, though).

As you're using the Apache Monitor, check what it says in the status bar at
the bottom when you select your Apache2 service.

It should say something like:

Apache/2.0.49 (Win32) PHP/5.0.0RC1

Or go to any directory that allows a directory listing, at the bottom it
should say something similar, e.g.:

Apache/2.0.49 (Win32) PHP/5.0.0RC1 Server at localhost Port 80

If it doesn't have PHP loaded, it won't have the PHP tag on the end.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #7

P: n/a
Gene Kahn wrote:
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));

</body>
</html>

Perhaps it's erroring out and you have it set not to display errors. (You're
missing a ?> tag, so the </body> will likely be regarded as a syntax error.)
Jul 17 '05 #8

P: n/a
Thanks to all who responded. No, I couldn't get PHP to run. So I wiped
Apache and PHP out, and then re-instanlled this time using WAMP5. PHP,
Apache, and SQLite work, so I'm happy. MySQL doesn't yet, but I
haven't spent time on it as I'm really interested in SQLite in the
first place.

je*****@yahoo.com (Gene Kahn) wrote in message news:<4d**************************@posting.google. com>...
Windows XP, Apache 2, PHP5 RC1
Hello,
A total newbie here. I can't seem to get Apache2 to load the php5
module. When I loaded up this html file in a browser, only the Today's
date: line prints on the page.

<html>
<head>
<title>Listing 1-7</title>
</head>
<body>
Today's date:
<?php
/*
** print today's date
*/
print(Date("l F d, Y"));
?>
</body>
</html>

It looks like the PHP preprocessor is not loading. I have added these
lines to Apache's httpd.conf, then re-started Apache.

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php

How do I get this corrected? Any help will be appreciated!

gk

Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.