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: installing apache and php
Author
spiffy



Joined: 11 Jun 2008
Posts: 5

PostPosted: Wed 11 Jun '08 10:44    Post subject: installing apache and php Reply with quote

hello, i'm trying to install apache and php, just so that i can view php files on my computer.

i'm using windows xp, and i've downloaded and installed apache 2.2 and php 5 with the help of a tutorial. the apache is working, but when i put a php file in the htdocs folder, it doesn't work. it's just blank.

how can i fix this?

also, after it is fixed... is there a way to have php files work in other folders on my computer?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 11 Jun '08 11:13    Post subject: Reply with quote

Please read Basic PHP Troubleshooting

if there is still a problem or a question please post again.
Back to top
spiffy



Joined: 11 Jun 2008
Posts: 5

PostPosted: Wed 11 Jun '08 11:19    Post subject: Reply with quote

according to that, the problem is either an error in the script, or the wrong file extension. i know that the file extension is .php, and i know that the script is correct, as it is simply,

<?php
phpinfo();
?>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 11 Jun '08 11:44    Post subject: Reply with quote

How did you configure apache to parse PHP?
Back to top
spiffy



Joined: 11 Jun 2008
Posts: 5

PostPosted: Wed 11 Jun '08 11:46    Post subject: Reply with quote

um, i didn't, as far as i know. all i did was what was in this tutorial:

http://blogspot.fluidnewmedia.com/?p=272

...just downloaded and installed

i know nothing about this stuff.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 11 Jun '08 13:47    Post subject: Reply with quote

which version of apache do you use? which os?
Please post the PHP part from your httpd.conf

What is in your error.log about that?
Back to top
spiffy



Joined: 11 Jun 2008
Posts: 5

PostPosted: Wed 11 Jun '08 14:18    Post subject: Reply with quote

apache 2.2.8 on windows xp media center.

i don't know what part is the php part of httpd.conf. ...is it this?

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

my error.log says this...

Starting the Apache2.2 service
The Apache2.2 service is running.
] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:32:31 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:32:31 2008] [notice] Parent: Created child process 3904
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Child process is running
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Acquired the start mutex.
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Starting 64 worker threads.
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Starting thread to listen on port 80.
[Tue Jun 10 21:32:43 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Tue Jun 10 21:32:43 2008] [notice] Child 3904: Exit event signaled. Child process is ending.
[Tue Jun 10 21:32:44 2008] [notice] Child 3904: Released the start mutex
[Tue Jun 10 21:32:45 2008] [notice] Child 3904: All worker threads have exited.
[Tue Jun 10 21:32:45 2008] [notice] Child 3904: Child process is exiting
[Tue Jun 10 21:32:45 2008] [notice] Parent: Child process exited successfully.
The Apache2.2 service is restarting.
Starting the Apache2.2 service
The Apache2.2 service is running.
] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:32:56 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:32:56 2008] [notice] Parent: Created child process 2960
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Child process is running
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Acquired the start mutex.
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Starting 64 worker threads.
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Starting thread to listen on port 80.
[Tue Jun 10 21:33:42 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Tue Jun 10 21:33:42 2008] [notice] Child 2960: Exit event signaled. Child process is ending.
[Tue Jun 10 21:33:43 2008] [notice] Child 2960: Released the start mutex
[Tue Jun 10 21:33:44 2008] [notice] Child 2960: All worker threads have exited.
[Tue Jun 10 21:33:44 2008] [notice] Child 2960: Child process is exiting
[Tue Jun 10 21:33:44 2008] [notice] Parent: Child process exited successfully.
[Tue Jun 10 21:33:47 2008] [notice] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:33:47 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:33:47 2008] [notice] Parent: Created child process 3004
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Child process is running
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Acquired the start mutex.
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Starting 64 worker threads.
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Starting thread to listen on port 80.
[Tue Jun 10 21:38:18 2008] [notice] Parent: Received restart signal -- Restarting the server.
[Tue Jun 10 21:38:18 2008] [notice] Child 3004: Exit event signaled. Child process is ending.
[Tue Jun 10 21:38:19 2008] [notice] Child 3004: Released the start mutex
[Tue Jun 10 21:38:19 2008] [notice] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:38:19 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:38:19 2008] [notice] Parent: Created child process 4084
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Child process is running
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Acquired the start mutex.
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Starting 64 worker threads.
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Starting thread to listen on port 80.
[Tue Jun 10 21:38:20 2008] [notice] Child 3004: All worker threads have exited.
[Tue Jun 10 21:38:20 2008] [notice] Child 3004: Child process is exiting
[Wed Jun 11 01:24:31 2008] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jun 11 01:24:31 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Jun 11 01:24:31 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Jun 11 01:24:31 2008] [notice] Parent: Created child process 1944
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Child process is running
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Acquired the start mutex.
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Starting 64 worker threads.
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Starting thread to listen on port 80.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 11 Jun '08 14:51    Post subject: Reply with quote

That is ok, but you need to say apache it has so parse the PHP files.
So you have to add one more line before #END PHP....

add:
AddType application/x-httpd-php .php
Back to top
spiffy



Joined: 11 Jun 2008
Posts: 5

PostPosted: Wed 11 Jun '08 14:56    Post subject: Reply with quote

well, i added that, and it still doesn't work.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 11 Jun '08 17:40    Post subject: Reply with quote

Please read the PHP part from the apachelounge tutorial

http://www.apachelounge.com/viewtopic.php?t=2394
Back to top


Reply to topic   Topic: installing apache and php View previous topic :: View next topic
Post new topic   Forum Index -> Apache